read all over the Internet, none of those shared is valid!
the default front end only writes the following routes, and the rest is given to the data by the back end, and then addRouters.
{
path: "/login",
name: "login",
meta: {
title: "Login - ",
hideInMenu: true
},
component: () => import("@/view/login/login.vue")
},
{
path: "/",
name: "root",
redirect: "/home",
component: Main,
meta: {
title: "",
hideInMenu: true,
notCache: true
},
children: [
{
path: "/home",
name: "home",
meta: {
title: "",
hideInMenu: true,
notCache: true
},
component: () => import("@/view/single-page/home")
}
]
},
after logging in, addRouters:
let resultRoute = makeRoute(target[0].children)
this.$router.options.routes.push(...resultRoute)
this.$router.addRoutes(resultRoute)
however, except that the default / home can be refreshed. Other addresses, refresh, are stuck on the page, no response.
router
everything. I"m speechless. Pray for the great god.