Browse Source

feat: 表达式检查

zhangweicheng 4 years ago
parent
commit
03c7b0a985
1 changed files with 1 additions and 0 deletions
  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){