@wiphone/wiux 0.0.1
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/LICENSE +22 -0
- package/README.md +280 -0
- package/dist/wiux.es.js +65027 -0
- package/dist/wiux.es.js.map +1 -0
- package/dist/wiux.umd.js +65149 -0
- package/dist/wiux.umd.js.map +1 -0
- package/package.json +77 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016-present, Airyland
|
|
4
|
+
Copyright (c) 2025-present, wiphone
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://github.com/wiphone-wu/wiux">
|
|
3
|
+
<img src="./src/assets/f182c332-c926-4b93-a945-3ade5cad73dd.png" width="175">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center"><b>wiux</b> — Mobile web UI Components based on Vue 3 and WeUI.</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/package/wiux">
|
|
11
|
+
<img src="https://img.shields.io/npm/v/wiux.svg?style=flat-square" alt="npm">
|
|
12
|
+
</a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/wiux">
|
|
14
|
+
<img src="https://img.shields.io/npm/l/wiux.svg?style=flat-square" alt="license">
|
|
15
|
+
</a>
|
|
16
|
+
<br>
|
|
17
|
+
<a href="https://github.com/wiphone-wu/wiux">
|
|
18
|
+
<img src="https://img.shields.io/github/stars/wiphone-wu/wiux.svg?style=social&label=Star" alt="">
|
|
19
|
+
</a>
|
|
20
|
+
<a href="https://github.com/wiphone-wu/wiux">
|
|
21
|
+
<img src="https://img.shields.io/github/forks/wiphone-wu/wiux.svg?style=social&label=Fork" alt="">
|
|
22
|
+
</a>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 关于这个项目
|
|
28
|
+
|
|
29
|
+
[VUX](https://github.com/airyland/vux) 曾经风靡一时,几乎可以说是 Vue 移动端组件库的唯一选择。
|
|
30
|
+
|
|
31
|
+
后来原作者停止了维护,我一直深感遗憾 —————— 毕竟还有项目在依赖它 😂。
|
|
32
|
+
|
|
33
|
+
维护的念头不是没有过,但原项目体量庞大,加上自己能力有限、精力也有限,始终没能迈出那一步。
|
|
34
|
+
|
|
35
|
+
感谢 AI 的出现,本项目在 AI 的协助下,完成了 VUX 从 Vue 2 到 Vue 3 的全量升级,现在它叫 [WIUX](https://github.com/wiphone-wu/wiux)。
|
|
36
|
+
|
|
37
|
+
当然了,wiux和vux2是两个不同的项目,只是看上去基本一样而已 —————— 毕竟vue3也没办法兼容vue2。
|
|
38
|
+
|
|
39
|
+
请注意:本项目没有进行严格的测试,不要将本项目用于生产环境,仅用于学习和开发。
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Requirements
|
|
44
|
+
|
|
45
|
+
- `vue` `^3.4.0`
|
|
46
|
+
- `node` `^20.19.0 || >=22.12.0`
|
|
47
|
+
|
|
48
|
+
## Quick Start
|
|
49
|
+
|
|
50
|
+
### Installation
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm install wiux
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Usage
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
import { createApp } from 'vue'
|
|
60
|
+
import App from './App.vue'
|
|
61
|
+
|
|
62
|
+
import Wiux from 'wiux'
|
|
63
|
+
import 'wiux/dist/style.css'
|
|
64
|
+
|
|
65
|
+
const app = createApp(App)
|
|
66
|
+
app.use(Wiux)
|
|
67
|
+
app.mount('#app')
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Or import components on demand:
|
|
71
|
+
|
|
72
|
+
```js
|
|
73
|
+
import { XButton, Toast, Group, Cell } from 'wiux'
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Components
|
|
77
|
+
|
|
78
|
+
### Layout / 布局
|
|
79
|
+
|
|
80
|
+
| Component | Description |
|
|
81
|
+
|-----------|-------------|
|
|
82
|
+
| Group | 分组容器 |
|
|
83
|
+
| Cell | 单元格 |
|
|
84
|
+
| FlexBox / FlexBoxItem | 弹性布局 |
|
|
85
|
+
| Grid / GridItem | 网格布局 |
|
|
86
|
+
| ViewBox | 视口容器 |
|
|
87
|
+
| Divider | 分隔线 |
|
|
88
|
+
|
|
89
|
+
### Typography / 排版
|
|
90
|
+
|
|
91
|
+
| Component | Description |
|
|
92
|
+
|-----------|-------------|
|
|
93
|
+
| XHeader | 页头 |
|
|
94
|
+
| InlineDesc | 行内描述 |
|
|
95
|
+
|
|
96
|
+
### Icon / 图标
|
|
97
|
+
|
|
98
|
+
| Component | Description |
|
|
99
|
+
|-----------|-------------|
|
|
100
|
+
| XIcon | 图标 |
|
|
101
|
+
| Badge | 徽章 |
|
|
102
|
+
| Spinner | 加载旋转器 |
|
|
103
|
+
|
|
104
|
+
### Button / 按钮
|
|
105
|
+
|
|
106
|
+
| Component | Description |
|
|
107
|
+
|-----------|-------------|
|
|
108
|
+
| XButton | 按钮 |
|
|
109
|
+
| ButtonTab / ButtonTabItem | 按钮选项卡 |
|
|
110
|
+
|
|
111
|
+
### Form / 表单
|
|
112
|
+
|
|
113
|
+
| Component | Description |
|
|
114
|
+
|-----------|-------------|
|
|
115
|
+
| XInput | 输入框 |
|
|
116
|
+
| XTextarea | 多行输入 |
|
|
117
|
+
| XNumber | 数字输入 |
|
|
118
|
+
| XSwitch | 开关 |
|
|
119
|
+
| Radio | 单选 |
|
|
120
|
+
| Checker / CheckerItem | 多选 |
|
|
121
|
+
| Checklist | 勾选列表 |
|
|
122
|
+
| Selector | 选择器 |
|
|
123
|
+
| Range | 滑块 |
|
|
124
|
+
| Rater | 评分 |
|
|
125
|
+
| Search | 搜索栏 |
|
|
126
|
+
| Datetime | 日期时间选择 |
|
|
127
|
+
| DatetimeView | 日期时间视图 |
|
|
128
|
+
| DatetimeRange | 日期区间 |
|
|
129
|
+
| Calendar | 日历 |
|
|
130
|
+
| InlineCalendar | 内联日历 |
|
|
131
|
+
| Picker | 选择器 |
|
|
132
|
+
| PopupPicker | 弹出选择器 |
|
|
133
|
+
| PopupRadio | 弹出单选 |
|
|
134
|
+
| XAddress | 地址选择 |
|
|
135
|
+
| Uploader | 图片上传 |
|
|
136
|
+
| ColorPicker | 颜色选择器 |
|
|
137
|
+
| XForm / XFormField | 表单校验 |
|
|
138
|
+
|
|
139
|
+
### Feedback / 反馈
|
|
140
|
+
|
|
141
|
+
| Component | Description |
|
|
142
|
+
|-----------|-------------|
|
|
143
|
+
| XDialog | 对话框 |
|
|
144
|
+
| Alert | 警告框 |
|
|
145
|
+
| Confirm | 确认框 |
|
|
146
|
+
| Toast | 轻提示 |
|
|
147
|
+
| Msg | 消息页 |
|
|
148
|
+
| Loading | 加载中 |
|
|
149
|
+
| LoadMore | 加载更多 |
|
|
150
|
+
| Masker | 遮罩 |
|
|
151
|
+
|
|
152
|
+
### Navigation / 导航
|
|
153
|
+
|
|
154
|
+
| Component | Description |
|
|
155
|
+
|-----------|-------------|
|
|
156
|
+
| Tab / TabItem | 选项卡 |
|
|
157
|
+
| tabbar / tabbarItem | 底部导航 |
|
|
158
|
+
|
|
159
|
+
### Other / 其他
|
|
160
|
+
|
|
161
|
+
| Component | Description |
|
|
162
|
+
|-----------|-------------|
|
|
163
|
+
| Swiper / SwiperItem | 轮播图 |
|
|
164
|
+
| Scroller | 滚动容器 |
|
|
165
|
+
| Actionsheet | 动作面板 |
|
|
166
|
+
| Popup | 弹出层 |
|
|
167
|
+
| PopupHeader | 弹出层头部 |
|
|
168
|
+
| Popover | 弹出菜单 |
|
|
169
|
+
| Drawer | 抽屉 |
|
|
170
|
+
| Previewer | 图片预览 |
|
|
171
|
+
| Sticky | 粘性布局 |
|
|
172
|
+
| Blur | 模糊效果 |
|
|
173
|
+
| Clocker | 计时器 |
|
|
174
|
+
| Countdown | 倒计时 |
|
|
175
|
+
| Countup | 数字滚动 |
|
|
176
|
+
| Card | 卡片 |
|
|
177
|
+
| Panel | 面板 |
|
|
178
|
+
| Qrcode | 二维码 |
|
|
179
|
+
| Flow / FlowLine / FlowState | 流程步骤 |
|
|
180
|
+
| Step / StepItem | 步骤条 |
|
|
181
|
+
| Timeline / TimelineItem | 时间线 |
|
|
182
|
+
| FormPreview | 表单预览 |
|
|
183
|
+
| CellFormPreview | 单元格表单预览 |
|
|
184
|
+
| XImg | 图片 |
|
|
185
|
+
| XTable | 表格 |
|
|
186
|
+
| WechatEmotion | 微信表情 |
|
|
187
|
+
| Marquee / MarqueeItem | 跑马灯 |
|
|
188
|
+
| XProgress | 进度条 |
|
|
189
|
+
| XCircle | 环形进度 |
|
|
190
|
+
| Swipeout / SwipeoutItem / SwipeoutButton | 滑动操作 |
|
|
191
|
+
|
|
192
|
+
### Chart / 图表
|
|
193
|
+
|
|
194
|
+
| Component | Description |
|
|
195
|
+
|-----------|-------------|
|
|
196
|
+
| VChart | 图表容器 |
|
|
197
|
+
| VLine | 折线图 |
|
|
198
|
+
| VArea | 面积图 |
|
|
199
|
+
| VBar | 柱状图 |
|
|
200
|
+
| VPie | 饼图 |
|
|
201
|
+
| VPoint | 散点图 |
|
|
202
|
+
| VScale | 度量 |
|
|
203
|
+
| VAxis | 坐标轴 |
|
|
204
|
+
| VGuide | 辅助元素 |
|
|
205
|
+
| VTooltip | 提示信息 |
|
|
206
|
+
| VLegend | 图例 |
|
|
207
|
+
|
|
208
|
+
## Internationalization / 国际化
|
|
209
|
+
|
|
210
|
+
wiux 内置中英文双语支持,基于 `vue-i18n`。
|
|
211
|
+
|
|
212
|
+
```js
|
|
213
|
+
import { createLocale } from 'wiux'
|
|
214
|
+
|
|
215
|
+
// 设置为英文
|
|
216
|
+
createLocale('en')
|
|
217
|
+
|
|
218
|
+
// 自定义语言包
|
|
219
|
+
createLocale({
|
|
220
|
+
'Done': '完成',
|
|
221
|
+
'Uploader.title': '上传图片'
|
|
222
|
+
})
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
所有语言包键值见 [src/locales](src/locales)。
|
|
226
|
+
|
|
227
|
+
## Plugin APIs / 插件式调用
|
|
228
|
+
|
|
229
|
+
除组件形式外,也支持函数式调用:
|
|
230
|
+
|
|
231
|
+
```js
|
|
232
|
+
import { toast, alert, confirm, loading, datetime } from 'wiux'
|
|
233
|
+
|
|
234
|
+
// Toast
|
|
235
|
+
toast({ text: '操作成功', type: 'success' })
|
|
236
|
+
|
|
237
|
+
// Alert
|
|
238
|
+
await alert({ title: '提示', content: '确定要删除吗?' })
|
|
239
|
+
|
|
240
|
+
// Confirm
|
|
241
|
+
const ok = await confirm({ title: '确认', content: '确定要执行此操作?' })
|
|
242
|
+
if (ok) { /* ... */ }
|
|
243
|
+
|
|
244
|
+
// Loading
|
|
245
|
+
loading.show({ text: '加载中...' })
|
|
246
|
+
loading.hide()
|
|
247
|
+
|
|
248
|
+
// Datetime
|
|
249
|
+
const date = await datetime({ value: '2024-01-01', format: 'YYYY-MM-DD' })
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
> 插件式调用使用前需 `app.use(Plugin)` 注册,详见 `app.use(Wiux)` 后自动包含。
|
|
253
|
+
|
|
254
|
+
## Development / 开发
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
# 安装依赖
|
|
258
|
+
npm install
|
|
259
|
+
|
|
260
|
+
# 启动 Demo 开发服务
|
|
261
|
+
npm run demo
|
|
262
|
+
|
|
263
|
+
# 构建 Demo
|
|
264
|
+
npm run demo:build
|
|
265
|
+
|
|
266
|
+
# 构建组件库
|
|
267
|
+
npm run build
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## Wiux is Inspired or Powered By
|
|
271
|
+
|
|
272
|
+
- [Vue](https://github.com/vuejs/vue)
|
|
273
|
+
- [WeUI](https://github.com/weui/weui)
|
|
274
|
+
- [Ant Design Mobile](https://github.com/ant-design/ant-design-mobile)
|
|
275
|
+
- [PhotoSwipe](https://github.com/dimsemenov/PhotoSwipe)
|
|
276
|
+
- [F2](https://github.com/antvis/f2)(图表)
|
|
277
|
+
|
|
278
|
+
## License
|
|
279
|
+
|
|
280
|
+
[MIT](LICENSE)
|