mirror of
https://github.com/vastxie/99AI.git
synced 2026-02-08 23:24:27 +08:00
v4.3.0
This commit is contained in:
21
admin/src/components/IconifyIcon/index.vue
Normal file
21
admin/src/components/IconifyIcon/index.vue
Normal file
@@ -0,0 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
import { Icon } from '@iconify/vue';
|
||||
import { computed, useAttrs } from 'vue';
|
||||
|
||||
interface Props {
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
defineProps<Props>();
|
||||
|
||||
const attrs = useAttrs();
|
||||
|
||||
const bindAttrs = computed<{ class: string; style: string }>(() => ({
|
||||
class: (attrs.class as string) || '',
|
||||
style: (attrs.style as string) || 'width: 2em, height: 2em',
|
||||
}));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Icon icon="icon" v-bind="bindAttrs" />
|
||||
</template>
|
||||
Reference in New Issue
Block a user