@hy-app/ui

📱一款使用 Vue3 + Ts 构建、面向 uni‑app 的跨端组件库。现已封装八十余款高质量业务组件,完整兼容小程序、H5、App‑plus 等多端环境;支持灵活的主题定制、样式变量覆盖,内置完善的国际化方案
4,277
Install
npm install @hy-app/ui
Latest Version:1.0.6
License:MIT
Last Updated:Oct 21, 2026
Links: npm
Maintainer: gaoxianhua

支持平台

APP(vue) H5(网页版) 微信小程序 支付宝小程序
✔ ✔ ✔ ✔

📖 在线文档

📱 移动端预览

安装教程

# 安装组件库(仅支持 Vue 3 + UniApp + TypeScript 项目)
pnpm add @hy-app/ui

# 安装依赖(如果项目中未安装)
pnpm add dayjs

# Node 版本要求 >= 16.14.0

🚀 快速上手

1. 全局注册(main.ts)

import { globalRegister } from "@hy-app/ui";
import { createSSRApp } from "vue";

export function createApp() {
  const app = createSSRApp(App);
  app.use(globalRegister);
  return { app };
}

2. 使用工具函数

<template>
  <!-- 获取 0-10 之间的随机数 -->
  <div>{{ $hy.random(1, 10) }}</div>
</template>

3. 配置 Volar 类型识别

// tsconfig.json
{
  "compilerOptions": {
    "types": ["@hy-app/ui/global"]
  }
}

4. 配置按需引入(page.json)

{
  "easycom": {
    "custom": {
      "^hy-(.*)": "@hy-app/ui/components/hy-$1/hy-$1.vue"
    }
  }
}

5. 全局导入样式(uni.scss)

// uni.scss
@use "@hy-app/ui/index.scss" as *;

🤝 贡献指南

欢迎大家参与项目开发!如果你有任何问题或更好的建议,欢迎:

📄 开源协议

MIT License

Related Packages

uni-ui-plus

uni-ui-plus 一个现代化的 uni-app 组件库

2,127 7
wot-design-uni

一个基于Vue3+TS开发的uni-app组件库,提供70+高质量组件,支持暗黑模式、国际化和自...

136,487 2,301
@wot-ui/ui

wot-ui 一个轻量、美观、AI友好的 uni-app 组件库。

39,765 406
oxy-uni-ui

一个基于Vue3+TS开发的uni-app组件库,提供70+高质量组件,支持暗黑模式、国际化和自...

5,332

Version History

Version Released License
1.0.6 MIT
1.0.5 MIT
1.0.4 MIT
1.0.3 MIT
1.0.2 MIT