mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-05 19:41:40 +08:00
fix(util): 条件编译对应is与not实现对应value为false的情况出错
This commit is contained in:
parent
4bbde1a5f6
commit
33c8f8bf5a
@ -299,10 +299,10 @@ export const compiledNode = (
|
||||
export const compiledCond = (op: string, fieldValue: any, value: any, range: [number, number]): boolean => {
|
||||
switch (op) {
|
||||
case 'is':
|
||||
if (!fieldValue) return false;
|
||||
if (fieldValue !== value) return false;
|
||||
break;
|
||||
case 'not':
|
||||
if (fieldValue) return false;
|
||||
if (fieldValue === value) return false;
|
||||
break;
|
||||
case '=':
|
||||
if (fieldValue !== value) return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user