From e534ca1298d1910c3f66d000cf6e6aab39086811 Mon Sep 17 00:00:00 2001 From: songjianet <1778651752@qq.com> Date: Mon, 18 Apr 2022 18:18:07 +0800 Subject: [PATCH] [Perf][UI Next][V1.0.0-Beta] Optimize judgment logic. (#9561) --- .../views/projects/task/components/node/detail-modal.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx b/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx index 257fc4ea01..875f85e467 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx @@ -118,9 +118,7 @@ const NodeDetailModal = defineComponent({ { text: t('project.node.instructions'), show: - taskType && !TASK_TYPES_MAP[taskType]?.helperLinkDisable - ? true - : false, + !!(taskType && !TASK_TYPES_MAP[taskType]?.helperLinkDisable), action: () => { const helpUrl = 'https://dolphinscheduler.apache.org/' + @@ -134,7 +132,7 @@ const NodeDetailModal = defineComponent({ }, { text: t('project.node.view_history'), - show: props.taskInstance ? true : false, + show: !!props.taskInstance, action: () => { router.push({ name: 'task-instance', @@ -145,7 +143,7 @@ const NodeDetailModal = defineComponent({ }, { text: t('project.node.view_log'), - show: props.taskInstance ? true : false, + show: !!props.taskInstance, action: () => { handleViewLog() },