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

在tabbar切换时,切换回被缓存的组件,组件不会保持在之前滚动的位置,请问为何 #33

Open
104828720 opened this issue Dec 2, 2023 · 3 comments

Comments

@104828720
Copy link

你好,我用了您的vue-router-keep-alive-helper的Demo,在tabbar切换时,虽然我设置了replace白名单,在dev-tool中也见到路由组件被缓存下来了,但切换回页面,页面不会保持在之前滚动的位置呢

@104828720
Copy link
Author

请问这个能解决的吗

@Zippowxk
Copy link
Owner

Zippowxk commented Dec 2, 2023

非常遗憾,滚动位置属于UI上的问题,不属于这个插件的职责范围。你需要自己保存一个offset变量,每次在activated时使用这个变量

@104828720
Copy link
Author

作者,但如果我从tabbar页跳转到product页,再按左上角返回tabbar页,这时,tabbar却能保持在滚动的位置,为何这样又可以呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants