Browse Source

提示框无法v-if

CzRger 3 months ago
parent
commit
697dbb4d7b
1 changed files with 4 additions and 6 deletions
  1. 4 6
      src/views/workflow/chart/node-port.vue

+ 4 - 6
src/views/workflow/chart/node-port.vue

@@ -13,8 +13,8 @@
         minWidth: 0,
       }">
       <template #reference>
-        <template v-if="state.active">
-          <div class="node-port-operation">
+        <div class="w-full h-full">
+          <div class="node-port-operation" v-show="state.active">
             <ElTooltip
               placement="top"
               effect="light"
@@ -26,12 +26,10 @@
               </div>
             </ElTooltip>
           </div>
-        </template>
-        <template v-else>
-          <div class="node-port-operation-normal">
+          <div class="node-port-operation-normal" v-show="!state.active">
             <div/>
           </div>
-        </template>
+        </div>
       </template>
       <div class="node-add">
         <div class="node-add-item __hover" @click="onAddNode(NodeType.Test)">{{ NodeTypeObj[NodeType.Test].title }}</div>