router.js中写入
import导入代码下面加入
const prototypePush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return prototypePush.call(this, location).catch(err => err)
}
router.js中写入
import导入代码下面加入
const prototypePush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return prototypePush.call(this, location).catch(err => err)
}