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

强制更新的次数太多 #14

Open
lizzardchen opened this issue Apr 4, 2020 · 3 comments
Open

强制更新的次数太多 #14

lizzardchen opened this issue Apr 4, 2020 · 3 comments

Comments

@lizzardchen
Copy link

调用一次nums的set,会发生很多次强制更新。

@gh-kL
Copy link
Owner

gh-kL commented Apr 4, 2020

这不是很正常吗,设置numItems本就是刷新全部Item。
如果你要更新单个Item的话,就用list.updateItem(id)。

@lizzardchen
Copy link
Author

会发生很多轮强制更新,其实你可以在所有的 renderevent更新完了之后统一更新一轮

@lizzardchen
Copy link
Author

也就是说,你现在是numitems一次,加入有3个,那么会强制更新3轮,一轮更新3个item那么就是更新3*3次,因为你在每次renderevent里面都设置了updateall。

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

2 participants