在用vue2 写后台管理项目时,动态添加路由,控制台警告[vue-router] Non-nested routes must include a leading slash character. Fix the following routes:
![](https://i-blog.csdnimg.cn/blog_migrate/d3093828deb403f13b294490b2b00e7c.png)
在经过检查之后是在动态路由地址前没有 加"/"
let route = {
path: `/${now.url}`, // 动态地址前加上 "/"
component: loadView(now.url)
}
在用vue2 写后台管理项目时,动态添加路由,控制台警告[vue-router] Non-nested routes must include a leading slash character. Fix the following routes:
在经过检查之后是在动态路由地址前没有 加"/"
let route = {
path: `/${now.url}`, // 动态地址前加上 "/"
component: loadView(now.url)
}