有无老哥知道vue路由重定向怎么写
1,可以正常访问
{
path: "usersManage",
name: "usersManage",
component: () => import("@/views/bmt/usersManage.vue"),
meta: { title: "用户管理", icon: "product-add" },
children: [
{
path: "usersInformation",
name: "usersInformation",
component: () =>
import("@/views/bmt/usersManage/usersInformation.vue"),
meta: { title: "用户详情", icon: "product-cate" },
hidden: true,
},
// 用户管理组件结束
],
},
2.路由重定向写法就不行,404页面
```javascript
{
path: "usersManage",
name: "usersManage",
component: { render(c) { return c('router-view') } },
redirect: '/bmt/usersManage/usersManageLists',
meta: { title: "用户管理", icon: "product-add" },
children: [
//用户管理组件开始
{
path: "usersManageLists",
name: "usersManageLists",
component: () => import("@/views/bmt/usersManage.vue"),
meta: { title: "用户管理列表", icon: "product-cate" },
hidden: true,
},
{
path: "usersInformation",
name: "usersInformation",
component: () =>
import("@/views/bmt/usersManage/usersInformation.vue"),
meta: { title: "用户详情", icon: "product-cate" },
hidden: true,
},
// 用户管理组件结束
],
},
```