1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| <!-- 图标组件 -->
| <template>
| <span v-if="icon" v-bind="containerAttrs">
| <Icon :icon="icon" />
| </span>
| </template>
|
| <script setup>
| import { Icon } from '@iconify/vue/offline'
| defineOptions({ name: 'ArtSvgIcon', inheritAttrs: false })
| defineProps({
| icon: { required: false }
| })
| const attrs = useAttrs()
| const containerAttrs = computed(() => ({
| ...attrs,
| class: ['art-svg-icon inline-flex shrink-0', attrs.class].filter(Boolean).join(' '),
| style: attrs.style
| }))
| </script>
|
|