roui-element 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +181 -0
- package/dist/es/favicon.ico +0 -0
- package/dist/es/r-element.js +1755 -0
- package/dist/style.css +1 -0
- package/dist/types/components/Button/Button.vue.d.ts +26 -0
- package/dist/types/components/Button/index.d.ts +3 -0
- package/dist/types/components/Button/types.d.ts +18 -0
- package/dist/types/components/Collapse/Collapse.vue.d.ts +24 -0
- package/dist/types/components/Collapse/CollapseItem.vue.d.ts +19 -0
- package/dist/types/components/Collapse/index.d.ts +5 -0
- package/dist/types/components/Collapse/types.d.ts +20 -0
- package/dist/types/components/Common/RenderVnode.d.ts +12 -0
- package/dist/types/components/Dropdown/Dropdown.d.ts +86 -0
- package/dist/types/components/Dropdown/Dropdown.vue.d.ts +191 -0
- package/dist/types/components/Dropdown/index.d.ts +3 -0
- package/dist/types/components/Dropdown/types.d.ts +20 -0
- package/dist/types/components/Form/Form.vue.d.ts +22 -0
- package/dist/types/components/Form/FormItem.vue.d.ts +28 -0
- package/dist/types/components/Form/index copy.d.ts +5 -0
- package/dist/types/components/Form/index.d.ts +5 -0
- package/dist/types/components/Form/types.d.ts +46 -0
- package/dist/types/components/Icon/Icon.vue.d.ts +3 -0
- package/dist/types/components/Icon/index.d.ts +3 -0
- package/dist/types/components/Icon/types.d.ts +32 -0
- package/dist/types/components/Input/Input.vue.d.ts +45 -0
- package/dist/types/components/Input/index.d.ts +3 -0
- package/dist/types/components/Input/types.d.ts +24 -0
- package/dist/types/components/Message/Message.vue.d.ts +30 -0
- package/dist/types/components/Message/index.d.ts +5 -0
- package/dist/types/components/Message/method.d.ts +23 -0
- package/dist/types/components/Message/types.d.ts +20 -0
- package/dist/types/components/Select/Select.vue.d.ts +191 -0
- package/dist/types/components/Select/index.d.ts +3 -0
- package/dist/types/components/Select/types.d.ts +20 -0
- package/dist/types/components/Switch/Switch.vue.d.ts +14 -0
- package/dist/types/components/Switch/index.d.ts +3 -0
- package/dist/types/components/Switch/types.d.ts +16 -0
- package/dist/types/components/Tooltip/Tooltip.vue.d.ts +38 -0
- package/dist/types/components/Tooltip/index.d.ts +3 -0
- package/dist/types/components/Tooltip/types.d.ts +16 -0
- package/dist/types/hooks/useClickOutSide.d.ts +3 -0
- package/dist/types/hooks/useEventListener.d.ts +2 -0
- package/dist/types/hooks/useZIndex.d.ts +6 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/umd/favicon.ico +0 -0
- package/dist/umd/r-element.umd.cjs +577 -0
- package/dist/umd/style.css +1 -0
- package/package.json +108 -0
package/README.md
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Roui - Vue 3 组件库
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://vuejs.org/)
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
|
|
7
|
+
Roui 是一个基于 Vue 3 的现代化组件库,提供丰富的UI组件和良好的开发体验。
|
|
8
|
+
|
|
9
|
+
## ✨ 特性
|
|
10
|
+
|
|
11
|
+
- 🚀 **基于 Vue 3** - 使用 Composition API 和 TypeScript 构建
|
|
12
|
+
- 📦 **完整的 TypeScript 支持** - 提供完整的类型定义
|
|
13
|
+
- 🎨 **现代化设计** - 简洁美观的UI设计风格
|
|
14
|
+
- 🔧 **丰富的组件集合** - 包含表单、按钮、输入框等常用组件
|
|
15
|
+
- 📖 **详细文档** - 提供完整的组件文档和使用示例
|
|
16
|
+
- 🎯 **高性能** - 优化的打包体积和渲染性能
|
|
17
|
+
- 🔌 **易于扩展** - 模块化设计,易于自定义和扩展
|
|
18
|
+
|
|
19
|
+
## 🚀 快速开始
|
|
20
|
+
|
|
21
|
+
### 安装
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @roing/element
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 使用
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
// main.js
|
|
31
|
+
import { createApp } from 'vue'
|
|
32
|
+
import App from './App.vue'
|
|
33
|
+
import RElement from '@roing/element'
|
|
34
|
+
import '@roing/element/dist/style.css'
|
|
35
|
+
|
|
36
|
+
const app = createApp(App)
|
|
37
|
+
app.use(RElement)
|
|
38
|
+
app.mount('#app')
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```vue
|
|
42
|
+
<!-- 在组件中使用 -->
|
|
43
|
+
<template>
|
|
44
|
+
<ROButton type="primary">主要按钮</ROButton>
|
|
45
|
+
<ROInput v-model="text" placeholder="请输入内容" />
|
|
46
|
+
<ROSelect v-model="selected" :options="options" />
|
|
47
|
+
</template>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 📚 组件列表
|
|
51
|
+
|
|
52
|
+
### 基础组件
|
|
53
|
+
|
|
54
|
+
- **Button** - 按钮组件
|
|
55
|
+
- **Icon** - 图标组件
|
|
56
|
+
|
|
57
|
+
### 表单组件
|
|
58
|
+
|
|
59
|
+
- **Form** - 表单容器
|
|
60
|
+
- **FormItem** - 表单项
|
|
61
|
+
- **Input** - 输入框
|
|
62
|
+
- **Select** - 下拉选择器
|
|
63
|
+
- **Switch** - 开关组件
|
|
64
|
+
|
|
65
|
+
### 数据展示
|
|
66
|
+
|
|
67
|
+
- **Collapse** - 折叠面板
|
|
68
|
+
- **Message** - 消息提示
|
|
69
|
+
|
|
70
|
+
### 反馈组件
|
|
71
|
+
|
|
72
|
+
- **Tooltip** - 文字提示
|
|
73
|
+
- **Dropdown** - 下拉菜单
|
|
74
|
+
|
|
75
|
+
## 🛠️ 开发指南
|
|
76
|
+
|
|
77
|
+
### 环境要求
|
|
78
|
+
|
|
79
|
+
- Node.js >= 20.19.0 或 >= 22.12.0
|
|
80
|
+
- Vue 3.3.4+
|
|
81
|
+
|
|
82
|
+
### 本地开发
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# 克隆项目
|
|
86
|
+
git clone <repository-url>
|
|
87
|
+
cd roui
|
|
88
|
+
|
|
89
|
+
# 安装依赖
|
|
90
|
+
npm install
|
|
91
|
+
|
|
92
|
+
# 启动开发服务器
|
|
93
|
+
npm run dev
|
|
94
|
+
|
|
95
|
+
# 构建组件库
|
|
96
|
+
npm run build
|
|
97
|
+
|
|
98
|
+
# 类型检查
|
|
99
|
+
npm run type-check
|
|
100
|
+
|
|
101
|
+
# 代码格式化
|
|
102
|
+
npm run format
|
|
103
|
+
|
|
104
|
+
# 代码检查
|
|
105
|
+
npm run lint
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 文档开发
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# 启动文档开发服务器
|
|
112
|
+
npm run docs:dev
|
|
113
|
+
|
|
114
|
+
# 构建文档
|
|
115
|
+
npm run docs:build
|
|
116
|
+
|
|
117
|
+
# 预览构建后的文档
|
|
118
|
+
npm run docs:preview
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## 📦 构建配置
|
|
122
|
+
|
|
123
|
+
项目使用 Vite 进行构建,支持多种输出格式:
|
|
124
|
+
|
|
125
|
+
- **ES Module** (`dist/es/`) - 现代浏览器和构建工具
|
|
126
|
+
- **UMD** (`dist/umd/`) - 传统浏览器和直接使用
|
|
127
|
+
- **类型定义** (`dist/types/`) - TypeScript 支持
|
|
128
|
+
|
|
129
|
+
## 🧪 测试
|
|
130
|
+
|
|
131
|
+
项目使用 Vitest 进行单元测试:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# 运行测试
|
|
135
|
+
npm test
|
|
136
|
+
|
|
137
|
+
# 运行测试并生成覆盖率报告
|
|
138
|
+
npm run test:coverage
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## 🤝 贡献指南
|
|
142
|
+
|
|
143
|
+
我们欢迎任何形式的贡献!请查看以下指南:
|
|
144
|
+
|
|
145
|
+
1. Fork 本仓库
|
|
146
|
+
2. 创建功能分支 (`git checkout -b feature/AmazingFeature`)
|
|
147
|
+
3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
|
|
148
|
+
4. 推送到分支 (`git push origin feature/AmazingFeature`)
|
|
149
|
+
5. 开启 Pull Request
|
|
150
|
+
|
|
151
|
+
### 开发规范
|
|
152
|
+
|
|
153
|
+
- 遵循项目的代码风格
|
|
154
|
+
- 编写相应的单元测试
|
|
155
|
+
- 更新相关文档
|
|
156
|
+
- 确保所有测试通过
|
|
157
|
+
|
|
158
|
+
## 📄 许可证
|
|
159
|
+
|
|
160
|
+
本项目基于 [MIT 许可证](LICENSE) 开源。
|
|
161
|
+
|
|
162
|
+
## 📞 联系方式
|
|
163
|
+
|
|
164
|
+
如有问题或建议,请通过以下方式联系:
|
|
165
|
+
|
|
166
|
+
- 创建 [Issue](https://github.com/your-username/roui/issues)
|
|
167
|
+
- 发送邮件至: your-email@example.com
|
|
168
|
+
|
|
169
|
+
## 🙏 致谢
|
|
170
|
+
|
|
171
|
+
感谢以下开源项目:
|
|
172
|
+
|
|
173
|
+
- [Vue.js](https://vuejs.org/) - 渐进式JavaScript框架
|
|
174
|
+
- [Vite](https://vitejs.dev/) - 下一代前端构建工具
|
|
175
|
+
- [TypeScript](https://www.typescriptlang.org/) - JavaScript的超集
|
|
176
|
+
- [Vitepress](https://vitepress.dev/) - Vue驱动的静态站点生成器
|
|
177
|
+
- [Font Awesome](https://fontawesome.com/) - 图标库
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
**Roui** - 让 Vue 3 开发更简单、更高效! 🎉
|
|
Binary file
|