mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-03 00:02:28 +08:00
- 更新 avatar-image, badge, checkbox, input, switch 等组件 - 优化 dialog, pagination, select-item, tabs 等组件 - 调整 table-card, refresh-button 组件
28 lines
494 B
Vue
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>
|