Explorar o código

feat: 表达式检查

zhangweicheng %!s(int64=4) %!d(string=hai) anos
pai
achega
03c7b0a985
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      web/building_saas/main/js/views/quantity_edit_view.js

+ 1 - 0
web/building_saas/main/js/views/quantity_edit_view.js

@@ -197,6 +197,7 @@ let quantityEditObj = {
                 let exp = new Expression('');
                 exp.Expression(evalString);
                 value = Number(exp.Evaluate());
+                if(isNaN(value)) throw new Error("输入的表达式有误");
             }
             return value;
         }catch (error){