소스 검색

[Perf][UI Next][V1.0.0-Beta] Optimize judgment logic. (#9561)

songjianet 3 년 전
부모
커밋
e534ca1298
1개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 5
      dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx

+ 3 - 5
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()
           },