vue中如何取消对表格多行数据的修改,当点击编辑按钮后,可以对表格进行编辑,修改完多条数据后,点击取消按钮,修改的多条数据恢复原来的数据
2条回答 默认 最新
Absolute小白 2022-12-14 11:03关注<el-button v-if="showBtn[$index]" type="primary" size="mini" @click.native="handleCancel($index, row)">取消</el-button>// 取消编辑 handleCancel(index, row) { row.address = row.originalAddress; this.$refs.multipleTable.toggleRowSelection(row); this.showEdit[index] = false; this.showBtn[index] = false; this.$set(this.showEdit, row, false); this.$set(this.showBtn, row, false); },解决 无用评论 打赏 举报