docs: demo注释修改

master^2
allen 2026-04-15 14:54:40 +08:00
parent d69455e8ef
commit ec9b323195
1 changed files with 2 additions and 9 deletions

View File

@ -28,8 +28,6 @@ function getNumberValidator(key: string, limit?: [number?, number?]) {
invalid_type_error: `${key} 值只能为数字`,
});
// validator.default(null);
if (limit) {
if (limit[0] !== undefined) {
validator = validator.min(limit[0], {
@ -43,6 +41,7 @@ function getNumberValidator(key: string, limit?: [number?, number?]) {
}
}
// zod-defaultnull,null,0,resetrulesvee-validate
return validator.default(null);
}
@ -128,18 +127,12 @@ const [BaseForm, baseFormApi] = useVbenForm({
showDefaultActions: false,
//
commonConfig: {
// label
colon: true,
//
componentProps: {
class: 'w-full',
},
},
fieldMappingTime: [['rangePicker', ['startTime', 'endTime'], 'YYYY-MM-DD']],
//
handleSubmit: onSubmit,
// labelinputvertical
// labelinput
layout: 'vertical',
schema: [
{
@ -182,6 +175,7 @@ const [BaseForm, baseFormApi] = useVbenForm({
};
},
trigger(values, __, controller) {
// 访 form VbenCollapsibleParams
const paramsRef =
controller.getFieldComponentRef<typeof VbenCollapsibleParams>(
'params',
@ -227,7 +221,6 @@ const [BaseForm, baseFormApi] = useVbenForm({
defaultCollapsed: false, // false
},
],
// 321
wrapperClass: 'grid-cols-12',
});