共计 211 个字符,预计需要花费 1 分钟才能阅读完成。
当 vue 页面路径一样 参数不同时 有可能页面不会跳转刷
问了大佬说是 Vue 的 bug,然后采用了这个奇淫巧技
watch: {'$route.query' () {//'$route.query' 这个函数是关键
Object.assign(this.$data, this.$options.data())// 将跳转前的数据置空
this.init()// 再初始化当前的页面}
},
created: function () {this.init()
},
正文完