[vue-router] Duplicate named routes definition: { name: “Home“, path: “/home“ } warn @ vue-router.
报错[vue-router] Duplicate named routes definition: { name: “Home”, path: “/home” }warn @ vue-router.esm.js?8c4f:16如何解决?报错原因:{path: '/',name: 'Home',component: Home},{path: '/login',name: 'Login',compon
·
报错[vue-router] Duplicate named routes definition: { name: “Home”, path: “/home” }warn @ vue-router.esm.js?8c4f:16如何解决?
报错原因:
{
path: '/',
name: 'Home',
component: Home
},
{
path: '/login',
name: 'Login',
component: Login
},
{
path: '/home',
name: 'Home',
component: Home
},
路由名称重复
解决方案:
{
path: '/',
name: 'Home',
component: Home
},
{
path: '/login',
name: 'Login',
component: Login
},
{
path: '/home',
name: 'Home2',
component: Home
},
更多推荐
已为社区贡献2条内容
所有评论(0)