vue 中的router-view

之前对router-view的理解一直有疑问,其实router-view会找到对应的路由进行渲染,并不会相互影响

从上到下渲染时遇到<router-view/>,则到路由设置中根据路径找到对应的组件进行渲染。

  { path:"index",
    component:()=>import("@/components/common/headDeli/index") }//按需引入
原文地址:https://www.cnblogs.com/lipu12281/p/11911028.html