From 4476b86b4e38823c40e6c018d9c01868ef969a10 Mon Sep 17 00:00:00 2001 From: Junyi Date: Sat, 14 May 2022 12:07:10 +0800 Subject: [PATCH] fix(plugin-workflow): fix node type title in drawers (#389) --- packages/core/client/src/workflow/nodes/index.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/core/client/src/workflow/nodes/index.tsx b/packages/core/client/src/workflow/nodes/index.tsx index c5ab2a534..8e84c1bde 100644 --- a/packages/core/client/src/workflow/nodes/index.tsx +++ b/packages/core/client/src/workflow/nodes/index.tsx @@ -165,14 +165,13 @@ export function NodeDefaultView(props) { const { data, children } = props; const instruction = instructions.get(data.type); const detailText = workflow.executed ? '{{t("View")}}' : '{{t("Configure")}}'; - const typeText = compile(instruction.title); return (
- {typeText} + {compile(instruction.title)}

{data.title} @@ -195,9 +194,9 @@ export function NodeDefaultView(props) { type: 'primary', }, properties: { - drawer: { + [instruction.type]: { type: 'void', - title: typeText, + title: instruction.title, 'x-component': 'Action.Drawer', 'x-decorator': 'Form', 'x-decorator-props': {