fix: 修复表单展开无效 (#7148)

- 修正模板中 ref 属性的引用名称
This commit is contained in:
Jin Mao
2026-01-27 11:35:50 +08:00
committed by GitHub
parent 528395e2c3
commit bb5d75bc7e

View File

@@ -53,11 +53,7 @@ const wrapperClass = computed(() => {
provideFormRenderProps(props);
const {
isCalculated,
keepFormItemIndex,
wrapperRef: _wrapperRef,
} = useExpandable(props);
const { isCalculated, keepFormItemIndex, wrapperRef } = useExpandable(props);
const shapes = computed(() => {
const resultShapes: FormShape[] = [];
@@ -174,7 +170,7 @@ const computedSchema = computed(
<template>
<component :is="formComponent" v-bind="formComponentProps">
<div ref="_wrapperRef" :class="wrapperClass">
<div ref="wrapperRef" :class="wrapperClass">
<template v-for="cSchema in computedSchema" :key="cSchema.fieldName">
<!-- <div v-if="$slots[cSchema.fieldName]" :class="cSchema.formItemClass">
<slot :definition="cSchema" :name="cSchema.fieldName"> </slot>