Browse Source

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

- 修正模板中 ref 属性的引用名称
pull/7150/head
Jin Mao 2 weeks ago
committed by GitHub
parent
commit
bb5d75bc7e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      packages/@core/ui-kit/form-ui/src/form-render/form.vue

8
packages/@core/ui-kit/form-ui/src/form-render/form.vue

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

Loading…
Cancel
Save