提交 5a6db8c6 编写于 作者: V vben

fix(table): fix table actionColOptions not work

上级 f96d6b22
......@@ -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<ColEx>, itemColSum = 0, isLastAction = false) {
......
......@@ -71,8 +71,8 @@ export default defineComponent({
const advancedSpanObj = showAdvancedButton ? { span: actionSpan < 6 ? 24 : actionSpan } : {};
const actionColOpt: Partial<ColEx> = {
span: showAdvancedButton ? 6 : 4,
...actionColOptions,
...advancedSpanObj,
...actionColOptions,
};
return actionColOpt;
});
......
......@@ -48,7 +48,7 @@ export interface FormProps {
// 空白行span
emptySpan?: number | Partial<ColEx>;
// 表单内部组件大小
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<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>;
submitFunc: () => Promise<void>;
transformDateFunc: (date: any) => string;
resetFunc?: () => Promise<void>;
submitFunc?: () => Promise<void>;
transformDateFunc?: (date: any) => string;
colon?: boolean;
}
export interface FormSchema {
......
......@@ -94,7 +94,7 @@ export interface BasicTableProps<T = any> {
// 使用搜索表单
useSearchForm?: boolean;
// 表单配置
formConfig?: FormProps;
formConfig?: Partial<FormProps>;
// 列配置
columns: BasicColumn[];
// 是否显示序号列
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册