Merge b751c7e3f0663a331ec9b0daac4795fb3598bcd8 into b72f4dae28961fd8246101998a2f4e78775dd996

This commit is contained in:
undefined 2025-06-06 19:38:26 +08:00 committed by GitHub
commit 82846c5e59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -15,6 +15,7 @@
:config="config"
:prop="prop"
:index="index"
:expand="item.expand"
:label-width="labelWidth"
:size="size"
:disabled="disabled"

View File

@ -133,7 +133,8 @@ const props = defineProps<{
const emit = defineEmits(['swap-item', 'remove-item', 'change', 'addDiffCount', 'copy-item']);
const mForm = inject<FormState | undefined>('mForm');
const expand = ref(props.config.expandAll || !props.index);
// const expand = ref(props.config.expandAll || !props.index);
const expand = ref(props.config.expandAll ||props.model.expand); //
const rowConfig = computed(() => ({
type: 'row',
@ -164,11 +165,14 @@ const itemExtra = computed(() => filterFunction(mForm, props.config.itemExtra, p
const removeHandler = () => emit('remove-item', props.index);
const changeHandler = (v: any, eventData: ContainerChangeEventData) => {
props.model.expand=expand.value;
emit('change', props.model, eventData);
};
const expandHandler = () => {
expand.value = !expand.value;
props.model.expand=expand.value;
emit('change', props.model);
};
//