Browse Source

禅道bug处理

master
suyanyan 1 month ago
parent
commit
b6386e988d
2 changed files with 2 additions and 4 deletions
  1. +1
    -2
      SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue
  2. +1
    -2
      SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue

+ 1
- 2
SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue View File

@@ -43,8 +43,7 @@ const sysUserProps = reactive<FormProps.Base<SysUserPersonnel.SysUserPerInfo>>({
disabled: false disabled: false
}); });
const checkAgeNumber = (rule: any, value: any, callback: any) => { const checkAgeNumber = (rule: any, value: any, callback: any) => {
if (value === "") callback("请输入年龄");
if (value > 100 || value < 0) {
if (value && (value > 100 || value <= 0)) {
callback(new Error("请输入正确的年龄(年龄范围1-100岁)")); callback(new Error("请输入正确的年龄(年龄范围1-100岁)"));
} else { } else {
return callback(); return callback();


+ 1
- 2
SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue View File

@@ -44,8 +44,7 @@ const sysUserProps = reactive<FormProps.Base<SysUserPersonnel.SysUserPerInfo>>({
disabled: false disabled: false
}); });
const checkAgeNumber = (rule: any, value: any, callback: any) => { const checkAgeNumber = (rule: any, value: any, callback: any) => {
if (value === "") callback("请输入年龄");
if (value > 100 || value < 0) {
if (value && (value > 100 || value <= 0)) {
callback(new Error("请输入正确的年龄(年龄范围1-100岁)")); callback(new Error("请输入正确的年龄(年龄范围1-100岁)"));
} else { } else {
return callback(); return callback();


Loading…
Cancel
Save