通过数据的下标删除对应数据,数据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)
    }

洛阳醉长安行
57 声望4 粉丝

charging...