- 问题:
Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/operate/examinationScore".
- 解决办法:
(1)在项目目录下运行npm i vue-router@3.0 -S
【转自:平凡是最美荡气回肠】
(2)main.js 文件
import Router from 'vue-router'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
【转自:夏沫浅语】