naive-ui
naive-ui copied to clipboard
以n-layout-content组件当做页面滚动容器,使用keep-alive缓存后滚动条位置未保存
TuSimple/naive-ui version (版本)
2.30.0
Vue version (Vue 版本)
3.2.25
Browser and its version (浏览器及其版本)
Chrome(101.0.4951.67)
System and its version (系统及其版本)
Windows 10
Node version (Node 版本)
v14.12.0
Reappearance link (重现链接)
https://codesandbox.io/s/async-darkness-mpzrki?file=/src/main.js
Reappearance steps (重现步骤)
进入重现连接,默认显示Home页面、点击Client按钮进入详情页面,再点击浏览器回退到Home,n-layout-content组件的滚动条位置未保持进入详情页面当时的位置
Expected results (期望的结果)
页面回退时页面视图、滚动条保存进入时的位置
Actual results (实际的结果)
页面回退时页面视图、滚动条回到了页面最顶部
Remarks (补充说明)
n-layout-content组件的滚动条设置显示,就是配置Scrollbar组件的trigger,我看源码看到了一个scrollbarProps参数,Layout组件的文档上并没有写这个props,不知道是漏了还是这个参数加了会有其他的影响
这个问题还是存在、上面的重现步骤也还是可以重现出来!
这个问题还是存在、上面的重现步骤也还是可以重现出来!
我看看
@Wlisfes 你是不是改了这个 codesandbox?现在打不开了
This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem