Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

只显示第一屏数据 #38

Open
Fu-Hua-ShangXian opened this issue Aug 1, 2023 · 10 comments
Open

只显示第一屏数据 #38

Fu-Hua-ShangXian opened this issue Aug 1, 2023 · 10 comments

Comments

@Fu-Hua-ShangXian
Copy link

截屏2023-08-01 14 03 30
image
image

@tingyuxuan2302
Copy link
Owner

从这几个方面排查问题:

  1. 高度:height先不要设置成100%,因为这个跟父级元素有关,先设置成100vh试试;
  2. 先不要根据circleList有无数据去判断渲不渲染组件,先让他一直渲染;
    最后,可以看我的例子src/pages/virtual-list-demo,看看有哪些地方不一样;
    组件的渲染肯定是没有问题的,因为已经经过很多生产环境验证过了

@Fu-Hua-ShangXian
Copy link
Author

好的好的谢谢

@Fu-Hua-ShangXian
Copy link
Author

image
image
image
我使用了那个例子但是仍然只有第一屏幕的数据得到了渲染,是否是我的taro版本不合适呢

@tingyuxuan2302
Copy link
Owner

往上滑滑不动吗,按理说这个跟版本没啥关系,没有触发handleScrollToLower吗

@Fu-Hua-ShangXian
Copy link
Author

对上滑滑不动,触发了打印有日志

@Fu-Hua-ShangXian
Copy link
Author

无论是微信小程序的模拟器还是真机都发生了上滑不动的情况同时handleScrollToLower有日志打印出来

@tingyuxuan2302
Copy link
Owner

不晓得,你可以把我的项目下载下来,本地跑一下看看,如果正常那就是taro版本问题了

@Fu-Hua-ShangXian
Copy link
Author

好的我试试

@Fu-Hua-ShangXian
Copy link
Author

还真是版本问题,一样的代码在demo中正常运行,放到自己代码中依旧滚不动

@citywalki
Copy link

+1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants