feat: add CloseButton Avatar and Skeleton components
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
Avatar,
|
||||
AvatarGroup,
|
||||
AvatarGroupCount,
|
||||
AvatarImage,
|
||||
AvatarFallback,
|
||||
} from "@heroui-vue/components";
|
||||
import { IconUser } from "@tabler/icons-vue";
|
||||
|
||||
const assignees = [
|
||||
{
|
||||
id: 1,
|
||||
image:
|
||||
"https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg",
|
||||
name: "张明",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
image:
|
||||
"https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg",
|
||||
name: "李华",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
image:
|
||||
"https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/purple.jpg",
|
||||
name: "王芳",
|
||||
},
|
||||
] as const;
|
||||
</script>
|
||||
<template>
|
||||
<div
|
||||
class="inline-flex items-center gap-2.5 rounded-full border border-border/70 bg-surface/95 py-1 pr-3 pl-1 shadow-sm ring-1 ring-black/[0.04] dark:border-border/80 dark:bg-surface/90 dark:ring-white/10"
|
||||
>
|
||||
<AvatarGroup
|
||||
aria-label="指派人"
|
||||
class="[--avatar-group-overlap:0.7rem] [--avatar-group-seam:2px]"
|
||||
overlap="clip"
|
||||
role="group"
|
||||
size="sm"
|
||||
>
|
||||
<Avatar v-for="user in assignees" :key="user.id">
|
||||
<AvatarImage :alt="`${user.name} 的头像`" :src="user.image" />
|
||||
<AvatarFallback>{{ user.name.slice(0, 1) }}</AvatarFallback>
|
||||
</Avatar>
|
||||
<Avatar>
|
||||
<AvatarFallback>
|
||||
<IconUser aria-hidden="true" class="size-4 shrink-0" />
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<AvatarGroupCount>+3</AvatarGroupCount>
|
||||
</AvatarGroup>
|
||||
<span class="text-sm font-medium text-foreground">指派人</span>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user