diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/calculation.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/calculation.tsx index 5473e5b966..e8636033eb 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/calculation.tsx +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/calculation.tsx @@ -45,7 +45,7 @@ export default class extends Instruction { ['x-validator'](value, rules, { form }) { const { values } = form; const { evaluate } = evaluators.get(values.engine) as Evaluator; - const exp = value.trim().replace(/{{([^{}]+)}}/g, ' 1 '); + const exp = value.trim().replace(/{{([^{}]+)}}/g, ' "1" '); try { evaluate(exp); return ''; diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/condition.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/condition.tsx index 7d8158b68e..faa5818ff2 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/condition.tsx +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/condition.tsx @@ -409,7 +409,7 @@ export default class extends Instruction { ['x-validator'](value, rules, { form }) { const { values } = form; const { evaluate } = evaluators.get(values.engine); - const exp = value.trim().replace(/{{([^{}]+)}}/g, ' 1 '); + const exp = value.trim().replace(/{{([^{}]+)}}/g, ' "1" '); try { evaluate(exp); return '';