點擊沒問題 如果再這個頁面 再點擊一次這個頁面的導航 router-link 就會報這個錯 但不影響功能
引用vue-router的頁面添加一段代碼
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => {
err
})
}