From d36b9e366aeb54fc4f7d91d3113a9ae97870eaa5 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Wed, 19 Jul 2023 10:13:20 +0800 Subject: [PATCH] fix: linkage failed with current date variable (#2272) * fix: linkage failed with current date variable * fix: linkage failed with current date variable --- .../core/client/src/schema-component/common/utils/uitls.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/common/utils/uitls.tsx b/packages/core/client/src/schema-component/common/utils/uitls.tsx index 08de6e497..392ef7c08 100644 --- a/packages/core/client/src/schema-component/common/utils/uitls.tsx +++ b/packages/core/client/src/schema-component/common/utils/uitls.tsx @@ -122,7 +122,8 @@ function getAllKeys(obj) { return keys; } -export const conditionAnalyse = (rules, values) => { +export const conditionAnalyse = (rules, scope) => { + const values = { ...scope, now: new Date() }; const type = Object.keys(rules)[0] || '$and'; const conditions = rules[type]; const results = conditions.map((c) => {