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