时间:2023-6-29 作者:网络剑客 分类: other
Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/home".
const VueRouterPush = Router.prototype.push
Router.prototype.push = function push (to) {
return VueRouterPush.call(this, to).catch(err => err)
}
toMenu (item) {
if (this.$route.path !== item.url) {
this.$router.push({ path: item.url })
}
}
this.$router.push(route).catch(err => {
console.log('输出报错',err)
})
标签: vue