错误表达式校验错误

pull/451/MERGE
ChenX 5 years ago
parent d7f420d4d8
commit de9dbb3e2c

@ -96,7 +96,7 @@ export namespace CheckoutValid
{
case "calcHeight":
case "calcWidth":
if (!operationExpReg.test(v.replace(/["H"|"L"|]/, "1")))
if (isNaN(safeEval(v, { L: 1, H: 1, W: 1 })))
return "表达式错误";
return "";
case "name":
@ -140,7 +140,7 @@ export namespace CheckoutValid
{
case "ljgPos":
case "woodPinPos":
if (!operationExpReg.test(v.replace(/["H"|"L"|]/, "1")))
if (isNaN(safeEval(v, { L: 1, H: 1, W: 1 })))
return "表达式错误";
return "";
case "name":
@ -287,7 +287,7 @@ export namespace CheckoutValid
switch (k)
{
case "calcDepth":
if (!operationExpReg.test(v.replace(/["H"|"L"|]/, "1")))
if (isNaN(safeEval(v, { L: 1, H: 1, W: 1 })))
return "表达式错误";
return "";
case "heightCount":

Loading…
Cancel
Save