标签:guid name path efault row color 修改 项目 index
1、在主组件展示二级路由的组件内容,在App.vue中添加
<br> <div class="container"> <!-- row 行排列 --> <div class="row"> <!-- 小屏展示12列,中屏展示4列 --> <div class="col-sm-12 col-md-4"> <router-view name="orderingGuide"></router-view> </div> <div class="col-sm-12 col-md-4"> <router-view name="delivery"></router-view> </div> <div class="col-sm-12 col-md-4"> <router-view name="history"></router-view> </div> </div> </div>
2、在index.js中修改路由配置
{path: ‘/‘, name: ‘homeLink‘, components:{
default:Home,
‘orderingGuide‘:OderingGuide,
‘delivery‘:Delivery,
‘history‘:History
}},
vue项目1-pizza点餐系统6-路由精讲之复用router-view
标签:guid name path efault row color 修改 项目 index
原文地址:https://www.cnblogs.com/JimShi/p/11195035.html