From e304a37b37d9b095becdf3cffce3ff78dec4d1d2 Mon Sep 17 00:00:00 2001 From: xingyu Date: Sun, 24 Sep 2023 19:56:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A7=A3=E5=86=B3Form=E7=BB=84?= =?UTF-8?q?=E4=BB=B6slot=E5=BF=85=E9=A1=BB=E4=BC=A0=E9=80=92component?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=89=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Form/src/components/FormItem.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Form/src/components/FormItem.vue b/src/components/Form/src/components/FormItem.vue index 5f5b3c7..0ef96fd 100644 --- a/src/components/Form/src/components/FormItem.vue +++ b/src/components/Form/src/components/FormItem.vue @@ -140,7 +140,8 @@ export default defineComponent({ const { rulesMessageJoinLabel: globalRulesMessageJoinLabel } = props.formProps const joinLabel = Reflect.has(props.schema, 'rulesMessageJoinLabel') ? rulesMessageJoinLabel : globalRulesMessageJoinLabel - const defaultMsg = `${createPlaceholderMessage(component)}${joinLabel ? label : ''}` + const assertLabel = joinLabel ? label : '' + const defaultMsg = component ? createPlaceholderMessage(component) + assertLabel : assertLabel function validator(rule: any, value: any) { const msg = rule.message || defaultMsg @@ -354,8 +355,8 @@ export default defineComponent({ } return () => { - const { colProps = {}, colSlot, renderColContent, component } = props.schema - if (!componentMap.has(component)) + const { colProps = {}, colSlot, renderColContent, component, slot } = props.schema + if (!componentMap.has(component) && !slot) return null const { baseColProps = {} } = props.formProps