fix: table search form slot not working as expected

This commit is contained in:
vben
2024-10-13 23:44:45 +08:00
parent 24d14c2841
commit ea962e75d0
10 changed files with 44 additions and 33 deletions

View File

@@ -204,7 +204,7 @@ async function init() {
'[Vben Vxe Table]: The formConfig in the grid is not supported, please use the `formOptions` props',
);
}
props.api?.setState?.({ gridOptions: defaultGridOptions });
// form 由 vben-form 代替所以需要保证query相关事件可以拿到参数
extendProxyOptions(props.api, defaultGridOptions, () => formApi.form.values);
}
@@ -267,7 +267,10 @@ onMounted(() => {
:key="slotName"
#[slotName]="slotProps"
>
<slot :name="slotName" v-bind="slotProps"></slot>
<slot
:name="`${FORM_SLOT_PREFIX}${slotName}`"
v-bind="slotProps"
></slot>
</template>
</Form>
</slot>