fix: form item style adjustment (#5694)
This commit is contained in:
parent
2d4ac33046
commit
feab6b3b30
@ -320,44 +320,41 @@ onUnmounted(() => {
|
|||||||
<VbenRenderContent :content="label" />
|
<VbenRenderContent :content="label" />
|
||||||
</template>
|
</template>
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<div class="w-full overflow-hidden">
|
<div class="flex-auto overflow-hidden">
|
||||||
<div :class="cn('relative flex w-full items-center', wrapperClass)">
|
<div :class="cn('relative flex w-full items-center', wrapperClass)">
|
||||||
<div class="flex-auto overflow-hidden p-[2px]">
|
<FormControl :class="cn(controlClass)">
|
||||||
<FormControl :class="cn(controlClass)">
|
<slot
|
||||||
<slot
|
v-bind="{
|
||||||
v-bind="{
|
...slotProps,
|
||||||
...slotProps,
|
...createComponentProps(slotProps),
|
||||||
...createComponentProps(slotProps),
|
disabled: shouldDisabled,
|
||||||
disabled: shouldDisabled,
|
isInValid,
|
||||||
isInValid,
|
}"
|
||||||
|
>
|
||||||
|
<component
|
||||||
|
:is="FieldComponent"
|
||||||
|
ref="fieldComponentRef"
|
||||||
|
:class="{
|
||||||
|
'border-destructive focus:border-destructive hover:border-destructive/80 focus:shadow-[0_0_0_2px_rgba(255,38,5,0.06)]':
|
||||||
|
isInValid,
|
||||||
}"
|
}"
|
||||||
|
v-bind="createComponentProps(slotProps)"
|
||||||
|
:disabled="shouldDisabled"
|
||||||
>
|
>
|
||||||
<component
|
<template
|
||||||
:is="FieldComponent"
|
v-for="name in renderContentKey"
|
||||||
ref="fieldComponentRef"
|
:key="name"
|
||||||
:class="{
|
#[name]="renderSlotProps"
|
||||||
'border-destructive focus:border-destructive hover:border-destructive/80 focus:shadow-[0_0_0_2px_rgba(255,38,5,0.06)]':
|
|
||||||
isInValid,
|
|
||||||
}"
|
|
||||||
v-bind="createComponentProps(slotProps)"
|
|
||||||
:disabled="shouldDisabled"
|
|
||||||
>
|
>
|
||||||
<template
|
<VbenRenderContent
|
||||||
v-for="name in renderContentKey"
|
:content="customContentRender[name]"
|
||||||
:key="name"
|
v-bind="{ ...renderSlotProps, formContext: slotProps }"
|
||||||
#[name]="renderSlotProps"
|
/>
|
||||||
>
|
</template>
|
||||||
<VbenRenderContent
|
<!-- <slot></slot> -->
|
||||||
:content="customContentRender[name]"
|
</component>
|
||||||
v-bind="{ ...renderSlotProps, formContext: slotProps }"
|
</slot>
|
||||||
/>
|
</FormControl>
|
||||||
</template>
|
|
||||||
<!-- <slot></slot> -->
|
|
||||||
</component>
|
|
||||||
</slot>
|
|
||||||
</FormControl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 自定义后缀 -->
|
<!-- 自定义后缀 -->
|
||||||
<div v-if="suffix" class="ml-1">
|
<div v-if="suffix" class="ml-1">
|
||||||
<VbenRenderContent :content="suffix" />
|
<VbenRenderContent :content="suffix" />
|
||||||
|
Loading…
Reference in New Issue
Block a user