mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-12-12 03:02:50 +00:00
fix(form): tabs组件子项配置了name后,配置生成的数据出错
This commit is contained in:
parent
738e8611a4
commit
b3ce1a3b93
@ -58,7 +58,13 @@
|
|||||||
: lastValues
|
: lastValues
|
||||||
"
|
"
|
||||||
:is-compare="isCompare"
|
:is-compare="isCompare"
|
||||||
:prop="config.dynamic ? `${prop}${prop ? '.' : ''}${String(tabIndex)}` : prop"
|
:prop="
|
||||||
|
config.dynamic
|
||||||
|
? `${prop}${prop ? '.' : ''}${String(tabIndex)}`
|
||||||
|
: tab.name
|
||||||
|
? `${prop}${prop ? '.' : ''}${tab.name}`
|
||||||
|
: prop
|
||||||
|
"
|
||||||
:size="size"
|
:size="size"
|
||||||
:label-width="tab.labelWidth || labelWidth"
|
:label-width="tab.labelWidth || labelWidth"
|
||||||
:expand-more="expandMore"
|
:expand-more="expandMore"
|
||||||
@ -88,6 +94,26 @@ type DiffCount = {
|
|||||||
[tabIndex: number]: number;
|
[tabIndex: number]: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
model: any;
|
||||||
|
lastValues?: any;
|
||||||
|
isCompare?: boolean;
|
||||||
|
config: TabConfig;
|
||||||
|
name: string;
|
||||||
|
size?: string;
|
||||||
|
labelWidth?: string;
|
||||||
|
prop?: string;
|
||||||
|
expandMore?: boolean;
|
||||||
|
disabled?: boolean;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
lastValues: () => ({}),
|
||||||
|
isCompare: false,
|
||||||
|
prop: '',
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
const tabPaneComponent = getDesignConfig('components')?.tabPane;
|
const tabPaneComponent = getDesignConfig('components')?.tabPane;
|
||||||
const tabsComponent = getDesignConfig('components')?.tabs;
|
const tabsComponent = getDesignConfig('components')?.tabs;
|
||||||
|
|
||||||
@ -118,25 +144,6 @@ const tabClick = (mForm: FormState | undefined, tab: any, props: any) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const props = withDefaults(
|
|
||||||
defineProps<{
|
|
||||||
model: any;
|
|
||||||
lastValues?: any;
|
|
||||||
isCompare?: boolean;
|
|
||||||
config: TabConfig;
|
|
||||||
name: string;
|
|
||||||
size?: string;
|
|
||||||
labelWidth?: string;
|
|
||||||
prop?: string;
|
|
||||||
expandMore?: boolean;
|
|
||||||
disabled?: boolean;
|
|
||||||
}>(),
|
|
||||||
{
|
|
||||||
lastValues: () => ({}),
|
|
||||||
isCompare: false,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
change: [v: any, eventData?: ContainerChangeEventData];
|
change: [v: any, eventData?: ContainerChangeEventData];
|
||||||
addDiffCount: [];
|
addDiffCount: [];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user