fix: 批量删除问题修复

Former-commit-id: 81be6da082b3eed89104b77f53a34ae2a2e7f60b
This commit is contained in:
haoxr
2023-03-13 23:08:24 +08:00
parent 8baa04362a
commit e1a231d4eb
6 changed files with 40 additions and 34 deletions

View File

@@ -104,7 +104,6 @@ function openDialog(parentId?: number, menuId?: number) {
.then(() => {
dialog.visible = true;
if (menuId) {
// 编辑
dialog.title = '编辑菜单';
getMenuForm(menuId).then(({ data }) => {
Object.assign(formData, data);
@@ -112,7 +111,6 @@ function openDialog(parentId?: number, menuId?: number) {
menuCacheData.path = data.path ?? '';
});
} else {
// 新增
dialog.title = '新增菜单';
formData.parentId = parentId;
}
@@ -160,6 +158,7 @@ function submitForm() {
*/
function handleDelete(menuId: number) {
if (!menuId) {
ElMessage.warning('请勾选删除项');
return false;
}