Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/@core/ui-kit/form-ui/src/form-render/form-field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ onUnmounted(() => {
: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)]':
'border-destructive hover:border-destructive/80 focus:border-destructive focus:shadow-[0_0_0_2px_rgba(255,38,5,0.06)]':
isInValid,
}"
v-bind="createComponentProps(slotProps)"
Expand Down Expand Up @@ -367,7 +367,7 @@ onUnmounted(() => {
<CircleAlert
:class="
cn(
'text-foreground/80 hover:text-foreground inline-flex size-5 cursor-pointer',
'inline-flex size-5 cursor-pointer text-foreground/80 hover:text-foreground',
)
"
/>
Expand All @@ -381,10 +381,10 @@ onUnmounted(() => {
<div v-if="suffix" class="ml-1">
<VbenRenderContent :content="suffix" />
</div>
<FormDescription v-if="description" class="ml-1">
<VbenRenderContent :content="description" />
</FormDescription>
</div>
<FormDescription v-if="description" class="text-xs">
<VbenRenderContent :content="description" />
</FormDescription>

<Transition name="slide-up" v-if="!compact">
<FormMessage class="absolute" />
Expand Down
7 changes: 7 additions & 0 deletions playground/src/views/examples/form/basic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ const [BaseForm, baseFormApi] = useVbenForm({
label: '字符串',
rules: 'required',
},
{
component: 'Input',
fieldName: 'desc',
// 界面显示的description
description: '这是表单描述',
label: '字符串(带描述)',
},
{
// 组件需要在 #/adapter.ts内注册,并加上类型
component: 'ApiSelect',
Expand Down
Loading