吉安感知网项目-前端
shuishen
6 days ago 6e88705bd5b443a259b24c17c8a299765d059d96
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<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;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
}
</style>