From 85be4085b8a02486417e928e2852d336a99397b0 Mon Sep 17 00:00:00 2001 From: zhanghao <774378400@qq.com> Date: Wed, 17 Dec 2025 14:29:32 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=8A=A0=E8=BD=BD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/flow/components/NodeTitle.vue | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/views/flow/components/NodeTitle.vue b/src/views/flow/components/NodeTitle.vue index f2fb739..49871c7 100644 --- a/src/views/flow/components/NodeTitle.vue +++ b/src/views/flow/components/NodeTitle.vue @@ -2,7 +2,7 @@
- +
{{ nodeName }} @@ -76,6 +76,7 @@ import { ref } from 'vue' import { EditPen, Select, CloseBold, Delete, ZoomOut, ZoomIn, VideoPlay } from '@element-plus/icons-vue' import { ElMessageBox } from 'element-plus' +import { computed } from 'vue' const props = defineProps({ icon: { @@ -170,6 +171,23 @@ const handleInputKeydown = (e) => { e.returnValue = true; // 允许默认粘贴行为 } } +// const svgModules = import.meta.glob('../icon/*.svg', { eager: true }); +// console.log('svgModules', svgModules) +// const imageUrl = computed(async () => { +// if (props.icon && props.icon.startsWith('/src/')) { +// const modules = await import(`${props.icon}`); +// console.log('modules', modules) +// return modules.default + +// } else { +// return props.icon; +// } +// }) + +const imageUrl = () => { + console.log('props.icon', props.icon) + return new URL(props.icon, import.meta.url).href; +}