Browse Source

工序、连线设置弹窗交互调整为右键

zhangxiaomu 1 năm trước cách đây
mục cha
commit
2d92b38517

+ 5 - 5
src/view/process/process-flow/config/ProcessConfig.js

@@ -494,9 +494,9 @@ export default class Process {
     })
     // endregion
 
-    // region 双击连接线进入编辑模式
-    this.graph.on('edge:dblclick', ({ cell, e }) => {
-      // console.log('edge:dblclick')
+    // region 右键连接线进入编辑模式
+    this.graph.on('edge:contextmenu', ({ cell, e }) => {
+      // console.log('edge:contextmenu')
       //设置值
       store.commit('setCurrentEdgeId', cell.id)
       //显示弹窗
@@ -505,8 +505,8 @@ export default class Process {
     // endregion
 
 
-    // region 双击工序进入编辑模式
-    this.graph.on('node:dblclick', ({ node, e }) => {
+    // region 右键工序进入编辑模式
+    this.graph.on('node:contextmenu', ({ node, e }) => {
       //如果双击的不是工序组,显示弹窗
       if (!node.data?.parent) {
         //设置值

+ 3 - 1
src/view/process/process-flow/process-setting.vue

@@ -882,7 +882,9 @@ export default {
 .fade-enter-active,.fade-leave-active {
   transition: all .2s;
 }
-
+.disable-hover {
+  pointer-events: none; /* 阻止鼠标事件 */
+}
 </style>