Files
Aether/frontend/src/components/ui/avatar-image.vue
fawney19 44e7117d4a refactor(frontend): 优化 UI 基础组件
- 更新 avatar-image, badge, checkbox, input, switch 等组件
- 优化 dialog, pagination, select-item, tabs 等组件
- 调整 table-card, refresh-button 组件
2025-12-12 16:15:07 +08:00

28 lines
494 B
Vue

<script setup lang="ts">
import { AvatarImage as AvatarImagePrimitive } from 'radix-vue'
import { cn } from '@/lib/utils'
import { computed } from 'vue'
interface Props {
class?: string
src?: string
alt: string
}
const props = withDefaults(defineProps<Props>(), {
alt: ''
})
const imageClass = computed(() =>
cn('aspect-square h-full w-full', props.class)
)
</script>
<template>
<AvatarImagePrimitive
:class="imageClass"
:src="src || ''"
:alt="alt"
/>
</template>