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";