|
@@ -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";
|