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/components/index.md.

组件

此文档将介绍所有在插件中可用的组件,以及它们的使用方法和区别。

基础组件库

我们为 Halo 的前端封装了一个基础组件的库,你可以在插件中使用这些组件。

安装方式:

pnpm install @halo-dev/components

在 Vue 组件中:

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

<template>
  <VButton>Hello</VButton>
</template>

所有可用的基础组件以及文档可查阅:https://halo-ui-components.halo-run.workers.dev

业务组件和指令

除了基础组件库,我们还为 Halo 的前端封装了一些业务组件和指令,这些组件已经在全局注册,你可以直接在插件中使用这些组件和指令。

以下是所有可用的业务组件和指令:

组件