@hoci/shared

v1.0.0

Published

[English](README.md) | 中文

Readme

@hoci/shared

English | 中文

hoci 生态共用的类型、组合式函数与工具。被 @hoci/core@hoci/components 使用;一般通过 hoci@hoci/core 间接使用,无需直接依赖本包。

安装

pnpm add @hoci/shared

依赖要求: Vue 3.3+、@vueuse/core 10.5+。

内容概览

| 类别 | 说明 | |------|------| | Composables | 如 useShowable — 弹窗、气泡等开关状态与回调。 | | Provides | 配置与依赖注入辅助。 | | Types | HookComponentShowableShowableStatusActivateEventElementLike 等共享类型。 | | Utils | 数组、DOM、类型判断(is)、RAF 等工具。 | | Constants | 共享常量。 | | define | 定义组件或选项的辅助。 |

使用方式

import type { Showable, ShowableStatus } from "@hoci/shared";
import { useShowable } from "@hoci/shared";

多数场景请使用 hoci@hoci/core;仅在需要底层类型或组合式且不想引入组件时再直接依赖 @hoci/shared

许可

MIT