tnfe / vue3-infinite-list

一个支持百万数量级的Vue3无限滚动列表组件
https://tnfe.github.io/vue3-infinite-list
226 stars 37 forks source link

Fix dom not change while data change #19

Open miyagipipi opened 3 months ago

miyagipipi commented 3 months ago

As https://github.com/tnfe/vue3-infinite-list/issues description. I fix setTimeout to directly run scrollRender().

There may be some doubts about whether the renderEnd function can be removed from the scrollRender function and run separately (involving many changes).

I see that other watch run scrollRender directly. So I haven't made too many modifications here either.

If there is indeed an impact (it operates on DOM), the renderEnd function can be removed from the scrollRender function. And run renderEnd in watch or some other places.