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/loading.md.

VLoading 加载中

VLoading 显示一个居中的加载动画,用于数据加载中的占位。

引入

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

示例

基础用法

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

<template>
  <VLoading />
</template>

在容器中使用

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

<template>
  <div class="flex h-40 items-center justify-center rounded-base bg-gray-50">
    <VLoading />
  </div>
</template>

VLoading 没有属性、事件和插槽,大小由所在容器决定。