|
@@ -6,6 +6,7 @@ import FormRender, { useForm } from 'form-render'
|
|
import { BaseMenuEnum } from '@/pages/Schema/Base'
|
|
import { BaseMenuEnum } from '@/pages/Schema/Base'
|
|
import type { SchemaBaseModelState } from '@/pages/Schema/Base/model'
|
|
import type { SchemaBaseModelState } from '@/pages/Schema/Base/model'
|
|
import type { ConnectProps } from 'umi'
|
|
import type { ConnectProps } from 'umi'
|
|
|
|
+import { delay } from '@/utils/util'
|
|
|
|
|
|
export enum ModalType {
|
|
export enum ModalType {
|
|
ADD = 0,
|
|
ADD = 0,
|
|
@@ -65,9 +66,13 @@ const ProjectModal: React.FC<ProjectModalProps> = ({
|
|
})
|
|
})
|
|
|
|
|
|
const onMount = () => {
|
|
const onMount = () => {
|
|
- console.log(111, defaultFormData)
|
|
|
|
-
|
|
|
|
- form.setValues({ ...defaultFormData })
|
|
|
|
|
|
+ form.setSchemaByPath('projectTypeID', {
|
|
|
|
+ enum: pTypeList.map(item => item.value),
|
|
|
|
+ enumNames: pTypeList.map(item => item.label)
|
|
|
|
+ })
|
|
|
|
+ delay(300).then(() => {
|
|
|
|
+ form.setValues({ ...defaultFormData })
|
|
|
|
+ })
|
|
|
|
|
|
// delay(3000).then(_ => {
|
|
// delay(3000).then(_ => {
|
|
// form.setSchemaByPath('select1', {
|
|
// form.setSchemaByPath('select1', {
|