This is an automated email from the ASF dual-hosted git repository.

liudongkai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new d8c32ab5c4 [Bug]Fix right-click menu function error (#9766)
d8c32ab5c4 is described below

commit d8c32ab5c4f0338ec55e9370e0a0fbeda0911382
Author: labbomb <[email protected]>
AuthorDate: Tue Apr 26 09:26:56 2022 +0800

    [Bug]Fix right-click menu function error (#9766)
    
    * The utils configuration files are centrally managed under common
    
    * fix Right-click menu function error
---
 .../workflow/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` }}
         >
-          <div
-            class={`${styles['menu-item']} ${
-              this.startReadonly ? styles['disabled'] : ''
-            } `}
+          <NButton
+            class={`${styles['menu-item']}`}
+            disabled={this.startReadonly}
             onClick={this.startRunning}
           >
             {t('project.node.start')}
-          </div>
-          <div
-            class={`${styles['menu-item']} ${
-              this.menuReadonly ? styles['disabled'] : ''
-            } `}
+          </NButton>
+          <NButton
+            class={`${styles['menu-item']}`}
+            disabled={this.menuReadonly}
             onClick={this.handleEdit}
           >
             {t('project.node.edit')}
-          </div>
-          <div
-            class={`${styles['menu-item']} ${
-              this.menuReadonly ? styles['disabled'] : ''
-            } `}
+          </NButton>
+          <NButton
+            class={`${styles['menu-item']}`}
+            disabled={this.menuReadonly}
             onClick={this.handleCopy}
           >
             {t('project.node.copy')}
-          </div>
-          <div
-            class={`${styles['menu-item']} ${
-              this.menuReadonly ? styles['disabled'] : ''
-            } `}
+          </NButton>
+          <NButton
+            class={`${styles['menu-item']}`}
+            disabled={this.menuReadonly}
             onClick={this.handleDelete}
           >
             {t('project.node.delete')}
-          </div>
+          </NButton>
           {this.taskInstance && (
-            <div class={`${styles['menu-item']}`} onClick={this.handleViewLog}>
+            <NButton class={`${styles['menu-item']}`} 
onClick={this.handleViewLog}>
               {t('project.node.view_log')}
-            </div>
+            </NButton>
           )}
         </div>
       )
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%;
   }
 }

Reply via email to