提交roll全部删除功能

This commit is contained in:
2026-07-27 10:49:08 +08:00
parent 769efa8809
commit 450787062b
+3 -1
View File
@@ -526,7 +526,9 @@ export default {
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
handleDelete(row) { handleDelete(row) {
const ids = row ? [row] : this.ids; // 顶部按钮直接触发时 row 是点击事件对象,需过滤掉
const singleId = (typeof row === "number" || typeof row === "string") ? row : null;
const ids = singleId != null ? [singleId] : this.ids;
if (!ids || ids.length === 0) { if (!ids || ids.length === 0) {
this.$modal.msgWarning("请至少选择一条数据"); this.$modal.msgWarning("请至少选择一条数据");
return; return;