From d8c32ab5c4f0338ec55e9370e0a0fbeda0911382 Mon Sep 17 00:00:00 2001 From: labbomb <739955946@qq.com> Date: Tue, 26 Apr 2022 09:26:56 +0800 Subject: [PATCH] [Bug]Fix right-click menu function error (#9766) * The utils configuration files are centrally managed under common * fix Right-click menu function error --- .../components/dag/dag-context-menu.tsx | 41 +++++++++---------- .../workflow/components/dag/menu.module.scss | 12 +----- 2 files changed, 20 insertions(+), 33 deletions(-) diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-context-menu.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-context-menu.tsx index 30eaee9cdf..20b966a50e 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-context-menu.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-context-menu.tsx @@ -23,6 +23,7 @@ import { useRoute } from 'vue-router' import styles from './menu.module.scss' import { uuid } from '@/common/common' import { IWorkflowTaskInstance } from './types' +import { NButton } from 'naive-ui' const props = { startReadonly: { @@ -126,42 +127,38 @@ export default defineComponent({ class={styles['dag-context-menu']} style={{ left: `${this.left}px`, top: `${this.top}px` }} > -
{t('project.node.start')} -
-
+ {t('project.node.edit')} -
-
+ {t('project.node.copy')} -
-
+ {t('project.node.delete')} -
+ {this.taskInstance && ( -
+ {t('project.node.view_log')} -
+ )} ) diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/menu.module.scss b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/menu.module.scss index 2d2ecad17c..b466175ec1 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/menu.module.scss +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/menu.module.scss @@ -26,18 +26,8 @@ .menu-item { padding: 5px 10px; border-bottom: solid 1px #f2f3f7; - cursor: pointer; color: rgb(89, 89, 89); font-size: 12px; - - &:hover:not(.disabled) { - color: #262626; - background-color: #f5f5f5; - } - - &.disabled { - cursor: not-allowed; - color: rgba(89, 89, 89, 0.4); - } + width: 100%; } }