这个就是路由问题, 在路由中添加的相同的路由,我们只需要重写路由就行了
可以在router文件或者main.js文件里面引入vue-router,添加以下代码即可
import Routers from "vue-router";
const routerPush = Routers.prototype.push
Routers.prototype.push = function push(location) {
return routerPush.call(this, location).catch(error => error)
}
版权声明:本文为miao_yf原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。