当前位置:网站首页 > Vue.js开发 > 正文

VUE控制台报错: [vue-router] Duplicate named routes definition: { name: "NotFound", path: "*" }

VUE控制台报错: [vue-router] Duplicate named routes definition: { name: "NotFound", path: "*" }

将下面写法

{ path: "*", name: 'NotFound', redirect: "/404" }

改为

{ path: "*", redirect: { name: 'NotFound', } }

 

到此这篇VUE控制台报错: [vue-router] Duplicate named routes definition: { name: "NotFound", path: "*" }的文章就介绍到这了,更多相关内容请继续浏览下面的相关推荐文章,希望大家都能在编程的领域有一番成就!

版权声明


相关文章:

  • vue动态路由:路由参数改变,视图不更新问题的解决2024-12-02 20:45:08
  • Nuxt.js报错:Classic mode for store/ is deprecated and will be removed in Nuxt 32024-12-02 20:45:08
  • Nuxt.js中安装使用插件【ElementUI,axios,scss】2024-12-02 20:45:08
  • VUE 爬坑之旅 -- 引入静态资源的正确方式2024-12-02 20:45:08
  • VUE好用地址2024-12-02 20:45:08
  • VUE实现延时请求接口2024-12-02 20:45:08
  • VUE报错because it violates the following Content Security Policy directive2024-12-02 20:45:08
  • vue路由切换报错message: "Navigating to current location (XXX) is not allowed"的解决方案2024-12-02 20:45:08
  • VUE根据token,路由判断用户登录状态并跳转登录页2024-12-02 20:45:08
  • VUE-axios统一增加请求头并根据接口返回的状态码判断用户登录状态并跳转登录页2024-12-02 20:45:08
  • 全屏图片