Vue-Router
二水你要努力啊
爆炸头, 望春风 。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Vue路由传参及传参后刷新导致参数消失处理
在刷新后,使路由传递的参仍然存在 this.$router.push({ name: 'test2', query: { id: '1' }}) 获取参数 this.$route.query.id 原理是通过在路径上面绑定参数传递。原创 2019-10-16 18:21:20 · 447 阅读 · 0 评论 -
Vue动态缓存页面
原理通过keep-alive标签的include属性及vuex完成 需求说明:A页面到B页面需要缓存,A页面到C页面不需要缓存 所要缓存页面的顶级出口 <keep-alive :include="kpAlive"> <router-view/> </keep-alive> <script> export default { computed: { /** * router-alive */原创 2020-07-01 13:43:34 · 1318 阅读 · 1 评论
分享