关于如何写子路由方法
配合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>
网友评论