修复菜单提示问题

This commit is contained in:
Jason 2022-08-25 10:51:43 +08:00
parent a56239b398
commit 4e1307b00e
2 changed files with 3 additions and 0 deletions

View File

@ -152,6 +152,7 @@ import type { FormInstance } from 'element-plus'
import { menuLists, menuEdit, menuAdd } from '@/api/perms/menu'
import { MenuEnum } from '@/enums/appEnums'
import Popup from '@/components/popup/index.vue'
import feedback from '@/utils/feedback'
const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
@ -234,6 +235,7 @@ const handleSubmit = async () => {
await formRef.value?.validate()
mode.value == 'edit' ? await menuEdit(formData) : await menuAdd(formData)
popupRef.value?.close()
feedback.msgSuccess('操作成功')
emit('success')
}

View File

@ -135,6 +135,7 @@ const handleEdit = async (data: any) => {
const handleDelete = async (id: number) => {
await feedback.confirm('确定要删除?')
await menuDelete({ id })
feedback.msgSuccess('删除成功')
getLists()
}