修改测试bug
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
import { ref, inject } from 'vue'
|
||||
import { reactive } from 'vue'
|
||||
import { update, add } from '@/api/user-boot/function'
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'auth/menu/popupApi'
|
||||
})
|
||||
@@ -114,11 +114,15 @@ const submit = async () => {
|
||||
formRef.value.validate(async valid => {
|
||||
if (valid) {
|
||||
if (form.id) {
|
||||
await update(form)
|
||||
await update(form).then(() => {
|
||||
ElMessage.success('修改成功!')
|
||||
})
|
||||
} else {
|
||||
let obj = JSON.parse(JSON.stringify(form))
|
||||
delete obj.id
|
||||
await add(obj)
|
||||
await add(obj).then(() => {
|
||||
ElMessage.success('新增成功!')
|
||||
})
|
||||
}
|
||||
emits('init')
|
||||
dialogVisible.value = false
|
||||
|
||||
Reference in New Issue
Block a user