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