task-247(admin.html观感对齐): 行内工具组件化(状态药丸/复制文本/掩码揭示复用 secret-mask)

This commit is contained in:
2026-09-05 20:59:54 +08:00
parent 8b0bf3d563
commit f7ad99deda
6 changed files with 256 additions and 0 deletions
@@ -0,0 +1,25 @@
<script setup lang="ts">
import { computed } from 'vue'
import { pillToneStyle, type PillTone } from './status-pill-model'
const props = withDefaults(defineProps<{ text: string; tone?: PillTone }>(), { tone: 'info' })
const style = computed(() => pillToneStyle(props.tone))
</script>
<template>
<span class="status-pill" :style="{ color: style.text, background: style.bg }">{{ text }}</span>
</template>
<style scoped>
.status-pill {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 62px;
padding: 2px 10px;
border-radius: 999px;
font-size: 12px;
line-height: 1.7;
white-space: nowrap;
}
</style>