fix: fix the default value of props

This commit is contained in:
Vben
2021-04-25 20:49:00 +08:00
parent 6a8820597f
commit 8b2e0f665f
19 changed files with 87 additions and 71 deletions

View File

@@ -55,7 +55,7 @@
// api params
params: {
type: Object as PropType<Recordable>,
default: () => {},
default: () => ({}),
},
// support xxx.xxx.xx
resultField: propTypes.string.def(''),

View File

@@ -67,15 +67,15 @@
showAdvancedButton: propTypes.bool.def(true),
resetButtonOptions: {
type: Object as PropType<ButtonOptions>,
default: () => {},
default: () => ({}),
},
submitButtonOptions: {
type: Object as PropType<ButtonOptions>,
default: () => {},
default: () => ({}),
},
actionColOptions: {
type: Object as PropType<Partial<ColEx>>,
default: () => {},
default: () => ({}),
},
actionSpan: propTypes.number.def(6),
isAdvanced: propTypes.bool,

View File

@@ -24,19 +24,19 @@
props: {
schema: {
type: Object as PropType<FormSchema>,
default: () => {},
default: () => ({}),
},
formProps: {
type: Object as PropType<FormProps>,
default: () => {},
default: () => ({}),
},
allDefaultValues: {
type: Object as PropType<Recordable>,
default: () => {},
default: () => ({}),
},
formModel: {
type: Object as PropType<Recordable>,
default: () => {},
default: () => ({}),
},
setFormModel: {
type: Function as PropType<(key: string, value: any) => void>,