< van-tabs VMI model = "active" animated @ click= "onClick" >
<van-tab v-for="(item,index) in dome" :title="item.test" :key="index" ></van-tab>
< / van-tabs >
The tabs event parameter invant is a fixed index
here is what I want
< van-tabs VMI model = "active" animated >
<van-tab v-for="(item,index) in dome" @click="onClick(item.id)" :title="item.test" :key="index" ></van-tab>
< / van-tabs >
dome: [
{
id:1,
test:"a",
},
{
id:2,
test:"b",
},
{
id:3,
test:"c",
},
{
id:4,
test:"d",
},
]