fix(table): fix table actionColOptions not work
This commit is contained in:
parent
f96d6b221c
commit
5a6db8c640
|
|
@ -207,7 +207,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
advanceState.actionSpan = (realItemColSum % BASIC_COL_LEN) + unref(getEmptySpanRef);
|
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');
|
emit('advanced-change');
|
||||||
}
|
}
|
||||||
function getAdvanced(itemCol: Partial<ColEx>, itemColSum = 0, isLastAction = false) {
|
function getAdvanced(itemCol: Partial<ColEx>, itemColSum = 0, isLastAction = false) {
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,8 @@ export default defineComponent({
|
||||||
const advancedSpanObj = showAdvancedButton ? { span: actionSpan < 6 ? 24 : actionSpan } : {};
|
const advancedSpanObj = showAdvancedButton ? { span: actionSpan < 6 ? 24 : actionSpan } : {};
|
||||||
const actionColOpt: Partial<ColEx> = {
|
const actionColOpt: Partial<ColEx> = {
|
||||||
span: showAdvancedButton ? 6 : 4,
|
span: showAdvancedButton ? 6 : 4,
|
||||||
...actionColOptions,
|
|
||||||
...advancedSpanObj,
|
...advancedSpanObj,
|
||||||
|
...actionColOptions,
|
||||||
};
|
};
|
||||||
return actionColOpt;
|
return actionColOpt;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ export interface FormProps {
|
||||||
// 空白行span
|
// 空白行span
|
||||||
emptySpan?: number | Partial<ColEx>;
|
emptySpan?: number | Partial<ColEx>;
|
||||||
// 表单内部组件大小
|
// 表单内部组件大小
|
||||||
size: 'default' | 'small' | 'large';
|
size?: 'default' | 'small' | 'large';
|
||||||
// 是否禁用
|
// 是否禁用
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
// 时间区间字段映射成多个
|
// 时间区间字段映射成多个
|
||||||
|
|
@ -62,25 +62,25 @@ export interface FormProps {
|
||||||
// 超过指定行数自动收起
|
// 超过指定行数自动收起
|
||||||
autoAdvancedLine?: number;
|
autoAdvancedLine?: number;
|
||||||
// 是否显示操作按钮
|
// 是否显示操作按钮
|
||||||
showActionButtonGroup: boolean;
|
showActionButtonGroup?: boolean;
|
||||||
|
|
||||||
// 重置按钮配置
|
// 重置按钮配置
|
||||||
resetButtonOptions: Partial<BasicButtonProps>;
|
resetButtonOptions?: Partial<BasicButtonProps>;
|
||||||
|
|
||||||
// 确认按钮配置
|
// 确认按钮配置
|
||||||
submitButtonOptions: Partial<BasicButtonProps>;
|
submitButtonOptions?: Partial<BasicButtonProps>;
|
||||||
|
|
||||||
// 操作列配置
|
// 操作列配置
|
||||||
actionColOptions: Partial<ColEx>;
|
actionColOptions?: Partial<ColEx>;
|
||||||
|
|
||||||
// 显示重置按钮
|
// 显示重置按钮
|
||||||
showResetButton: boolean;
|
showResetButton?: boolean;
|
||||||
// 显示确认按钮
|
// 显示确认按钮
|
||||||
showSubmitButton: boolean;
|
showSubmitButton?: boolean;
|
||||||
|
|
||||||
resetFunc: () => Promise<void>;
|
resetFunc?: () => Promise<void>;
|
||||||
submitFunc: () => Promise<void>;
|
submitFunc?: () => Promise<void>;
|
||||||
transformDateFunc: (date: any) => string;
|
transformDateFunc?: (date: any) => string;
|
||||||
colon?: boolean;
|
colon?: boolean;
|
||||||
}
|
}
|
||||||
export interface FormSchema {
|
export interface FormSchema {
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ export interface BasicTableProps<T = any> {
|
||||||
// 使用搜索表单
|
// 使用搜索表单
|
||||||
useSearchForm?: boolean;
|
useSearchForm?: boolean;
|
||||||
// 表单配置
|
// 表单配置
|
||||||
formConfig?: FormProps;
|
formConfig?: Partial<FormProps>;
|
||||||
// 列配置
|
// 列配置
|
||||||
columns: BasicColumn[];
|
columns: BasicColumn[];
|
||||||
// 是否显示序号列
|
// 是否显示序号列
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue