feat: add ProgressBar ProgressCircle and Meter
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
Label,
|
||||
Meter,
|
||||
MeterFill,
|
||||
MeterOutput,
|
||||
MeterTrack,
|
||||
} from "@heroui-vue/components";
|
||||
|
||||
const colors = ["default", "accent", "success", "warning", "danger"] as const;
|
||||
|
||||
const colorLabels: Record<(typeof colors)[number], string> = {
|
||||
accent: "强调",
|
||||
danger: "危险",
|
||||
default: "默认",
|
||||
success: "成功",
|
||||
warning: "警告",
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex w-64 flex-col gap-6">
|
||||
<Meter v-for="color in colors" :key="color" :color="color" :value="50">
|
||||
<Label>{{ colorLabels[color] }}</Label>
|
||||
<MeterOutput />
|
||||
<MeterTrack>
|
||||
<MeterFill />
|
||||
</MeterTrack>
|
||||
</Meter>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user