代码整理
This commit is contained in:
1 parent
6123323572
commit
374ce74e2d
4 files changed
+22
-148
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user