From ab47d944eea8cbcf3e3d0e922b9f88a93cd15528 Mon Sep 17 00:00:00 2001 From: "X1627315083@163.com" <1627315083@qq.com> Date: Mon, 23 Mar 2026 15:26:41 +0800 Subject: [PATCH] =?UTF-8?q?svgicon=E6=96=87=E4=BB=B6=E8=AE=BE=E7=BD=AEname?= =?UTF-8?q?=E4=B8=8D=E6=98=AF=E5=BF=85=E7=A9=BF=E9=A1=B9=EF=BC=8C=E4=B8=BA?= =?UTF-8?q?=E4=BA=86=E8=A7=A3=E5=86=B3name=E4=BC=A0=E5=85=A5=20||?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SvgIcon/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/SvgIcon/index.vue b/src/components/SvgIcon/index.vue index 5b303ce..d30587b 100644 --- a/src/components/SvgIcon/index.vue +++ b/src/components/SvgIcon/index.vue @@ -15,7 +15,8 @@ import { computed } from "vue"; const props = defineProps({ name: { type: String, - required: true, + default: "", + // required: true, }, color: { type: String, @@ -30,7 +31,7 @@ const props = defineProps({ default: 'rem', } }); -const iconName = computed(() => `#icon-${props.name}`); +const iconName = computed(() => `#icon-${props?.name}`); const svgClass = computed(() => { if (props.name) return `svg-icon icon-${props.name}`; return "svg-icon";