通过数据的下标删除对应数据,数据index和elementUI不一样,表格点击删除的时候插槽scope中获取不到$index:
ux-table-column插槽传参用scope.$rowIndex:
<ux-table-column title="操作" fixed="right" >
<template slot-scope="scope">
<el-button type="text" @click="remove(scope.$rowIndex)" >删除</el-button>
</template>
</ux-table-column>
method:
remove(index){
console.log(index)
this.tableData.splice(index,1)
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。