diff --git a/src/components/Form/src/BasicForm.vue b/src/components/Form/src/BasicForm.vue index 15382631..41542002 100644 --- a/src/components/Form/src/BasicForm.vue +++ b/src/components/Form/src/BasicForm.vue @@ -207,7 +207,11 @@ } } advanceState.actionSpan = (realItemColSum % BASIC_COL_LEN) + unref(getEmptySpanRef); - getAdvanced(props.actionColOptions || { span: BASIC_COL_LEN }, itemColSum, true); + getAdvanced( + unref(getActionPropsRef).actionColOptions || { span: BASIC_COL_LEN }, + itemColSum, + true + ); emit('advanced-change'); } function getAdvanced(itemCol: Partial, itemColSum = 0, isLastAction = false) { diff --git a/src/components/Form/src/FormAction.tsx b/src/components/Form/src/FormAction.tsx index 7833255f..944a77be 100644 --- a/src/components/Form/src/FormAction.tsx +++ b/src/components/Form/src/FormAction.tsx @@ -71,8 +71,8 @@ export default defineComponent({ const advancedSpanObj = showAdvancedButton ? { span: actionSpan < 6 ? 24 : actionSpan } : {}; const actionColOpt: Partial = { span: showAdvancedButton ? 6 : 4, - ...actionColOptions, ...advancedSpanObj, + ...actionColOptions, }; return actionColOpt; }); diff --git a/src/components/Form/src/types/form.ts b/src/components/Form/src/types/form.ts index d3265461..6fa07f39 100644 --- a/src/components/Form/src/types/form.ts +++ b/src/components/Form/src/types/form.ts @@ -48,7 +48,7 @@ export interface FormProps { // 空白行span emptySpan?: number | Partial; // 表单内部组件大小 - size: 'default' | 'small' | 'large'; + size?: 'default' | 'small' | 'large'; // 是否禁用 disabled?: boolean; // 时间区间字段映射成多个 @@ -62,25 +62,25 @@ export interface FormProps { // 超过指定行数自动收起 autoAdvancedLine?: number; // 是否显示操作按钮 - showActionButtonGroup: boolean; + showActionButtonGroup?: boolean; // 重置按钮配置 - resetButtonOptions: Partial; + resetButtonOptions?: Partial; // 确认按钮配置 - submitButtonOptions: Partial; + submitButtonOptions?: Partial; // 操作列配置 - actionColOptions: Partial; + actionColOptions?: Partial; // 显示重置按钮 - showResetButton: boolean; + showResetButton?: boolean; // 显示确认按钮 - showSubmitButton: boolean; + showSubmitButton?: boolean; - resetFunc: () => Promise; - submitFunc: () => Promise; - transformDateFunc: (date: any) => string; + resetFunc?: () => Promise; + submitFunc?: () => Promise; + transformDateFunc?: (date: any) => string; colon?: boolean; } export interface FormSchema { diff --git a/src/components/Table/src/types/table.ts b/src/components/Table/src/types/table.ts index 1b19618c..a660c802 100644 --- a/src/components/Table/src/types/table.ts +++ b/src/components/Table/src/types/table.ts @@ -94,7 +94,7 @@ export interface BasicTableProps { // 使用搜索表单 useSearchForm?: boolean; // 表单配置 - formConfig?: FormProps; + formConfig?: Partial; // 列配置 columns: BasicColumn[]; // 是否显示序号列