WANG 6 anos atrás
pai
commit
f4d1ae6688
1 arquivos alterados com 4 adições e 4 exclusões
  1. 4 4
      src/modules/examwork/view/onlineExam.vue

+ 4 - 4
src/modules/examwork/view/onlineExam.vue

@@ -665,9 +665,9 @@ let validateWarnThreshold = (rule, value, callback) => {
       }
     } else if (
       0 >= warnThreshold ||
-      !warnThreshold.toString().match(/^[1-9]\d*$/)
+      !warnThreshold.toString().match(/^[1-9]\d*|0$/)
     ) {
-      callback(new Error("只能是整数"));
+      callback(new Error("只能是非负整数"));
       if (!_this.toActiveName) {
         _this.toActiveName = "tab4";
         _this.activeName = "tab4";
@@ -691,9 +691,9 @@ let validateLivingWarnThreshold = (rule, value, callback) => {
       }
     } else if (
       0 >= livingWarnThreshold ||
-      !livingWarnThreshold.toString().match(/^[1-9]\d*$/)
+      !livingWarnThreshold.toString().match(/^[1-9]\d*|0$/)
     ) {
-      callback(new Error("只能是整数"));
+      callback(new Error("只能是非负整数"));
       if (!_this.toActiveName) {
         _this.toActiveName = "tab4";
         _this.activeName = "tab4";