diff --git a/src/components/Form/src/BasicForm.vue b/src/components/Form/src/BasicForm.vue index 15382631f2dc3a90acfbde441bad537b6bd14d2d..41542002884da3bb85a83eb9105adfbf8ab2ebe9 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 7833255fecbf20ca26d35af36dba7d3705eb5d7a..944a77be964d5a7238326fedb31d022e4427fd7c 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 d32654611687eebd5c88381f3f67ce1fe2abeecf..6fa07f39b73f2aa33c0ca6b42589cc774e596882 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 1b19618cf1adf16ccfef0a510dd1ff0f5e727fe1..a660c802830a236fc3823f9d54c4724246ad70bd 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[]; // 是否显示序号列