Closed yoruponder closed 5 years ago
@tangbc hi~ Is there any solution to fix this bug? buremba says that vue 2.6.6 breaks this library, and other library <Akryum/vue-virtual-scroller> had fixed now. 😊😊😊 這個問題其實是動態修改offset后的定位問題哈,Nuxt 1.4.5的時候點B標籤設置offset能準確定位到B字母開頭的位置,但是升級Nuxt2.4.3后同樣的offset值定位卻不准,如需要我可以提供下bug的重現哈~麻煩作者啦
@yoruponder The same issue in <Akryum/vue-virtual-scroller> just sloved by add key-field
?
It's better if you can give me a reproduced repo.
@tangbc Hi, I create two repositories to reproduce the question. Normal in Nuxt 1.4.5 https://github.com/yoruponder/virtual-scroll-nobug-1.4.5 Not perfect in Nuxt 2.4.3 https://github.com/yoruponder/virtual-scroll-bug-2.4.3
@yoruponder I was able to reproduce the bug on your repo, but I couldn't find the exact reason for it for a long time.
I try to log and found that the offset
number you pass to virtual-list
and which we get it from real DOM is same, so, this bug maybe not come from virtual-list
.
The way virtual-list
set offset
just simply use JavaScript API el.scrollTop = offset
, it maybe some strange behaviors in nuxt or vue latest when set scroll or ui render.
Continue watch for this ....
@tangbc maybe this bug like buremba say, that coms from new vue version when Vue update to 2.6.6, maybe some new feature impacts virtual-list
. is there any solution to fix it?
Not yet.
nuxt1.4.2
nuxt 2.4.3