在练习vue-router时遇到一个小问题:路由重复报错vue-router.esm.js?3423:2046 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/home/message/detail?id=002&title=%E6%B6%88%E6%81%AF002".
解决办法:
1、在router/index.js中添加如下代码:
2、也可以在main.js中添加上图所示相同的代码