feat: add Badge and Alert components

This commit is contained in:
maoyingjie
2026-10-21 21:32:40 +08:00
parent 3515a47f5e
commit 4f43789f60
41 changed files with 2422 additions and 17 deletions
@@ -0,0 +1,19 @@
<script setup lang="ts">
import { inject, useAttrs } from "vue";
import { badgeContextKey } from "./context";
defineOptions({ inheritAttrs: false });
const attrs = useAttrs();
const ctx = inject(badgeContextKey, undefined);
</script>
<template>
<span
v-bind="attrs"
:class="ctx?.slots.value.label()"
data-slot="badge-label"
>
<slot />
</span>
</template>