當vue頁面路徑同樣 參數不一樣時 有可能頁面不會跳轉刷問了大佬說是Vue的bug,而後採用了這個奇淫巧技vue
watch: { '$route.query' () {//'$route.query' 這個函數是關鍵 Object.assign(this.$data, this.$options.data())//將跳轉前的數據置空 this.init()//再初始化當前的頁面 } }, created: function () { this.init() },