美文网首页
vue router子路由

vue router子路由

作者: 无枉少年 | 来源:发表于2019-07-17 18:06 被阅读0次
关于如何写子路由方法

配合for循环得到index

<div class="box_navigation_template" v-for="(item,index) in navigationlist" :key="item.id"></div>

router.js页面

{
    path: '/Products_Services',
    name: 'Products_Services',
    component: _import('Products_Services'),
    children: [
      { path: 'details/:id', component: _import('Products_Services/components/details/details')}
    ]
  },

html界面

<router-link :to="{path:'/Products_Services/details/'+index, query:{ name: index }}">
           
</router-link>

相关文章

网友评论

      本文标题:vue router子路由

      本文链接:https://www.haomeiwen.com/subject/gjsclctx.html