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
    }},

  

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-11
  • 2022-02-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2021-11-17
相关资源
相似解决方案