记录 | vue警告:[vue-router] Non-nested routes must include a leading slash character. Fix the following
[vue-router] Non-nested routes must include a leading slash character. Fix the following routes:- fathervue报错,配置路由path加上/
·
在点击父级路由的时候,发现页面没有动静,控制台警告[vue-router] Non-nested routes must include a leading slash character. Fix the following routes: - father
意思是说非嵌套路由必须包含首斜杠,检查后发现路由配置中path少了斜杠
修改前
{
path:'father',
name:'Father',
component:Father
}
修改后
{
//这边加 /
path:'/father',
name:'Father',
component:Father
}
修改后,就正常了
更多推荐
已为社区贡献3条内容
所有评论(0)