-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
keep-alive缓存页面,dataTable再次激活时所还原的位置不对、不开启虚拟滚动还是会自动滚动到顶部 #2522
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TuSimple/naive-ui version (版本)
2.25.5
Vue version (Vue 版本)
3.2.31
Browser and its version (浏览器及其版本)
98.0.4758.102
System and its version (系统及其版本)
win10 (1909)
Node version (Node 版本)
14.15.1
Reappearance link (重现链接)
https://github.com/MYxu/naive-ui-admin-demo
Reappearance steps (重现步骤)
以下步骤的页面都是处于keep-alive组件下
1.1、dataTable开启virtual-scroll
1.2 滚动dataTable,显示第10-20行数据,然后切换到其他页面
1.3 再次切换回dataTable所在页面,会有一定几率显示的是第11-21行数据
2.1 dataTable不开启virtual-scroll
2.2 滚动dataTable,然后切换到其他页面
2.3 再次切换会dataTable所在页面,百分百会滚动回顶部
Expected results (期望的结果)
无论是否开启virtual-scroll,keep-alive组件下,再次切换到dataTable所在页面,dataTable能够正确回滚到对应位置
Actual results (实际的结果)
1、开启virtual-scroll时,dataTable整体下移了一行数据
2、不开启virtual-scroll时,dataTable还是会自动滚动到顶部
Remarks (补充说明)
The text was updated successfully, but these errors were encountered: