vue项目中,使用vue-router进行路由控制,使用v-link进行路由跳转,当跳转的页面为当前页时,如何实现当前页面的刷新。
加个k值的参数不就好了,这样url就不一样了。或者跳转到一个其他的地址,重定向再跳转回来 <br>来自<a href=“https://lzxb.github.io/vue-cnode/” target="_blank">vue-cnode手机版</a>
设置组件重用属性 canReuse 为 false,则可以了。
canReuse
false
示例:
export default { ... route: { canReuse: false, }, ... };
文档: http://router.vuejs.org/zh-cn/pipeline/can-reuse.html
可以参考我的Vue项目https://github.com/lijy91/daza-frontend
懂了
最好不要用canReuse,2.0中会被移除。可以设置个watcher,详见 https://github.com/vuejs/vue-router/issues/643#issuecomment-245016344
CNode 社区为国内最专业的 Node.js 开源技术社区,致力于 Node.js 的技术研究。
加个k值的参数不就好了,这样url就不一样了。或者跳转到一个其他的地址,重定向再跳转回来 <br>来自<a href=“https://lzxb.github.io/vue-cnode/” target="_blank">vue-cnode手机版</a>
设置组件重用属性
canReuse为false,则可以了。示例:
文档: http://router.vuejs.org/zh-cn/pipeline/can-reuse.html
可以参考我的Vue项目https://github.com/lijy91/daza-frontend
懂了
最好不要用canReuse,2.0中会被移除。可以设置个watcher,详见 https://github.com/vuejs/vue-router/issues/643#issuecomment-245016344