修改测试bug
This commit is contained in:
@@ -56,7 +56,7 @@ import { reactive } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import IconSelector from '@/components/baInput/components/iconSelector.vue'
|
||||
import { updateMenu, addMenu } from '@/api/systerm'
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'auth/menu/popupMenu'
|
||||
})
|
||||
@@ -118,14 +118,18 @@ const submit = async () => {
|
||||
if (valid) {
|
||||
if (form.id) {
|
||||
form.pid = form.pid || '0'
|
||||
await updateMenu(form)
|
||||
await updateMenu(form).then(() => {
|
||||
ElMessage.success('编辑成功!')
|
||||
})
|
||||
} else {
|
||||
form.code = 'menu'
|
||||
form.pid = form.pid || '0'
|
||||
let obj = JSON.parse(JSON.stringify(form))
|
||||
delete obj.id
|
||||
|
||||
await addMenu(obj)
|
||||
|
||||
await addMenu(obj).then(() => {
|
||||
ElMessage.success('新增成功!')
|
||||
})
|
||||
}
|
||||
emits('init')
|
||||
dialogVisible.value = false
|
||||
|
||||
Reference in New Issue
Block a user