From 8a2fbd205e9b5b080a5bb33ba17984b896a6e442 Mon Sep 17 00:00:00 2001 From: Amy0104 <97265214+Amy0104@users.noreply.github.com> Date: Thu, 14 Apr 2022 14:09:40 +0800 Subject: [PATCH] [Fix][Next-UI] Fix the jumping problem of close button on dag page. (#9494) --- .../workflow/components/dag/dag-toolbar.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-toolbar.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-toolbar.tsx index 199f5ad5b1..4ff8c2cb4e 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-toolbar.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-toolbar.tsx @@ -140,7 +140,22 @@ export default defineComponent({ * Back to the entrance */ const onClose = () => { - router.go(-1) + if (history.state.back !== '/login') { + router.go(-1) + return + } + if (history.state.current.includes('workflow/definitions')) { + router.push({ + path: `/projects/${route.params.projectCode}/workflow-definition` + }) + return + } + if (history.state.current.includes('workflow/instances')) { + router.push({ + path: `/projects/${route.params.projectCode}/workflow/instances` + }) + return + } } /**