<van-tabs v-model="active" animated @click="onClick"><van-tab v-for="(item,index) in dome" :title="item.test" :key="index" ></van-tab></van-tabs>vant里面的tabs事件参数是固定的索引下面是我想要的<van-tabs v-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",
},
]
添加回答
举报
0/150
提交
取消