forked from drone/command-center-dashboard

zhongrj
2025-04-21 07360ad073b3fd82da76b7740cafc25518ca3e15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<template>
    <svg :class="['svg-icon']" aria-hidden="true">
        <use :xlink:href="`#icon-${name}`" />
    </svg>
</template>
 
<script setup>
const props = defineProps({
    name: { type: String, required: true }, // svg 图标名称
})
</script>
 
<style scoped lang="scss">
.svg-icon {
    width: 1em;
    height: 1em;
    color: #000;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
}
</style>