mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-04-05 19:41:59 +08:00
31 lines
528 B
Vue
31 lines
528 B
Vue
<script setup lang="ts">
|
|
import { Icon } from '@iconify/vue'
|
|
|
|
interface iconPorps {
|
|
/* 图标名称 */
|
|
icon?: string
|
|
/* 图标颜色 */
|
|
color?: string
|
|
/* 图标大小 */
|
|
size?: number
|
|
/* 图标深度 */
|
|
depth?: 1 | 2 | 3 | 4 | 5
|
|
}
|
|
const props = withDefaults(defineProps<iconPorps>(), {
|
|
size: 18,
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<n-icon
|
|
v-if="props.icon"
|
|
:size="props.size"
|
|
:depth="props.depth"
|
|
:color="props.color"
|
|
>
|
|
<Icon :icon="props.icon" />
|
|
</n-icon>
|
|
</template>
|
|
|
|
<style scoped></style>
|