[vue-router] Duplicate named routes definition: { name: "home", path: "/home" } 猪猪是天才 2018-11-20 12,175 阅读1分钟 背景:vue 项目,路由为 / ,和 /home ,挂载的组件都是同一个,就会在控制台报警告代码如下图:解决方法:{ path: '/', redirect: { name: 'home' } }, { path: '/home', name: 'home', component: home }, 默认打开 / 就会跳到 /home 页面