Can all routes in vue go to router-view in app.vue?

can you use only one < router-view / > for the whole project

?

develop the vue project. With regard to routing, it is possible to add all the outermost router-view, in the parent, but it needs to be controlled by style. Do you want to know if there is any way to all go to the router-view of the top component?

related codes

let routers = [
  {
    path: "/",
    name: "Layout",
    component: () => import("view/layout/layout")
  },
  {
    path: "/toBank",
    name: "aliPayOnline",
    component: () => import("view/aliPayOnline/aliPayOnline"),
    children: [
      {
        path: "publicInfo",
        name: "PublicInfo",
        component: import("view/publicInfo/publicInfo")
      }
    ]
  }
]

now you want to jump to toBank/publicInfo by going to the router-view, under app.vue instead of adding router-view, to the / toBank component, that is, using only one router-view for the entire page. How to implement

Mar.28,2021

take this route to a higher level?

Menu