刷新页面报错:
Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “/saleOrder/manage”.
浏览器提示:
<router-link>'s tag prop is deprecated and has been removed in Vue Router 4.
Use the v-slot API to remove this warning:
https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
在更新Vue应用时遇到Uncaught (in promise) NavigationDuplicated错误,此问题源于冗余的页面导航。同时,<router-link>组件的stag属性已被移除,建议使用v-slot API进行迁移。博客详细解析了如何解决NavigationDuplicated错误,并提供了Router.prototype.push的修正代码示例,帮助开发者顺利升级到Vue Router 4。
2551

被折叠的 条评论
为什么被折叠?



