We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我的scrollY提交到mutations发现是0,有没解决办法,当时您是怎么做的(您的总结写的是transition,我加不加都保存不了)
The text was updated successfully, but these errors were encountered:
貌似关键在于您的css编写,设置height和overflow:auto后scrollTop才有记录,才能保存到store。但还是不太懂,希望能说说原理,谢谢
Sorry, something went wrong.
在 src/App.vue 中,有下面两行:
src/App.vue
transition(name='fade', mode='out-in') router-view
你可以试试将 transition 注释之后看看 scrollTop 的值是否会变化。
transition
scrollTop
我也不是非常明白,猜测是加了 transition 之后,会对路由页面的生命周期产生影响,在 beforeDestroy 时拿到了有效的 scrollTop;而不加时却一直为 0。
beforeDestroy
0
overflow 属性的默认值为 visible,auto 是在超过高度之后会出现一个 scrollbar,只有在可以 scroll 的时候才能拿到 scrollTop,一个不能 scroll 的元素,它的只能是 0。
overflow
visible
auto
scrollbar
scroll
No branches or pull requests
我的scrollY提交到mutations发现是0,有没解决办法,当时您是怎么做的(您的总结写的是transition,我加不加都保存不了)
The text was updated successfully, but these errors were encountered: