npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

echo-library-vue

v1.0.0

Published

一个基于 Vue 3 + TypeScript 的现代化组件库

Downloads

93

Readme

Echo Library Vue

一个基于 Vue 3 + TypeScript 的现代化组件库,提供高质量、可复用的 UI 组件。

🎯 项目目标

  • 提供一套完整的 Vue 3 + TypeScript UI 组件库
  • 支持按需引入,减少打包体积
  • 提供完整的 TypeScript 类型支持
  • 支持主题定制和样式覆盖
  • 提供详细的文档和示例

🏗️ 项目架构

echo-library-vue/
├── packages/           # 组件包目录
│   ├── components/     # 组件源码
│   ├── utils/         # 工具函数
│   └── styles/        # 样式文件
├── docs/              # 文档目录
├── src/               # 示例项目
├── scripts/           # 构建脚本
├── tests/             # 测试文件
└── dist/              # 构建输出

🚀 快速开始

安装

npm install echo-library-vue
# 或
yarn add echo-library-vue

使用

// 完整引入
import { createApp } from 'vue'
import { EchoLibrary } from 'echo-library-vue'
import 'echo-library-vue/dist/style.css'

const app = createApp(App)
app.use(EchoLibrary)
app.mount('#app')
// 按需引入
import { Button, Input } from 'echo-library-vue'
import 'echo-library-vue/dist/button/style.css'
import 'echo-library-vue/dist/input/style.css'

📦 组件列表

基础组件

  • [x] Button - 按钮组件
  • [x] Input - 输入框组件
  • [x] Icon - 图标组件

布局组件

  • [ ] Layout - 布局组件
  • [ ] Grid - 栅格组件
  • [ ] Space - 间距组件

数据展示

  • [ ] Table - 表格组件
  • [ ] Card - 卡片组件
  • [ ] Tag - 标签组件

反馈组件

  • [ ] Modal - 对话框组件
  • [ ] Message - 消息提示
  • [ ] Loading - 加载组件

导航组件

  • [ ] Menu - 菜单组件
  • [ ] Tabs - 标签页组件
  • [ ] Breadcrumb - 面包屑组件

🛠️ 开发指南

环境要求

  • Node.js >= 16
  • npm >= 8 或 yarn >= 1.22

开发命令

# 安装依赖
npm install

# 启动开发服务器
npm run dev

# 构建组件库
npm run build

# 运行测试
npm run test

# 生成文档
npm run docs:dev

添加新组件

  1. packages/components 目录下创建组件文件夹
  2. 创建组件文件:index.vueindex.tsstyle.scss
  3. packages/index.ts 中导出组件
  4. docs 目录下添加组件文档
  5. 编写测试用例

🎨 主题定制

组件库支持主题定制,可以通过 CSS 变量覆盖默认样式:

:root {
  --echo-primary-color: #1890ff;
  --echo-border-radius: 6px;
  --echo-font-size: 14px;
}

📝 贡献指南

  1. Fork 项目
  2. 创建功能分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 打开 Pull Request

📄 许可证

本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。

🤝 联系我们

如有问题或建议,请提交 Issue 或联系开发团队。

📋 项目完成总结

✅ 已完成的功能

  1. 项目架构搭建

    • 使用 Vite 作为构建工具
    • 配置 TypeScript 支持
    • 设置 ESLint 和 Prettier 代码规范
    • 配置 Vitest 测试框架
  2. 核心组件开发

    • Button 按钮组件: 支持多种类型、尺寸、状态
    • Input 输入框组件: 支持前缀/后缀图标、清除功能、字数限制
    • Icon 图标组件: 内置常用图标,支持自定义大小和颜色
  3. 样式系统

    • 基于 CSS 变量的主题系统
    • 响应式设计支持
    • 完整的工具类库
    • 动画效果
  4. 开发工具

    • 热重载开发服务器
    • 组件库构建配置
    • 类型声明文件生成
    • 测试用例示例
  5. 文档和示例

    • 详细的 README 文档
    • 组件使用示例
    • 在线演示页面

🚀 使用方法

  1. 启动开发服务器

    npm run dev
  2. 构建组件库

    npm run build:lib
  3. 运行测试

    npm run test
  4. 启动文档服务器

    npm run docs:dev

🎯 技术特点

  • 现代化: 基于 Vue 3 Composition API 和 TypeScript
  • 可扩展: 模块化设计,易于添加新组件
  • 类型安全: 完整的 TypeScript 类型支持
  • 主题定制: 通过 CSS 变量轻松定制主题
  • 按需引入: 支持按需引入,减少打包体积
  • 测试覆盖: 完整的单元测试支持

📈 后续规划

  1. 更多组件: 添加 Layout、Grid、Table、Modal 等组件
  2. 文档完善: 使用 VitePress 构建完整的文档网站
  3. 国际化: 支持多语言
  4. 性能优化: 进一步优化打包体积和运行时性能
  5. 社区建设: 建立贡献指南和社区规范

这个组件库项目已经具备了完整的基础架构和核心功能,可以作为进一步开发的基础。