@vaebe/ccui-icons
Vue3-CCUI
一个基于 Vue 3 + TypeScript + Vite+ 构建的现代化 UI 组件库。
✨ 特性
- 🚀 基于 Vue 3 Composition API
- 💪 使用 TypeScript 开发,提供完整的类型定义
- ⚡ Vite 8 + Rolldown 构建,OXC 全链路加速
- 🛠️ 全量接入 Vite+ 工具链:
vp dev / build / test / check / lint / fmt - 📦 支持按需引入,减小包体积
- 🎨 视觉设计致敬 Ant Design,沉淀为一套完整的主题 Token 体系
- 🧩 API 采用 Vue-first 命名(如
visible/closeOnEsc/appendToBody),与 Vue 生态习惯一致
📦 安装
# NPM
npm install @vaebe/ccui --save
# Yarn
yarn add @vaebe/ccui
# pnpm
pnpm add @vaebe/ccui
🚀 快速开始
完整引入
import { createApp } from 'vue'
import ccui from '@vaebe/ccui'
import App from './App.vue'
import './style.css'
import '@vaebe/ccui/style.css'
createApp(App).use(ccui).mount('#app')
按需引入
import { createApp } from 'vue'
import { Button, Card } from '@vaebe/ccui'
import App from './App.vue'
import '@vaebe/ccui/style.css'
const app = createApp(App)
app.use(Button)
app.use(Card)
app.mount('#app')
📚 组件
覆盖通用 / 导航 / 反馈 / 数据录入 / 数据展示 / 布局 / 其他七大类,共 83 个组件 / 工具与主题指南入口。API 命名采用 Vue-first 习惯(受控显示用 visible / v-model:visible,而非 React 生态的 open),完整命名约定见 docs-notes/decisions/benchmark-principles.md。
完整组件列表、API 与在线示例见 📖 在线文档。
📖 文档
访问 在线文档 查看详细的组件使用说明和示例。
🛠️ 开发
仓库已接入 Vite+,需要预先全局安装
vp(Linux / macOS):curl -fsSL https://vite.plus | bashWindows 安装方式见 Vite+ 官方指南。
同时要求 Node
>= 22.10(用于 cli 包的原生 TypeScript type stripping)。
# 克隆项目
git clone https://github.com/vaebe/ccui.git
# 安装依赖
vp install
# 启动开发服务器(默认跑文档站)
vp run --filter docs dev
# 构建文档
vp run --filter docs docs:build
# 运行测试
vp run --filter @vaebe/ccui test
# 一站式格式化 + lint + 类型检查
vp check --fix
# 单独格式化(Oxfmt)
vp fmt
# 单独 lint(Oxlint)
vp lint . --fix
工具链:
| 能力 | 工具 |
|---|---|
| 构建 | Vite 8 + Rolldown |
| 测试 | Vitest 4.1(通过 vp test) |
| 格式化 | Oxfmt(antfu 风格:单引号、无分号、trailingComma: 'all') |
| Lint | Oxlint |
| 类型检查 | tsgolint(在 vp check 内串联) |
| 文档站 | VitePress 2 |
| Git Hooks | vp config + .vite-hooks/(替代 husky) |
| Staged 任务 | vite.config.ts 的 staged 块(替代 lint-staged) |
📦 发布
仓库通过根目录的 scripts/publish.mjs 一键发布 3 个公开包到 npm(@vaebe/ccui / @vaebe/ccui-icons / @vaebe/unplugin-vue-components-ccui)。
pnpm release # 默认 dist-tag=beta
pnpm release:dry # 完整构建/打包预演,不接触 registry
node scripts/publish.mjs --release 2.2.0 --tag latest
node scripts/publish.mjs --use-current-version --resume # 中断后显式续发
脚本会自动:
- 校验
main、origin/main和工作区,运行静态检查、单测及 E2E 清单检查 - 同步三包版本、校验根 Changelog,创建本地 release commit
- 按依赖顺序构建并生成固定 tarball:icons → ccui → resolver
- 使用版本专属临时 dist-tag 发布;三包全部成功后统一提升到
beta/latest - 创建 annotated tag
v<version>,最后推送 release commit 与 tag
npm 自 2025-09 起停止接受新的 TOTP 注册,全面推 WebAuthn / passkey。 老 TOTP 账号仍可用,发布失败时按
o输 6 位码兜底。 详细流程与故障排查见docs-notes/releasing.md。
🤝 贡献
欢迎提交 Issue 和 Pull Request!
📄 许可证
🔗 相关链接
Related Packages
Icons from materialdesignicons.com rendered as PascalCase vue components with Md...
Material Design Icons components for Vue. Designed for ease of use and high perf...
Line Awesome by Icons8: more than 1,500 free line icons as a web font, as tree-s...
Offline-first icon picker for Vue 3 + Naive UI, powered by Iconify. Browse bundl...
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 2.2.0 | ^3.5.0 | MIT | |
| 2.1.0 | ^3.5.0 | MIT | |
| 2.0.0 | ^3.5.0 | MIT |
Pre-releases (6)
| Version | Released | Vue | License |
|---|---|---|---|
| 2.0.1-beta.5 | ^3.5.0 | MIT | |
| 2.0.1-beta.4 | ^3.5.0 | MIT | |
| 2.0.1-beta.3 | ^3.5.0 | MIT | |
| 2.0.1-beta.2 | ^3.5.0 | MIT | |
| 2.0.1-beta.1 | ^3.5.0 | MIT | |
| 2.0.0-beta.0 | ^3.5.0 | MIT |