From ca0eb856cb465bbe8cf20801b2370318b651cbe5 Mon Sep 17 00:00:00 2001 From: Junyi Date: Wed, 14 May 2025 11:08:55 +0800 Subject: [PATCH] fix(plugin-workflow): fix popup navigate back in task center (#6853) --- .../@nocobase/plugin-workflow/src/client/WorkflowPane.tsx | 2 +- .../plugin-workflow/src/client/WorkflowTasks.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowPane.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowPane.tsx index df95f309b57..83dbf3c4325 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowPane.tsx +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/WorkflowPane.tsx @@ -130,7 +130,7 @@ export function WorkflowPane() { const ctx = useContext(SchemaComponentContext); const { useTriggersOptions } = usePlugin(WorkflowPlugin); return ( - + { if (!visible) { - navigate(-1); + if (window.history.state.idx) { + navigate(-1); + } else { + navigate(`/admin/workflow/tasks/${taskType}/${status}`); + } } }} openMode="modal"