1. For example, after logging in, I want to update the route dynamically according to the menu list returned by the backend, but as soon as I add Routes, I can only add the route to the outermost layer and ask: how to add the new route to the inner layer.
such as
routes: [{
path: "/login",
name: "Login",
component: Login
},{
path: "/",
component: main,
name: "main",
children: [
{ path: "/aaa",component: aaa, name: "aaa"},
{
path: "/bbb",
component: bbb,
name: "bbb",
children: [
//
// { path: "/ccc",component: ccc,name: "cccc",meta: {parentPath: "manageMain"}},
]
}
]
},{
path: "/404",
component: NotFound,
name: "",
},
{
path: "*",
redirect: { path: "/404" }
}
]
I want to add my new route to bbb"s children