1、重新安装,在项目目录下运行 npm i vue-router@3.0 -S
2、
import Router from 'vue-router'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
1、重新安装,在项目目录下运行 npm i vue-router@3.0 -S
2、
import Router from 'vue-router'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}