From 4db3b283b08840f675a59665316b23d5a30f97c6 Mon Sep 17 00:00:00 2001 From: Junyi Date: Fri, 28 Apr 2023 13:50:35 +0700 Subject: [PATCH] fix(evaluators): fix date result in variable (#1781) --- .../schema-component/antd/variable/Input.tsx | 10 +++++----- .../src/server/__tests__/index.test.ts | 9 +++++++++ packages/core/evaluators/src/utils/index.ts | 4 ++++ packages/plugins/workflow/src/server/Plugin.ts | 6 +++--- .../__tests__/instructions/calculation.test.ts | 18 ++++++++++++++++++ .../workflow/src/server/functions/index.ts | 6 +++++- 6 files changed, 44 insertions(+), 9 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/variable/Input.tsx b/packages/core/client/src/schema-component/antd/variable/Input.tsx index c007b4e32..4607cb80f 100644 --- a/packages/core/client/src/schema-component/antd/variable/Input.tsx +++ b/packages/core/client/src/schema-component/antd/variable/Input.tsx @@ -36,7 +36,7 @@ const ConstantTypes = { string: { label: `{{t("String")}}`, value: 'string', - component({ onChange, value }) { + component: function StringComponent({ onChange, value }) { return onChange(ev.target.value)} />; }, default: '', @@ -44,7 +44,7 @@ const ConstantTypes = { number: { label: '{{t("Number")}}', value: 'number', - component({ onChange, value }) { + component: function NumberComponent({ onChange, value }) { return ; }, default: 0, @@ -52,7 +52,7 @@ const ConstantTypes = { boolean: { label: `{{t("Boolean")}}`, value: 'boolean', - component: function Com({ onChange, value }) { + component: function BooleanComponent({ onChange, value }) { const { t } = useTranslation(); return (