|
|
@@ -9,6 +9,7 @@
|
|
|
import { Position } from '@vue-flow/core'
|
|
|
import CanvasHandle from '../handles/CanvasHandle.vue'
|
|
|
import { Icon } from '@repo/ui'
|
|
|
+import NodeToolbar from "../node-tool-bar/index.vue";
|
|
|
|
|
|
import type { NodeProps } from '@vue-flow/core'
|
|
|
import type { IWorkflowNode } from '../../../Interface'
|
|
|
@@ -32,12 +33,16 @@ const methodColors: Record<string, string> = {
|
|
|
|
|
|
<template>
|
|
|
<div
|
|
|
- class="relative min-w-[240px] transition-all duration-300 ease-out hover:-translate-y-0.5"
|
|
|
+ class="relative min-w-[240px] node-http transition-all duration-300 ease-out hover:-translate-y-0.5"
|
|
|
:class="{ 'scale-105': selected }"
|
|
|
>
|
|
|
+ <div class="tool-bar absolute -top-10 right-0 h-7 pb-1 transition-all duration-300 ease-out">
|
|
|
+ <NodeToolbar />
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- 节点主体 -->
|
|
|
<div
|
|
|
- class="bg-gradient-to-br from-white to-blue-50 border-2 rounded-xl shadow-md transition-all duration-300 relative overflow-hidden"
|
|
|
+ class="bg-gradient-to-br from-white to-blue-50 border-2 rounded-xl shadow-md transition-all duration-300 relative overflow-hidden"
|
|
|
:class="
|
|
|
selected
|
|
|
? 'border-blue-500 shadow-blue-200 shadow-lg'
|
|
|
@@ -152,4 +157,13 @@ const methodColors: Record<string, string> = {
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<style scoped lang="less"></style>
|
|
|
+<style scoped lang="less">
|
|
|
+.tool-bar{
|
|
|
+ //display: none;
|
|
|
+}
|
|
|
+.node-http:hover{
|
|
|
+ .tool-bar{
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|