| 
					
				 | 
			
			
				@@ -35,8 +35,6 @@ const ProjectModal: React.FC<ProjectModalProps> = ({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   pTypeList, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   reloadTable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  console.log(schema) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const form = useForm() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   useEffect(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (visible && !schema) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -49,9 +47,9 @@ const ProjectModal: React.FC<ProjectModalProps> = ({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, [visible]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  useEffect(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    defaultFormData && ref.current?.setFieldsValue({ ...defaultFormData }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  }, [defaultFormData]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // useEffect(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  //   defaultFormData && ref.current?.setFieldsValue({ ...defaultFormData }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // }, [defaultFormData]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const { run: tryUpdateProject } = useRequest(updateProject, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     manual: true, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -66,6 +64,20 @@ const ProjectModal: React.FC<ProjectModalProps> = ({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const onMount = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    console.log(111, defaultFormData) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    form.setValues({ ...defaultFormData }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // delay(3000).then(_ => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   form.setSchemaByPath('select1', { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     description: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     enum: ['a', 'b', 'c'], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     enumNames: ['早', '中', '晚'], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // const handleOnFinish = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   //   ref.current?.validateFields().then(async values => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   //     try { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -94,7 +106,7 @@ const ProjectModal: React.FC<ProjectModalProps> = ({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       setVisible(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       reloadTable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      ref.current?.resetFields() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // ref.current?.resetFields() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } catch (error) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       message.error(error) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -108,7 +120,9 @@ const ProjectModal: React.FC<ProjectModalProps> = ({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         setVisible(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       title={type === ModalType.ADD ? '新增项目' : '编辑项目'}> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      {schema && <FormRender form={form} schema={JSON.parse(schema)} onFinish={onFinish} />} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      {schema && ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <FormRender form={form} schema={JSON.parse(schema)} onFinish={onFinish} onMount={onMount} /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      )} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <Button onClick={form.submit}>提交</Button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </div> 
			 |