mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(form): 函数配置中添加config参数
This commit is contained in:
parent
eae9725ccb
commit
7ad80e848f
@ -476,7 +476,7 @@ export default defineComponent({
|
||||
}
|
||||
emit('select', selection, row);
|
||||
if (typeof props.config.onSelect === 'function') {
|
||||
props.config.onSelect(mForm, { selection, row });
|
||||
props.config.onSelect(mForm, { selection, row, config: props.config });
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -59,12 +59,12 @@ const tabClickHandler = (mForm: FormState | undefined, tab: any, props: any) =>
|
||||
tab.name = tab.paneName;
|
||||
|
||||
if (typeof config.onTabClick === 'function') {
|
||||
config.onTabClick(mForm, tab, { model, formValue: mForm?.values, prop });
|
||||
config.onTabClick(mForm, tab, { model, formValue: mForm?.values, prop, config });
|
||||
}
|
||||
|
||||
const tabConfig = config.items.find((item: TabPaneConfig) => tab.name === item.status);
|
||||
if (tabConfig && typeof tabConfig.onTabClick === 'function') {
|
||||
tabConfig.onTabClick(mForm, tab, { model, formValue: mForm?.values, prop });
|
||||
tabConfig.onTabClick(mForm, tab, { model, formValue: mForm?.values, prop, config });
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -547,6 +547,7 @@ export interface ColumnConfig extends FormItem, ContainerCommonConfig {
|
||||
label: string;
|
||||
width: string | number;
|
||||
sortable: boolean;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user