vue中使用elementUI表格多选传值处理和清空多选
<el-button @click="updateMore()">批量修改</el-button><el-table ref="multipleTable" @selection-change="handleSelectionChange"><el-table-column type="selection" align="center" &...
·
<el-button @click="updateMore()">批量修改</el-button>
<el-table ref="multipleTable" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" ></el-table-column>
</el-table>
//方法
methods: {
//批量修改
updateMore () {
if (!!this.ids && (this.ids.length != 0)) {
let confirm_title=this.ids.length>1?'确定要执行批量到账操作':'确定要执行到账操作';
this.$confirm(confirm_title, "提示", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning"
}).then(() => {
let data = {
orderCodes: this.ids.join(',')
}
}).catch(() => {
//清空表格多选框
this.$refs.multipleTable.clearSelection();
this.ids = [];
})
}else{
this.$message.error('请先勾选')
}
}
}
更多推荐
已为社区贡献9条内容
所有评论(0)