From dbfdd939b9eed40924b5614d85a797b2903b7cc2 Mon Sep 17 00:00:00 2001 From: powersir <1576775122@qq.com> Date: Mon, 4 Dec 2023 23:26:51 +0800 Subject: [PATCH] update:department rules --- src/pages/system/dept/create-department.tsx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/pages/system/dept/create-department.tsx b/src/pages/system/dept/create-department.tsx index 3792c93..55d06f6 100644 --- a/src/pages/system/dept/create-department.tsx +++ b/src/pages/system/dept/create-department.tsx @@ -42,6 +42,7 @@ const DepartmentEditor: React.FC = (props) => { }, [visible]); const save = async () => { + await form.validateFields(); setSaveLoading(true); const fieldValues = form.getFieldsValue(); const newValue = isEdit ? { ...data, ...fieldValues } : fieldValues; @@ -65,7 +66,7 @@ const DepartmentEditor: React.FC = (props) => { width={640} onOk={save} onCancel={() => onCancel()} - confirmLoading= {saveLoading} + confirmLoading={saveLoading} destroyOnClose >
= (props) => { - + - +