//删除一行
this.tableData.splice(rowIndex,1)
//删除
private async handleDelete(index, row) {
console.log("删除", index, row);
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
Remove([row.id]).then(res => {
if (res) {
this.$message({
type: "success",
message: "删除成功!"
});
this.onSearch();
} else {
this.$message({
type: "success",
message: "删除失败!"
});
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
});
});
}
TS调用删除,写法
于 2023-12-28 12:16:17 首次发布