@gmcb/uv-ui 0.2.26 → 0.3.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/CHANGELOG.md +8 -0
- package/LICENSE +21 -21
- package/README.md +95 -141
- package/components/uv-overlay/props.js +29 -24
- package/components/uv-overlay/uv-overlay.vue +87 -85
- package/docs/api/configs/color.md +52 -0
- package/docs/api/index.md +77 -0
- package/docs/api/mixins/mpShare.md +95 -0
- package/docs/api/request/apiManage.md +88 -0
- package/docs/api/request/http.md +451 -0
- package/docs/api/utils/colorSwitch.md +78 -0
- package/docs/api/utils/debounce.md +104 -0
- package/docs/api/utils/fastUse.md +246 -0
- package/docs/api/utils/getRect.md +238 -0
- package/docs/api/utils/guid.md +41 -0
- package/docs/api/utils/index.md +55 -0
- package/docs/api/utils/intro.md +25 -0
- package/docs/api/utils/object.md +171 -0
- package/docs/api/utils/queryParams.md +68 -0
- package/docs/api/utils/random.md +23 -0
- package/docs/api/utils/randomArray.md +28 -0
- package/docs/api/utils/route.md +121 -0
- package/docs/api/utils/test.md +237 -0
- package/docs/api/utils/time.md +81 -0
- package/docs/api/utils/trim.md +24 -0
- package/docs/components/actionSheet.md +236 -0
- package/docs/components/addQQGroup.md +5 -0
- package/docs/components/album.md +91 -0
- package/docs/components/alert.md +83 -0
- package/docs/components/avatar.md +152 -0
- package/docs/components/backTop.md +181 -0
- package/docs/components/badge.md +117 -0
- package/docs/components/button.md +196 -0
- package/docs/components/calendar.md +398 -0
- package/docs/components/calendars.md +294 -0
- package/docs/components/cell.md +185 -0
- package/docs/components/checkbox.md +281 -0
- package/docs/components/circleProgress.md +5 -0
- package/docs/components/code.md +162 -0
- package/docs/components/codeInput.md +175 -0
- package/docs/components/collapse.md +250 -0
- package/docs/components/color.md +324 -0
- package/docs/components/common.md +126 -0
- package/docs/components/countDown.md +166 -0
- package/docs/components/countTo.md +140 -0
- package/docs/components/datetimePicker.md +283 -0
- package/docs/components/diff1.x.md +190 -0
- package/docs/components/divider.md +88 -0
- package/docs/components/downloadSetting.md +54 -0
- package/docs/components/dropDown.md +375 -0
- package/docs/components/empty.md +99 -0
- package/docs/components/feature.md +261 -0
- package/docs/components/form.md +736 -0
- package/docs/components/gap.md +49 -0
- package/docs/components/grid.md +225 -0
- package/docs/components/icon.md +101 -0
- package/docs/components/image.md +182 -0
- package/docs/components/index.md +110 -0
- package/docs/components/indexList.md +133 -0
- package/docs/components/input.md +250 -0
- package/docs/components/install.md +59 -0
- package/docs/components/intro.md +32 -0
- package/docs/components/keyboard.md +226 -0
- package/docs/components/layout.md +310 -0
- package/docs/components/line.md +85 -0
- package/docs/components/lineProgress.md +141 -0
- package/docs/components/link.md +89 -0
- package/docs/components/list.md +223 -0
- package/docs/components/loadMore.md +140 -0
- package/docs/components/loadingIcon.md +144 -0
- package/docs/components/loadingPage.md +92 -0
- package/docs/components/modal.md +230 -0
- package/docs/components/more.md +13 -0
- package/docs/components/navbar.md +192 -0
- package/docs/components/noNetwork.md +116 -0
- package/docs/components/noticeBar.md +131 -0
- package/docs/components/notify.md +204 -0
- package/docs/components/npmSetting.md +64 -0
- package/docs/components/numberBox.md +257 -0
- package/docs/components/nvue.md +170 -0
- package/docs/components/overlay.md +117 -0
- package/docs/components/parse.md +204 -0
- package/docs/components/pickColor.md +112 -0
- package/docs/components/picker.md +357 -0
- package/docs/components/popup.md +221 -0
- package/docs/components/problem.md +300 -0
- package/docs/components/qrcode.md +169 -0
- package/docs/components/quickstart.md +33 -0
- package/docs/components/radio.md +256 -0
- package/docs/components/rate.md +128 -0
- package/docs/components/read.md +163 -0
- package/docs/components/readMore.md +227 -0
- package/docs/components/resource.md +17 -0
- package/docs/components/scrollList.md +218 -0
- package/docs/components/search.md +160 -0
- package/docs/components/setting.md +111 -0
- package/docs/components/settingDesc.md +66 -0
- package/docs/components/skeleton.md +105 -0
- package/docs/components/skeletons.md +323 -0
- package/docs/components/slider.md +157 -0
- package/docs/components/steps.md +189 -0
- package/docs/components/sticky.md +76 -0
- package/docs/components/subsection.md +183 -0
- package/docs/components/swipeAction.md +279 -0
- package/docs/components/swiper.md +352 -0
- package/docs/components/switch.md +216 -0
- package/docs/components/tabbar.md +263 -0
- package/docs/components/table.md +5 -0
- package/docs/components/tabs.md +364 -0
- package/docs/components/tag.md +227 -0
- package/docs/components/testPic.md +20 -0
- package/docs/components/text.md +157 -0
- package/docs/components/textarea.md +121 -0
- package/docs/components/toast.md +124 -0
- package/docs/components/tooltip.md +98 -0
- package/docs/components/transition.md +404 -0
- package/docs/components/upload.md +253 -0
- package/docs/components/vtabs.md +332 -0
- package/docs/components/vueUse.md +45 -0
- package/docs/components/vuexDetail.md +103 -0
- package/docs/components/waterfall.md +651 -0
- package/docs/faq/index.md +53 -0
- package/docs/guide/codeHint.md +44 -0
- package/docs/guide/customIcon.md +168 -0
- package/docs/guide/demo.md +92 -0
- package/docs/guide/design.md +56 -0
- package/docs/guide/globalVariable.md +239 -0
- package/docs/guide/i18n.md +194 -0
- package/docs/guide/index.md +28 -0
- package/docs/guide/note.md +74 -0
- package/docs/guide/safeAreaInset.md +64 -0
- package/docs/guide/theme.md +67 -0
- package/docs/index.md +88 -0
- package/libs/config/config.js +0 -10
- package/libs/css/color.scss +15 -14
- package/package.json +7 -2
- package/theme.scss +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.2.27](http://10.10.10.16/caoben/front-end/compare/@gmcb/uv-ui@0.2.26...@gmcb/uv-ui@0.2.27) (2026-01-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @gmcb/uv-ui
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.2.26](https://git.keeprisk.cn/gmcb/front-end/compare/@gmcb/uv-ui@0.2.25...@gmcb/uv-ui@0.2.26) (2025-07-25)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @gmcb/uv-ui
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 aniu
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 aniu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,164 +1,118 @@
|
|
|
1
|
-
|
|
2
|
-
<span> </span><img alt="logo" src="https://www.uvui.cn/common/logo.png" width="120" height="120">
|
|
3
|
-
</p>
|
|
4
|
-
<h3 align="center">uv-ui</h3>
|
|
5
|
-
<h3 align="center">兼容vue3+2多平台快速开发的UI框架</h3>
|
|
1
|
+
# @gmcb/uv-ui
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
[](https://gitee.com/climblee/uv-ui)
|
|
9
|
-
[](https://github.com/climblee/uv-ui)
|
|
10
|
-
[](https://github.com/climblee/uv-ui/issues)
|
|
11
|
-
[](https://www.uvui.cn)
|
|
12
|
-
[](https://www.uvui.cn/components/changelog.html)
|
|
13
|
-
[](https://en.wikipedia.org/wiki/MIT_License)
|
|
3
|
+
基于 uv-ui 的 uni-app 多端 UI 组件包,包含组件、主题样式、工具函数和 `$uv` 全局能力。
|
|
14
4
|
|
|
15
|
-
##
|
|
5
|
+
## 安装
|
|
16
6
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
## uvui特点
|
|
21
|
-
|
|
22
|
-
1. **uv-ui的前世今生**,`uv-ui` 是基于 `uview2.x` 版本改造而来。重命名也是为了避开发布冲突和很多组件 `u-`在 `nvue` 中不能使用的情况,所以这才诞生了`uv-ui`。感谢 `uview-ui` 作者的开源奉献,再次为开源点赞。 同时 `uv-ui` 也是无条件开源。
|
|
23
|
-
|
|
24
|
-
2. **全端兼容**,`uv-ui`支持vue3、vue2、app-vue、app-nvue、h5、小程序等。`uv-ui`的组件都是多端自适应的,底层会抹平很多小程序平台的差异或bug。
|
|
25
|
-
|
|
26
|
-
3. **扩展配置**,`uv-ui`内置的方法默认不再挂载到`uni`对象之上,也就意味着默认情况下不能在项目中直接使用`uni.$uv.xxx`使用内置方法。但是可以通过扩展可以解决,通过如下方式进行配置即可,使用方式请参考[扩展配置](https://www.uvui.cn/components/setting.html)。其中包括[ JS工具库](https://www.uvui.cn/components/setting.html#%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE-js%E5%B7%A5%E5%85%B7%E5%BA%93)、[ 自定义主题](https://www.uvui.cn/components/setting.html#%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE-%E8%87%AA%E5%AE%9A%E4%B9%89%E4%B8%BB%E9%A2%98)、[ 基础样式](https://www.uvui.cn/components/setting.html#%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE-%E5%9F%BA%E7%A1%80%E6%A0%B7%E5%BC%8F)、[ setconfig](https://www.uvui.cn/components/setting.html#%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE-setconfig)等。
|
|
27
|
-
|
|
28
|
-
## 预览
|
|
29
|
-
|
|
30
|
-
通过微信(APP下载不支持微信扫码)或浏览器扫码查看演示效果。
|
|
31
|
-
|
|
32
|
-
<img src="https://mp-31ed6237-7b7b-4597-8448-a53d6d6031cf.cdn.bspapp.com/uvui/download-wx.png" width="200" /> <img src="https://mp-31ed6237-7b7b-4597-8448-a53d6d6031cf.cdn.bspapp.com/uvui/download-app.png" width="200" /> <img src="https://mp-31ed6237-7b7b-4597-8448-a53d6d6031cf.cdn.bspapp.com/uvui/download-h5.png" width="200" />
|
|
33
|
-
|
|
34
|
-
## 链接
|
|
35
|
-
|
|
36
|
-
- [官方文档](https://www.uvui.cn)
|
|
37
|
-
- [演示地址](https://h5.uvui.cn)
|
|
38
|
-
- [更新日志](https://www.uvui.cn/components/changelog.html)
|
|
39
|
-
- [关于我们](https://www.uvui.cn/cooperation/about.html)
|
|
40
|
-
- <a href="#list">组件列表</a>
|
|
7
|
+
```bash
|
|
8
|
+
npm i @gmcb/uv-ui
|
|
9
|
+
```
|
|
41
10
|
|
|
42
|
-
##
|
|
11
|
+
## 引入
|
|
43
12
|
|
|
44
|
-
|
|
13
|
+
在 uni-app 项目入口中注册:
|
|
45
14
|
|
|
46
|
-
|
|
15
|
+
```ts
|
|
16
|
+
import { createSSRApp } from 'vue';
|
|
17
|
+
import uvUI from '@gmcb/uv-ui';
|
|
18
|
+
import App from './App.vue';
|
|
47
19
|
|
|
48
|
-
|
|
20
|
+
export function createApp() {
|
|
21
|
+
const app = createSSRApp(App);
|
|
22
|
+
app.use(uvUI);
|
|
23
|
+
return {
|
|
24
|
+
app,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
```
|
|
49
28
|
|
|
50
|
-
|
|
29
|
+
引入基础样式:
|
|
51
30
|
|
|
52
|
-
|
|
31
|
+
```scss
|
|
32
|
+
@import '@gmcb/uv-ui/index.scss';
|
|
33
|
+
@import '@gmcb/uv-ui/theme.scss';
|
|
34
|
+
```
|
|
53
35
|
|
|
54
|
-
|
|
36
|
+
## easycom 配置
|
|
55
37
|
|
|
56
|
-
|
|
38
|
+
建议在 `pages.json` 中配置 easycom,组件即可在页面中直接使用:
|
|
57
39
|
|
|
58
|
-
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"easycom": {
|
|
43
|
+
"autoscan": true,
|
|
44
|
+
"custom": {
|
|
45
|
+
"^uv-(.*)": "@gmcb/uv-ui/components/uv-$1/uv-$1.vue"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
59
50
|
|
|
60
|
-
|
|
51
|
+
使用示例:
|
|
61
52
|
|
|
62
53
|
```html
|
|
63
54
|
<template>
|
|
64
|
-
|
|
55
|
+
<uv-button type="primary">提交</uv-button>
|
|
56
|
+
<uv-icon name="search" size="24"></uv-icon>
|
|
65
57
|
</template>
|
|
66
58
|
```
|
|
67
59
|
|
|
68
|
-
##
|
|
69
|
-
|
|
70
|
-
`uv-ui` 内置了强大的工具函数、请求封装等,可以根据自身需求进行扩展配置,详情请查看[扩展配置](https://www.uvui.cn/components/setting.html)。
|
|
60
|
+
## 全局能力
|
|
71
61
|
|
|
72
|
-
|
|
62
|
+
注册后会向 `uni.$uv` 注入常用工具:
|
|
73
63
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
64
|
+
| 能力 | 说明 |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| `uni.$uv.http` | 基于 `luch-request` 的请求实例。 |
|
|
67
|
+
| `uni.$uv.route` | 路由跳转封装。 |
|
|
68
|
+
| `uni.$uv.config` | uv-ui 配置。 |
|
|
69
|
+
| `uni.$uv.debounce` / `uni.$uv.throttle` | 防抖与节流。 |
|
|
70
|
+
| `uni.$uv.test` | 常用校验方法。 |
|
|
71
|
+
| `uni.$uv.colorGradient`、`hexToRgb`、`rgbToHex` | 颜色工具。 |
|
|
72
|
+
| `uni.$uv.platform` | 平台判断工具。 |
|
|
73
|
+
| `uni.$uv.compress` | 压缩工具。 |
|
|
74
|
+
|
|
75
|
+
Vue 3 项目中也可通过组件实例访问 `$uv`。
|
|
76
|
+
|
|
77
|
+
## 组件目录
|
|
78
|
+
|
|
79
|
+
组件位于 `components/uv-*`,常用组件包括:
|
|
80
|
+
|
|
81
|
+
- `uv-button`
|
|
82
|
+
- `uv-icon`
|
|
83
|
+
- `uv-form`
|
|
84
|
+
- `uv-input`
|
|
85
|
+
- `uv-popup`
|
|
86
|
+
- `uv-modal`
|
|
87
|
+
- `uv-tabs`
|
|
88
|
+
- `uv-navbar`
|
|
89
|
+
- `uv-upload`
|
|
90
|
+
- `uv-calendar`
|
|
91
|
+
- `uv-datetime-picker`
|
|
92
|
+
- `uv-swiper`
|
|
93
|
+
- `uv-list`
|
|
94
|
+
- `uv-cell`
|
|
95
|
+
- `uv-toast`
|
|
96
|
+
|
|
97
|
+
更多组件可查看 `components` 目录或 uv-ui 官方文档。
|
|
98
|
+
|
|
99
|
+
## 参考链接
|
|
100
|
+
|
|
101
|
+
- [本包文档入口](./docs/index.md)
|
|
102
|
+
- [uv-ui 官方文档](https://www.uvui.cn)
|
|
103
|
+
- [uv-ui 演示地址](https://h5.uvui.cn)
|
|
104
|
+
- [uv-ui 更新日志](https://www.uvui.cn/components/changelog.html)
|
|
105
|
+
|
|
106
|
+
## 本地文档
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pnpm -C packages/uv-ui run docs:dev
|
|
110
|
+
pnpm -C packages/uv-ui run docs:build
|
|
111
|
+
pnpm -C packages/uv-ui run docs:preview
|
|
112
|
+
```
|
|
77
113
|
|
|
78
|
-
|
|
114
|
+
## 注意事项
|
|
79
115
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
| uv-calendars | [新版日历(推荐)](https://www.uvui.cn/components/calendars.html) |
|
|
84
|
-
| uv-drop-down | [下拉筛选](https://www.uvui.cn/components/dropDown.html) |
|
|
85
|
-
| uv-scroll-list | [横向滚动列表](https://www.uvui.cn/components/scrollList.html) |
|
|
86
|
-
| uv-vtabs | [垂直选项卡](https://www.uvui.cn/components/vtabs.html) |
|
|
87
|
-
| uv-pick-color | [颜色选择器](https://www.uvui.cn/components/pickColor.html) |
|
|
88
|
-
| uv-qrcode | [二维码](https://www.uvui.cn/components/qrcode.html) |
|
|
89
|
-
| uv-waterfall | [瀑布流](https://www.uvui.cn/components/waterfall.html) |
|
|
90
|
-
| uv-row | [Layout 布局](https://www.uvui.cn/components/layout.html) |
|
|
91
|
-
| uv-icon | [图标](https://www.uvui.cn/components/icon.html) |
|
|
92
|
-
| uv-button | [按钮](https://www.uvui.cn/components/button.html) |
|
|
93
|
-
| uv-text | [文本](https://www.uvui.cn/components/text.html) |
|
|
94
|
-
| uv-link | [超链接](https://www.uvui.cn/components/link.html) |
|
|
95
|
-
| uv-image | [图片](https://www.uvui.cn/components/image.html) |
|
|
96
|
-
| uv-transition | [动画](https://www.uvui.cn/components/transition.html) |
|
|
97
|
-
| uv-form | [表单](https://www.uvui.cn/components/form.html) |
|
|
98
|
-
| uv-input | [增强输入框](https://www.uvui.cn/components/input.html) |
|
|
99
|
-
| uv-textarea | [增强文本域](https://www.uvui.cn/components/textarea.html) |
|
|
100
|
-
| uv-checkbox | [复选框](https://www.uvui.cn/components/checkbox.html) |
|
|
101
|
-
| uv-radio | [单选框](https://www.uvui.cn/components/radio.html) |
|
|
102
|
-
| uv-switch | [开关选择器](https://www.uvui.cn/components/switch.html) |
|
|
103
|
-
| uv-calendar | [日历](https://www.uvui.cn/components/calendar.html) |
|
|
104
|
-
| uv-picker | [选择器](https://www.uvui.cn/components/picker.html) |
|
|
105
|
-
| uv-datetime-picker | [时间选择器](https://www.uvui.cn/components/datetimePicker.html) |
|
|
106
|
-
| uv-code | [验证码倒计时](https://www.uvui.cn/components/code.html) |
|
|
107
|
-
| uv-keyboard | [键盘](https://www.uvui.cn/components/keyboard.html) |
|
|
108
|
-
| uv-rate | [评分](https://www.uvui.cn/components/rate.html) |
|
|
109
|
-
| uv-search | [多功能搜索框](https://www.uvui.cn/components/search.html) |
|
|
110
|
-
| uv-number-box | [步进器](https://www.uvui.cn/components/numberBox.html) |
|
|
111
|
-
| uv-upload | [上传](https://www.uvui.cn/components/upload.html) |
|
|
112
|
-
| uv-slider | [滑动选择器](https://www.uvui.cn/components/slider.html) |
|
|
113
|
-
| uv-list | [列表](https://www.uvui.cn/components/list.html) |
|
|
114
|
-
| uv-index-list | [索引列表](https://www.uvui.cn/components/indexList.html) |
|
|
115
|
-
| uv-tags | [标签](https://www.uvui.cn/components/tag.html) |
|
|
116
|
-
| uv-line-progress | [线形进度条](https://www.uvui.cn/components/lineProgress.html) |
|
|
117
|
-
| uv-badge | [徽标数](https://www.uvui.cn/components/badge.html) |
|
|
118
|
-
| uv-count-down | [倒计时](https://www.uvui.cn/components/countDown.html) |
|
|
119
|
-
| uv-count-to | [数字滚动](https://www.uvui.cn/components/countTo.html) |
|
|
120
|
-
| uv-avatar | [头像](https://www.uvui.cn/components/avatar.html) |
|
|
121
|
-
| uv-skeleton | [骨架屏](https://www.uvui.cn/components/skeleton.html) |
|
|
122
|
-
| uv-loading-icon | [加载动画](https://www.uvui.cn/components/loadingIcon.html) |
|
|
123
|
-
| uv-loading-page | [加载页](https://www.uvui.cn/components/loadingPage.html) |
|
|
124
|
-
| uv-load-more | [加载更多](https://www.uvui.cn/components/loadMore.html) |
|
|
125
|
-
| uv-empty | [内容为空](https://www.uvui.cn/components/empty.html) |
|
|
126
|
-
| uv-tooltip | [长按提示](https://www.uvui.cn/components/tooltip.html) |
|
|
127
|
-
| uv-alert | [警告提示](https://www.uvui.cn/components/alert.html) |
|
|
128
|
-
| uv-toast | [消息提示](https://www.uvui.cn/components/toast.html) |
|
|
129
|
-
| uv-notice-bar | [滚动通知](https://www.uvui.cn/components/noticeBar.html) |
|
|
130
|
-
| uv-notify | [消息提示](https://www.uvui.cn/components/notify.html) |
|
|
131
|
-
| uv-no-network | [无网络提示](https://www.uvui.cn/components/noNetwork.html) |
|
|
132
|
-
| uv-popup | [弹出层](https://www.uvui.cn/components/popup.html) |
|
|
133
|
-
| uv-modal | [模态框](https://www.uvui.cn/components/modal.html) |
|
|
134
|
-
| uv-cell | [单元格](https://www.uvui.cn/components/cell.html) |
|
|
135
|
-
| uv-swipe-action | [滑动单元格](https://www.uvui.cn/components/swipeAction.html) |
|
|
136
|
-
| uv-swiper | [轮播图](https://www.uvui.cn/components/swiper.html) |
|
|
137
|
-
| uv-collapse | [折叠面板](https://www.uvui.cn/components/collapse.html) |
|
|
138
|
-
| uv-grid | [宫格布局](https://www.uvui.cn/components/grid.html) |
|
|
139
|
-
| uv-album | [相册](https://www.uvui.cn/components/album.html) |
|
|
140
|
-
| uv-tabbar | [底部导航栏](https://www.uvui.cn/components/tabbar.html) |
|
|
141
|
-
| uv-back-top | [返回顶部](https://www.uvui.cn/components/backTop.html) |
|
|
142
|
-
| uv-navbar | [自定义导航栏](https://www.uvui.cn/components/navbar.html) |
|
|
143
|
-
| uv-action-sheet | [底部操作菜单](https://www.uvui.cn/components/actionSheet.html) |
|
|
144
|
-
| uv-tabs | [标签选项卡](https://www.uvui.cn/components/tabs.html) |
|
|
145
|
-
| uv-steps | [步骤条](https://www.uvui.cn/components/steps.html) |
|
|
146
|
-
| uv-subsection | [分段器](https://www.uvui.cn/components/subsection.html) |
|
|
147
|
-
| uv-sticky | [吸顶](https://www.uvui.cn/components/sticky.html) |
|
|
148
|
-
| uv-parse | [富文本解析器](https://www.uvui.cn/components/parse.html) |
|
|
149
|
-
| uv-overlay | [遮罩层](https://www.uvui.cn/components/overlay.html) |
|
|
150
|
-
| uv-code-input | [验证码输入](https://www.uvui.cn/components/codeInput.html) |
|
|
151
|
-
| uv-read-more | [展开阅读更多](https://www.uvui.cn/components/readMore.html) |
|
|
152
|
-
| uv-line | [线条](https://www.uvui.cn/components/line.html) |
|
|
153
|
-
| uv-gap | [间隔槽](https://www.uvui.cn/components/gap.html) |
|
|
154
|
-
| uv-divider | [分割线](https://www.uvui.cn/components/divider.html) |
|
|
155
|
-
|
|
156
|
-
## 版权信息
|
|
157
|
-
uv-ui遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uv-ui应用到您的产品中。
|
|
158
|
-
|
|
159
|
-
## 作者想说
|
|
160
|
-
- 开源真的不易,不图大家的钱财,所以希望大家多多鼓励支持,希望不要恶意评论,有问题加群快速解决。
|
|
161
|
-
- 遇到BUG,是一件很正常的事情,是程序肯定就有BUG,所以希望大家能以理解的心态去提出BUG,然后作者才有动力去努力修复。
|
|
162
|
-
- 最后觉得好用的小伙伴,不要吝啬你的双手,给个好评就是给我们最大的鼓励。
|
|
163
|
-
|
|
164
|
-
# 恶评者手下留情,有事加QQ群解决:549833913
|
|
116
|
+
- 本包面向 uni-app 多端项目,组件依赖 uni-app 运行环境。
|
|
117
|
+
- 小程序端如需分享 mixin,可在注册时传入对应选项,具体行为以 `index.js` 为准。
|
|
118
|
+
- 修改组件或主题后,请在示例项目中至少验证 H5 和目标小程序/App 平台。
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
props: {
|
|
3
|
-
// 是否显示遮罩
|
|
4
|
-
show: {
|
|
5
|
-
type: Boolean,
|
|
6
|
-
default: false
|
|
7
|
-
},
|
|
8
|
-
// 层级z-index
|
|
9
|
-
zIndex: {
|
|
10
|
-
type: [String, Number],
|
|
11
|
-
default: 10070
|
|
12
|
-
},
|
|
13
|
-
// 遮罩的过渡时间,单位为ms
|
|
14
|
-
duration: {
|
|
15
|
-
type: [String, Number],
|
|
16
|
-
default: 300
|
|
17
|
-
},
|
|
18
|
-
// 不透明度值,当做rgba的第四个参数
|
|
19
|
-
opacity: {
|
|
20
|
-
type: [String, Number],
|
|
21
|
-
default: 0.5
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
// 是否显示遮罩
|
|
4
|
+
show: {
|
|
5
|
+
type: Boolean,
|
|
6
|
+
default: false
|
|
7
|
+
},
|
|
8
|
+
// 层级z-index
|
|
9
|
+
zIndex: {
|
|
10
|
+
type: [String, Number],
|
|
11
|
+
default: 10070
|
|
12
|
+
},
|
|
13
|
+
// 遮罩的过渡时间,单位为ms
|
|
14
|
+
duration: {
|
|
15
|
+
type: [String, Number],
|
|
16
|
+
default: 300
|
|
17
|
+
},
|
|
18
|
+
// 不透明度值,当做rgba的第四个参数
|
|
19
|
+
opacity: {
|
|
20
|
+
type: [String, Number],
|
|
21
|
+
default: 0.5
|
|
22
|
+
},
|
|
23
|
+
// 显示时body是否添加overflow: hidden
|
|
24
|
+
hidden: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: true
|
|
27
|
+
},
|
|
28
|
+
...uni.$uv?.props?.overlay
|
|
29
|
+
}
|
|
25
30
|
}
|
|
@@ -1,85 +1,87 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<uv-transition
|
|
3
|
-
:show="show"
|
|
4
|
-
mode="fade"
|
|
5
|
-
custom-class="uv-overlay"
|
|
6
|
-
:duration="duration"
|
|
7
|
-
:custom-style="overlayStyle"
|
|
8
|
-
@click="clickHandler"
|
|
9
|
-
@touchmove.stop.prevent="clear"
|
|
10
|
-
>
|
|
11
|
-
<slot />
|
|
12
|
-
</uv-transition>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
import mpMixin from '../../libs/mixin/mpMixin.js'
|
|
17
|
-
import mixin from '../../libs/mixin/mixin.js'
|
|
18
|
-
import props from './props.js';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* overlay 遮罩
|
|
22
|
-
* @description 创建一个遮罩层,用于强调特定的页面元素,并阻止用户对遮罩下层的内容进行操作,一般用于弹窗场景
|
|
23
|
-
* @tutorial https://www.uvui.cn/components/overlay.html
|
|
24
|
-
* @property {Boolean} show 是否显示遮罩(默认 false )
|
|
25
|
-
* @property {String | Number} zIndex zIndex 层级(默认 10070 )
|
|
26
|
-
* @property {String | Number} duration 动画时长,单位毫秒(默认 300 )
|
|
27
|
-
* @property {String | Number} opacity 不透明度值,当做rgba的第四个参数 (默认 0.5 )
|
|
28
|
-
* @property {Object} customStyle 定义需要用到的外部样式
|
|
29
|
-
* @event {Function} click 点击遮罩发送事件
|
|
30
|
-
* @example <uv-overlay :show="show" @click="show = false"></uv-overlay>
|
|
31
|
-
*/
|
|
32
|
-
export default {
|
|
33
|
-
name: "uv-overlay",
|
|
34
|
-
emits: ['click'],
|
|
35
|
-
mixins: [mpMixin, mixin, props],
|
|
36
|
-
watch: {
|
|
37
|
-
show(newVal){
|
|
38
|
-
// #ifdef H5
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
$uv-overlay-
|
|
74
|
-
$uv-overlay-
|
|
75
|
-
$uv-overlay-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<uv-transition
|
|
3
|
+
:show="show"
|
|
4
|
+
mode="fade"
|
|
5
|
+
custom-class="uv-overlay"
|
|
6
|
+
:duration="duration"
|
|
7
|
+
:custom-style="overlayStyle"
|
|
8
|
+
@click="clickHandler"
|
|
9
|
+
@touchmove.stop.prevent="clear"
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
12
|
+
</uv-transition>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import mpMixin from '../../libs/mixin/mpMixin.js'
|
|
17
|
+
import mixin from '../../libs/mixin/mixin.js'
|
|
18
|
+
import props from './props.js';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* overlay 遮罩
|
|
22
|
+
* @description 创建一个遮罩层,用于强调特定的页面元素,并阻止用户对遮罩下层的内容进行操作,一般用于弹窗场景
|
|
23
|
+
* @tutorial https://www.uvui.cn/components/overlay.html
|
|
24
|
+
* @property {Boolean} show 是否显示遮罩(默认 false )
|
|
25
|
+
* @property {String | Number} zIndex zIndex 层级(默认 10070 )
|
|
26
|
+
* @property {String | Number} duration 动画时长,单位毫秒(默认 300 )
|
|
27
|
+
* @property {String | Number} opacity 不透明度值,当做rgba的第四个参数 (默认 0.5 )
|
|
28
|
+
* @property {Object} customStyle 定义需要用到的外部样式
|
|
29
|
+
* @event {Function} click 点击遮罩发送事件
|
|
30
|
+
* @example <uv-overlay :show="show" @click="show = false"></uv-overlay>
|
|
31
|
+
*/
|
|
32
|
+
export default {
|
|
33
|
+
name: "uv-overlay",
|
|
34
|
+
emits: ['click'],
|
|
35
|
+
mixins: [mpMixin, mixin, props],
|
|
36
|
+
watch: {
|
|
37
|
+
show(newVal){
|
|
38
|
+
// #ifdef H5
|
|
39
|
+
if (this.hidden) {
|
|
40
|
+
if(newVal){
|
|
41
|
+
document.querySelector('body').style.overflow = 'hidden';
|
|
42
|
+
}else{
|
|
43
|
+
document.querySelector('body').style.overflow = '';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// #endif
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
computed: {
|
|
50
|
+
overlayStyle() {
|
|
51
|
+
const style = {
|
|
52
|
+
position: 'fixed',
|
|
53
|
+
top: 0,
|
|
54
|
+
left: 0,
|
|
55
|
+
right: 0,
|
|
56
|
+
zIndex: this.zIndex,
|
|
57
|
+
bottom: 0,
|
|
58
|
+
'background-color': `rgba(0, 0, 0, ${this.opacity})`
|
|
59
|
+
}
|
|
60
|
+
return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle))
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
methods: {
|
|
64
|
+
clickHandler() {
|
|
65
|
+
this.$emit('click')
|
|
66
|
+
},
|
|
67
|
+
clear() {}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
<style lang="scss" scoped>
|
|
72
|
+
/* #ifndef APP-NVUE */
|
|
73
|
+
$uv-overlay-top:0 !default;
|
|
74
|
+
$uv-overlay-left:0 !default;
|
|
75
|
+
$uv-overlay-width:100% !default;
|
|
76
|
+
$uv-overlay-height:100% !default;
|
|
77
|
+
$uv-overlay-background-color:rgba(0, 0, 0, .7) !default;
|
|
78
|
+
.uv-overlay {
|
|
79
|
+
position: fixed;
|
|
80
|
+
top:$uv-overlay-top;
|
|
81
|
+
left:$uv-overlay-left;
|
|
82
|
+
width: $uv-overlay-width;
|
|
83
|
+
height:$uv-overlay-height;
|
|
84
|
+
background-color:$uv-overlay-background-color;
|
|
85
|
+
}
|
|
86
|
+
/* #endif */
|
|
87
|
+
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
## color 颜色值
|
|
2
|
+
|
|
3
|
+
此功能为uv-ui内部通过js提供的一些颜色值,可以用于通过js修改元素字体,背景颜色等一些场景,常用于uv-ui的各个组件中。
|
|
4
|
+
这些颜色值,挂载在`$uv`对象下的`color`数组中,关于这些颜色值的具体描述,详见[Color 色彩](/components/color.html)
|
|
5
|
+
使用方法:如使用`primary`颜色值,方法为:`$uv.color['primary']`
|
|
6
|
+
|
|
7
|
+
**说明**:这些通过JS调用的颜色值,也是能通过CSS调用的,二者等价。详见[Color 色彩](/components/color.html)
|
|
8
|
+
|
|
9
|
+
### 主题颜色
|
|
10
|
+
|
|
11
|
+
该主题颜色值,一共有5个,分别是`primary`、`error`、`success`、`info`、`warning`
|
|
12
|
+
|
|
13
|
+
```vue
|
|
14
|
+
<script setup>
|
|
15
|
+
import { onLoad } from '@dcloudio/uni-app';
|
|
16
|
+
|
|
17
|
+
onLoad(() => {
|
|
18
|
+
console.log(uni.$uv.color['error']);
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### 文字颜色
|
|
25
|
+
|
|
26
|
+
uv-ui一共提供了四个颜色值,具体请见组件部分[Color色彩](/components/color.html)
|
|
27
|
+
分别有:`mainColor`、`contentColor`、`tipsColor`、`lightColor`、`borderColor`(边框颜色值)
|
|
28
|
+
|
|
29
|
+
```vue
|
|
30
|
+
<script setup>
|
|
31
|
+
import { onLoad } from '@dcloudio/uni-app';
|
|
32
|
+
|
|
33
|
+
onLoad(() => {
|
|
34
|
+
console.log(uni.$uv.color['contentColor']);
|
|
35
|
+
});
|
|
36
|
+
</script>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### 背景颜色
|
|
41
|
+
|
|
42
|
+
uv-ui提供了一个浅灰的背景颜色值,该值为`#f3f4f6`
|
|
43
|
+
|
|
44
|
+
```vue
|
|
45
|
+
<script setup>
|
|
46
|
+
import { onLoad } from '@dcloudio/uni-app';
|
|
47
|
+
|
|
48
|
+
onLoad(() => {
|
|
49
|
+
console.log(uni.$uv.color['bgColor']);
|
|
50
|
+
});
|
|
51
|
+
</script>
|
|
52
|
+
```
|