mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-14 04:50:53 +08:00
fix(表单): 修复表单验证错误样式并统一规则
修复表单验证错误状态下的样式问题,包括输入框、选择器、时间选择器等组件的边框和阴影颜色。使用 CSS 变量统一错误阴影样式,提高可维护性。同时为演示表单的所有字段统一添加必填规则,并移除数字字段的冗余后缀配置。
This commit is contained in:
@@ -147,7 +147,6 @@ const [BaseForm, baseFormApi] = useVbenForm({
|
||||
},
|
||||
fieldName: 'number',
|
||||
label: '数字(带后缀)',
|
||||
suffix: () => '¥',
|
||||
},
|
||||
{
|
||||
component: 'IconPicker',
|
||||
@@ -279,6 +278,12 @@ const [BaseForm, baseFormApi] = useVbenForm({
|
||||
label: '范围选择器',
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
component: 'TimeRangePicker',
|
||||
fieldName: 'timeRangePicker',
|
||||
label: '时间范围选择器',
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
component: 'TimePicker',
|
||||
fieldName: 'timePicker',
|
||||
@@ -333,7 +338,10 @@ const [BaseForm, baseFormApi] = useVbenForm({
|
||||
fieldName: 'treeSelect',
|
||||
label: '树选择',
|
||||
},
|
||||
],
|
||||
].map((i) => ({
|
||||
...i,
|
||||
rules: 'required',
|
||||
})),
|
||||
// 大屏一行显示3个,中屏一行显示2个,小屏一行显示1个
|
||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user