refactor: ♻️ 删除优化 loading 和取消删除

This commit is contained in:
hxr committed 2024-06-25 22:02:57 +08:00
1 parent f023808450
commit 1dcd4ab0cd
5 files changed
+73 -39

No files matched your search

+14 -9
View File
@@ -363,15 +363,20 @@ function handleDelete(roleId?: number) {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
loading.value = true;
RoleAPI.deleteByIds(roleIds)
.then(() => {
ElMessage.success("删除成功");
handleResetQuery();
})
.finally(() => (loading.value = false));
});
}).then(
() => {
loading.value = true;
RoleAPI.deleteByIds(roleIds)
.then(() => {
ElMessage.success("删除成功");
handleResetQuery();
})
.finally(() => (loading.value = false));
},
() => {
ElMessage.info("已取消删除");
}
);
}
/** 打开分配菜单权限弹窗 */