1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2026-01-23 08:00:22 +08:00

fix: 表单校验失败会关闭弹窗问题

This commit is contained in:
zclzone
2023-12-14 17:01:53 +08:00
parent c8616ebbf3
commit 144845073a
4 changed files with 7 additions and 12 deletions

View File

@@ -57,7 +57,7 @@ export const useCrud = ({ name, initForm = {}, doCreate, doDelete, doUpdate, ref
if (!action && !['edit', 'add'].includes(modalAction.value)) {
return false
}
if (!(await validation())) return false
await validation()
const actions = {
add: {
api: () => doCreate(modalForm.value),