From 72cfeb5d6d747a10cb492ebec6e09934e46b04b1 Mon Sep 17 00:00:00 2001
From: zs <zhousong@weben-smart.com>
Date: 周三, 07 5月 2025 09:06:58 +0800
Subject: [PATCH] Merge branch 'master' of http://222.71.245.114:9086/r/HIA24016N_PipeLineDemo
---
HIAWms/web/src/components/Icon/Icon.tsx | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/HIAWms/web/src/components/Icon/Icon.tsx b/HIAWms/web/src/components/Icon/Icon.tsx
new file mode 100644
index 0000000..5b5d157
--- /dev/null
+++ b/HIAWms/web/src/components/Icon/Icon.tsx
@@ -0,0 +1,37 @@
+import { computed, defineComponent } from 'vue'
+export default defineComponent({
+ name: '鍥炬爣',
+ props: {
+ icon: {
+ type: String,
+ default: '',
+ },
+ width: {
+ type: Number,
+ default: 12,
+ },
+ height: {
+ type: Number,
+ default: 12,
+ },
+ },
+ emits: ['click'],
+ setup(props, { attrs, slots, emit }) {
+ const imgUrl = computed(() => {
+ const imgName = props.icon
+ return new URL(`../../assets/images/${imgName}.png`, import.meta.url).href
+ })
+
+ return () => {
+ return (
+ <img
+ onClick={(evt: Event) => emit('click', evt)}
+ width={props.width}
+ height={props.height}
+ src={imgUrl.value}
+ {...attrs}
+ />
+ )
+ }
+ },
+})
--
Gitblit v1.9.3