diff --git a/src/components/Form/src/types/form.ts b/src/components/Form/src/types/form.ts index 3239dbeb..8eddcbe9 100644 --- a/src/components/Form/src/types/form.ts +++ b/src/components/Form/src/types/form.ts @@ -124,8 +124,8 @@ export interface FormProps { // Show confirmation button showSubmitButton?: boolean - resetFunc?: () => Promise - submitFunc?: () => Promise + resetFunc?: (() => Promise) | (() => void) + submitFunc?: (() => Promise) | (() => void) transformDateFunc?: (date: any) => string colon?: boolean, // 表单是否初始状态是只读属性 @@ -145,9 +145,9 @@ export interface FormSchema { subLabel?: string // Help text on the right side of the text helpMessage?: - | string - | string[] - | ((renderCallbackParams: RenderCallbackParams) => string | string[]) + | string + | string[] + | ((renderCallbackParams: RenderCallbackParams) => string | string[]) // BaseHelp component props helpComponentProps?: Partial // Label width, if it is passed, the labelCol and WrapperCol configured by itemProps will be invalid @@ -158,13 +158,13 @@ export interface FormSchema { component: ComponentType // Component parameters componentProps?: - | ((opt: { - schema: FormSchema - tableAction: TableActionType - formActionType: FormActionType - formModel: Recordable - }) => Recordable) - | object + | ((opt: { + schema: FormSchema + tableAction: TableActionType + formActionType: FormActionType + formModel: Recordable + }) => Recordable) + | object // Required required?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean) @@ -203,10 +203,10 @@ export interface FormSchema { renderColContent?: (renderCallbackParams: RenderCallbackParams) => VNode | VNode[] | string renderComponentContent?: - | ((renderCallbackParams: RenderCallbackParams) => any) - | VNode - | VNode[] - | string + | ((renderCallbackParams: RenderCallbackParams) => any) + | VNode + | VNode[] + | string // Custom slot, in from-item slot?: string diff --git a/src/components/Table/src/components/RenderComponent.vue b/src/components/Table/src/components/RenderComponent.vue new file mode 100644 index 00000000..9da7f0c1 --- /dev/null +++ b/src/components/Table/src/components/RenderComponent.vue @@ -0,0 +1,15 @@ + + diff --git a/src/components/Table/src/components/TableAction.vue b/src/components/Table/src/components/TableAction.vue index 58f23e57..4ee5a4cc 100644 --- a/src/components/Table/src/components/TableAction.vue +++ b/src/components/Table/src/components/TableAction.vue @@ -3,13 +3,19 @@