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

以n-layout-content组件当做页面滚动容器,使用keep-alive缓存后滚动条位置未保存 #3054

Closed
Wlisfes opened this issue Jun 7, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@Wlisfes
Copy link

Wlisfes commented Jun 7, 2022

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,不知道是漏了还是这个参数加了会有其他的影响

@github-actions github-actions bot added the untriaged need to sort label Jun 7, 2022
@07akioni 07akioni added bug Something isn't working and removed untriaged need to sort labels Jun 12, 2022
@Wlisfes
Copy link
Author

Wlisfes commented Jun 22, 2022

这个问题还是存在、上面的重现步骤也还是可以重现出来!

@07akioni
Copy link
Collaborator

这个问题还是存在、上面的重现步骤也还是可以重现出来!

我看看

@07akioni 07akioni reopened this Jun 22, 2022
@07akioni
Copy link
Collaborator

07akioni commented Jul 4, 2022

@Wlisfes 你是不是改了这个 codesandbox?现在打不开了

@jahnli
Copy link
Collaborator

jahnli commented Mar 12, 2024

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

@jahnli jahnli closed this as completed Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants