Vue路由:<router-view />标签应该放在哪里

https://www.cnblogs.com/bulici/p/11799404.html

 

{
  path: "/one",
  name: "one",
  component: one,
  children: [
    {
      path: "two",
      component: two,
      children:[
        {
          path:"three",
          component:three
        }
      ]
    }
  ]
}

 

上述例子中

第一级路由(/one),需要将<router-view />标签放在app.vue里

第二级路由(/one/two),需要将<router-view />标签放在one.vue里

第三级路由(/one/two/three),需要将<router-view />标签放在two.vu

posted on 2022-08-16 10:42  四海骄阳  阅读(622)  评论(0)    收藏  举报

导航