html:
<template v-slot="{row, $index}" v-if="item.key==='aaaaa'">
<span @click.stop="handleDetail(row,$index)">{{ row.aaaaa }}</span>
</template>
js:
const handleDetail = (row,index)=>{
console.log(row,index) // index就是当前索引
}
html:
<template v-slot="{row, $index}" v-if="item.key==='aaaaa'">
<span @click.stop="handleDetail(row,$index)">{{ row.aaaaa }}</span>
</template>
js:
const handleDetail = (row,index)=>{
console.log(row,index) // index就是当前索引
}