For AI agents: the complete documentation index is available at https://docs.halo.run/llms.txt, the full documentation bundle is available at https://docs.halo.run/llms-full.txt, and this page is available as Markdown at https://docs.halo.run/developer-guide/plugin/api-reference/ui/base-components/status.md.

VStatusDot 状态点

VStatusDot 用一个小圆点表示状态,常用于展示插件、服务器或任务的运行情况。

引入

import { VStatusDot } from "@halo-dev/components";

示例

不同状态

<script lang="ts" setup>
import { VSpace, VStatusDot } from "@halo-dev/components";
</script>

<template>
  <VSpace>
    <VStatusDot state="default" text="未知" />
    <VStatusDot state="success" text="运行中" />
    <VStatusDot state="warning" text="有警告" />
    <VStatusDot state="error" text="已停止" />
  </VSpace>
</template>

动画效果

<script lang="ts" setup>
import { VStatusDot } from "@halo-dev/components";
</script>

<template>
  <VStatusDot state="success" animate text="正在运行" />
</template>

自定义文字

<script lang="ts" setup>
import { VStatusDot } from "@halo-dev/components";
</script>

<template>
  <VStatusDot state="warning">
    <template #text>
      <span class="text-xs text-orange-500">磁盘空间不足</span>
    </template>
  </VStatusDot>
</template>

Props

属性类型默认值说明
state"default" | "success" | "warning" | "error""success"状态类型
animatebooleanfalse是否显示呼吸动画
textstringundefined状态文字

Slots

插槽说明
text自定义状态文字