Commit 67d1f299 by Netfan Committed by GitHub

fix: renderComponentContent lose slot props data (#5466)

* 修复FormItem传递插槽时丢失插槽props的问题
1 parent cb7c0eca
...@@ -329,10 +329,14 @@ function autofocus() { ...@@ -329,10 +329,14 @@ function autofocus() {
v-bind="createComponentProps(slotProps)" v-bind="createComponentProps(slotProps)"
:disabled="shouldDisabled" :disabled="shouldDisabled"
> >
<template v-for="name in renderContentKey" :key="name" #[name]> <template
v-for="name in renderContentKey"
:key="name"
#[name]="renderSlotProps"
>
<VbenRenderContent <VbenRenderContent
:content="customContentRender[name]" :content="customContentRender[name]"
v-bind="slotProps" v-bind="{ ...renderSlotProps, $formContext: slotProps }"
/> />
</template> </template>
<!-- <slot></slot> --> <!-- <slot></slot> -->
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!