|
@@ -14,7 +14,7 @@
|
|
|
}">
|
|
|
<template #reference>
|
|
|
<div class="w-full h-full">
|
|
|
- <div class="node-port-operation" v-show="state.active">
|
|
|
+ <div class="node-port-operation" v-show="state.active && !state.isDelay">
|
|
|
<ElTooltip
|
|
|
placement="top"
|
|
|
effect="light"
|
|
@@ -26,7 +26,7 @@
|
|
|
</div>
|
|
|
</ElTooltip>
|
|
|
</div>
|
|
|
- <div class="node-port-operation-normal" v-show="!state.active">
|
|
|
+ <div class="node-port-operation-normal" v-show="!state.active && !state.isDelay">
|
|
|
<div/>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -37,7 +37,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import {getCurrentInstance, inject, onMounted, reactive, ref, watch} from "vue";
|
|
|
+import {getCurrentInstance, inject, nextTick, onMounted, reactive, ref, watch} from "vue";
|
|
|
import { ElPopover, ElTooltip } from 'element-plus';
|
|
|
import {getNodeDefault} from "@/views/workflow/config";
|
|
|
import {GraphHistoryStep, NodeType, NodeTypeObj} from "@/views/workflow/types";
|
|
@@ -53,7 +53,8 @@ const props = defineProps({
|
|
|
})
|
|
|
const {proxy}: any = getCurrentInstance()
|
|
|
const state: any = reactive({
|
|
|
- active: false
|
|
|
+ active: false,
|
|
|
+ isDelay: true
|
|
|
})
|
|
|
const onAddNode = ({type}) => {
|
|
|
const node = getNodeDefault(type)
|
|
@@ -105,6 +106,10 @@ onMounted(() => {
|
|
|
props.node.on('change:attrs', () => {
|
|
|
state.active = props.node.getAttrByPath('hover') || props.node.getAttrByPath('select')
|
|
|
})
|
|
|
+ // 新增的时候,添加延时,避免初始化后自适应位置时的明显拖尾效果
|
|
|
+ setTimeout(() => {
|
|
|
+ state.isDelay = false
|
|
|
+ }, 100)
|
|
|
})
|
|
|
</script>
|
|
|
|