代码整理

This commit is contained in:
ChenXinXin committed 2024-05-20 13:45:23 +08:00
1 parent 6123323572
commit 374ce74e2d
4 files changed
+22 -148

No files matched your search

+19 -2
View File
@@ -505,8 +505,25 @@ Vue.component("create-task-drawer", {
break;
case 'number':
if(condition.express != 'between'){
// TODO:改掉eval
isMatch[index] = eval(Number(answer) + condition.express + condition.option)
switch (condition.express) {
case '<':
isMatch[index] = Number(answer) < condition.option
break;
case '<=':
isMatch[index] = Number(answer) <= condition.option
break;
case '==':
isMatch[index] = Number(answer) == condition.option
break;
case '>=':
isMatch[index] = Number(answer) >= condition.option
break;
case '>':
isMatch[index] = Number(answer) > condition.option
break;
default:
break;
}
}else{
if(condition.option.begin <= Number(answer) && Number(answer) <= condition.option.end){
isMatch[index] = true