如下写法错误,抄代码时,不要加上redirect,否则会跳转到404
{
//自己添加的路由页面,不要添加在动态路由中
path: '/newPage',
component: () => import('@/views/system/newPage'),
hidden: true,
redirect: 'noredirect',
},
下面写法正确
{
//自己添加的路由页面,不要添加在动态路由中
path: '/newPage',
component: () => import('@/views/system/newPage'),
hidden: true,
},
博客指出前端代码中一种写法错误,即抄代码时不能加上redirect,否则会跳转到404,并给出了正确写法,涉及JavaScript等前端技术。
8177

被折叠的 条评论
为什么被折叠?



