Comments (4)
感谢建议,目前项目里滚动位置一般是通过配置vue-router的scrollBehavior实现的
from feb-alive.
额,好吧。这scrollBehavior只记录页面文档滚动位置,没有记录局部元素的滚动位置,有局限性对我来说没啥用。
我还是用自己的解决方案:截图
from feb-alive.
局部情况比较多,比如一个页面可能有多个局部滚动容器,所以这部分主要还是业务实现,不过你这个建议可以考虑插件提供一个公共方法简化业务使用类似业务需求
from feb-alive.
局部容器滚动高度建议自行封装scroll-view组件,将滚动高度同步保存至组件的data属性上,可参考uni-app在H5下实现的scroll-view组件
from feb-alive.
Related Issues (13)
- Iframe is inserted in vue will be reloaded HOT 3
- 页面replace跳转之后缓存实例未清除 HOT 3
- 还维护吗 HOT 1
- 这个 route 没有在上下文中出现过。请问这个变量从哪里来? HOT 2
- 有一个问题想要请教 HOT 2
- 在 `ensureURL` 中使用 `recoverMeta` 会出现的问题 HOT 6
- feb-alive 的子路由保活 HOT 5
- 路由变化时,feb-alive 会重新 render HOT 11
- 带参数的路由返回后页面变空白 HOT 3
- BUG: 不应将 debug 信息带到源码中,更不应暴露在 window 上 HOT 1
- Demo中从tree-ancestor/tree-parent跳转到tree-ancestor/tree-parent/tree-son. 回退到tree-ancestor/tree-parent状态未保持 HOT 5
- 设置不缓存的子路由也进行缓存了 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feb-alive.