27 lines
653 B
Vue
27 lines
653 B
Vue
<script setup lang="ts">
|
|
import {
|
|
Avatar,
|
|
AvatarImage,
|
|
AvatarFallback,
|
|
Badge,
|
|
BadgeAnchor,
|
|
} from "@heroui-vue/components";
|
|
|
|
const AVATAR_URL =
|
|
"https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg";
|
|
|
|
const colors = ["accent", "success", "warning", "danger"] as const;
|
|
</script>
|
|
|
|
<template>
|
|
<div class="flex items-center gap-6">
|
|
<BadgeAnchor v-for="color in colors" :key="color">
|
|
<Avatar>
|
|
<AvatarImage alt="头像" :src="AVATAR_URL" />
|
|
<AvatarFallback>JD</AvatarFallback>
|
|
</Avatar>
|
|
<Badge :color="color" placement="bottom-right" size="sm" />
|
|
</BadgeAnchor>
|
|
</div>
|
|
</template>
|