Showing
1 changed file
with
15 additions
and
1 deletions
| @@ -65,8 +65,22 @@ export const formSchema: FormSchema[] = [ | @@ -65,8 +65,22 @@ export const formSchema: FormSchema[] = [ | ||
| 65 | label: t('routes.common.common.sort'), //排序 | 65 | label: t('routes.common.common.sort'), //排序 |
| 66 | component: 'InputNumber', | 66 | component: 'InputNumber', |
| 67 | required: true, | 67 | required: true, |
| 68 | + dynamicRules: () => { | ||
| 69 | + return [ | ||
| 70 | + { | ||
| 71 | + required: true, | ||
| 72 | + validator: (_, value) => { | ||
| 73 | + if (Number(value) < -2147483648 || Number(value) > 2147483647) { | ||
| 74 | + return Promise.reject('取值范围是-2147483648到2147483647'); | ||
| 75 | + } | ||
| 76 | + return Promise.resolve(); | ||
| 77 | + }, | ||
| 78 | + }, | ||
| 79 | + ]; | ||
| 80 | + }, | ||
| 68 | componentProps: { | 81 | componentProps: { |
| 69 | - maxLength: 32, | 82 | + min: -2147483648, |
| 83 | + max: 2147483647, | ||
| 70 | }, | 84 | }, |
| 71 | }, | 85 | }, |
| 72 | { | 86 | { |