1.使用 el-table 的子元素上移下移
<template slot-scope="{row}"> html
<el-button type='text' @click="Moveupdown(row.id,0)">上移 </el-button>
<el-button type='text' @click="Moveupdown(row.id,1)">下移 </el-button>
</template>
Moveupdown(id,i) {
let data = { id: id, type: i,}
// 调接口
xxx(接口)(data){
this.$message.success('位置改变成功')
this.xxxx() // 这是调获取列表的接口
}
}
2.使用 el-table 点击某一行选中复选框
在el-table 里面绑定 @row.click = "clickRow'
<el-table @row.click = "clickRow' ref="mul