fix: form label and control style (#5580)
* fix: form label and control style * fix: empty label mark with required rules
This commit is contained in:
@@ -235,7 +235,9 @@ const [BaseForm, baseFormApi] = useVbenForm({
|
||||
default: () => ['我已阅读并同意'],
|
||||
};
|
||||
},
|
||||
rules: z.any().refine((v) => v, { message: '为什么不同意?勾上它!' }),
|
||||
rules: z
|
||||
.boolean()
|
||||
.refine((v) => v, { message: '为什么不同意?勾上它!' }),
|
||||
},
|
||||
{
|
||||
component: 'Mentions',
|
||||
@@ -266,7 +268,8 @@ const [BaseForm, baseFormApi] = useVbenForm({
|
||||
class: 'w-auto',
|
||||
},
|
||||
fieldName: 'switch',
|
||||
help: () => ['这是一个帮助信息', '第二行'].map((v) => h('p', () => v)),
|
||||
help: () =>
|
||||
['这是一个多行帮助信息', '第二行', '第三行'].map((v) => h('p', v)),
|
||||
label: '开关',
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user