uview-pro 0.0.3 → 0.0.4
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 +25 -1
- package/components/u-action-sheet/u-action-sheet.vue +4 -4
- package/components/u-avatar/u-avatar.vue +1 -1
- package/components/u-badge/u-badge.vue +1 -1
- package/components/u-button/u-button.vue +1 -1
- package/components/u-card/u-card.vue +1 -1
- package/components/u-cell-group/u-cell-group.vue +1 -1
- package/components/u-cell-item/u-cell-item.vue +1 -1
- package/components/u-checkbox/u-checkbox.vue +1 -1
- package/components/u-checkbox-group/u-checkbox-group.vue +1 -1
- package/components/u-circle-progress/u-circle-progress.vue +1 -1
- package/components/u-col/u-col.vue +1 -1
- package/components/u-collapse/u-collapse.vue +1 -1
- package/components/u-collapse-item/u-collapse-item.vue +2 -2
- package/components/u-count-down/u-count-down.vue +1 -1
- package/components/u-count-to/u-count-to.vue +1 -1
- package/components/u-divider/u-divider.vue +1 -1
- package/components/u-empty/u-empty.vue +1 -1
- package/components/u-field/u-field.vue +1 -1
- package/components/u-gap/u-gap.vue +1 -1
- package/components/u-grid/u-grid.vue +1 -1
- package/components/u-grid-item/u-grid-item.vue +1 -1
- package/components/u-icon/u-icon.vue +29 -23
- package/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/components/u-index-list/u-index-list.vue +1 -1
- package/components/u-keyboard/u-keyboard.vue +1 -1
- package/components/u-lazy-load/u-lazy-load.vue +1 -1
- package/components/u-line/u-line.vue +1 -1
- package/components/u-line-progress/u-line-progress.vue +1 -1
- package/components/u-link/u-link.vue +1 -1
- package/components/u-loading/u-loading.vue +1 -1
- package/components/u-loadmore/u-loadmore.vue +1 -1
- package/components/u-mask/u-mask.vue +1 -1
- package/components/u-message-input/u-message-input.vue +1 -1
- package/components/u-modal/u-modal.vue +1 -1
- package/components/u-navbar/u-navbar.vue +1 -1
- package/components/u-no-network/u-no-network.vue +1 -1
- package/components/u-notice-bar/u-notice-bar.vue +1 -1
- package/components/u-number-box/u-number-box.vue +1 -1
- package/components/u-picker/u-picker.vue +1 -1
- package/components/u-popup/u-popup.vue +1 -1
- package/components/u-radio/u-radio.vue +1 -1
- package/components/u-radio-group/u-radio-group.vue +1 -1
- package/components/u-rate/u-rate.vue +1 -1
- package/components/u-read-more/u-read-more.vue +1 -1
- package/components/u-row/u-row.vue +1 -1
- package/components/u-search/u-search.vue +1 -1
- package/components/u-section/u-section.vue +1 -1
- package/components/u-skeleton/u-skeleton.vue +1 -1
- package/components/u-steps/u-steps.vue +1 -1
- package/components/u-sticky/u-sticky.vue +1 -1
- package/components/u-subsection/u-subsection.vue +1 -1
- package/components/u-swipe-action/u-swipe-action.vue +1 -1
- package/components/u-swiper/u-swiper.vue +1 -1
- package/components/u-switch/u-switch.vue +1 -1
- package/components/u-table/u-table.vue +1 -1
- package/components/u-tabs/u-tabs.vue +1 -1
- package/components/u-tabs-swiper/u-tabs-swiper.vue +1 -1
- package/components/u-tag/u-tag.vue +1 -1
- package/components/u-td/u-td.vue +1 -1
- package/components/u-th/u-th.vue +1 -1
- package/components/u-time-line/u-time-line.vue +1 -1
- package/components/u-time-line-item/u-time-line-item.vue +1 -1
- package/components/u-toast/u-toast.vue +1 -1
- package/components/u-top-tips/u-top-tips.vue +1 -1
- package/components/u-tr/u-tr.vue +1 -1
- package/components/u-upload/u-upload.vue +1 -1
- package/components/u-verification-code/u-verification-code.vue +1 -1
- package/components/u-waterfall/u-waterfall.vue +1 -1
- package/libs/function/md5.ts +3 -1
- package/libs/request/uni-http.md +156 -0
- package/libs/request/uni-http.ts +373 -0
- package/package.json +1 -1
- package/readme.md +24 -10
package/changelog.md
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
|
+
## 0.0.4(2025-08-14)
|
|
2
|
+
|
|
3
|
+
### 新增
|
|
4
|
+
|
|
5
|
+
- `u-icon` 组件新增 `space` 属性,表示`label` 在四周时与图标的距离,权重高于 `margin`,单位 rpx
|
|
6
|
+
- 新增`$u`工具库各类方法,同步文档
|
|
7
|
+
- 组件全部 setup 化,全面支持 TypeScript 和 Vue3
|
|
8
|
+
- 工具库示例页面全部 setup 化
|
|
9
|
+
|
|
10
|
+
### 优化
|
|
11
|
+
|
|
12
|
+
- 组件样式兼容多端
|
|
13
|
+
- 代码注释与类型完善
|
|
14
|
+
- 优化演示代码兼容性
|
|
15
|
+
|
|
16
|
+
### 修复
|
|
17
|
+
|
|
18
|
+
- 修复类型声明、变量冲突、lint 报错等问题
|
|
19
|
+
|
|
1
20
|
## 0.0.3(2025-08-06)
|
|
2
|
-
|
|
21
|
+
|
|
22
|
+
- 添加插件使用示例工程
|
|
23
|
+
|
|
3
24
|
## 0.0.2(2025-08-04)
|
|
25
|
+
|
|
4
26
|
- 解决一些 npm 包依赖问题
|
|
27
|
+
|
|
5
28
|
## 0.0.1(2025-08-04)
|
|
29
|
+
|
|
6
30
|
- 70+精选组件,使用 Vue3+TS 全面重构,功能丰富,多端兼容,让您快速集成,开箱即用
|
|
7
31
|
- 兼容安卓,iOS,微信小程序,H5 等
|
|
8
32
|
- 详尽的文档支持,现代化的演示效果
|
|
@@ -44,9 +44,9 @@ defineOptions({
|
|
|
44
44
|
/**
|
|
45
45
|
* actionSheet 操作菜单
|
|
46
46
|
* @description 本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheetAPI,配置更加灵活,所有平台都表现一致。
|
|
47
|
-
* @tutorial https://uview-pro.
|
|
48
|
-
* @property {Array<
|
|
49
|
-
* @property {
|
|
47
|
+
* @tutorial https://uview-pro.netlify.app/components/actionSheet.html
|
|
48
|
+
* @property {Array<{ text: string; subText?: string; color?: string; fontSize?: string; disabled?: boolean }>} list 按钮的文字数组,见官方文档示例
|
|
49
|
+
* @property {{text: string; color?: string; fontSize?: string}} tips 顶部的提示文字,见官方文档示例
|
|
50
50
|
* @property {String} cancel-text 取消按钮的提示文字
|
|
51
51
|
* @property {Boolean} cancel-btn 是否显示底部的取消按钮(默认true)
|
|
52
52
|
* @property {Number String} border-radius 弹出部分顶部左右的圆角值,单位rpx(默认0)
|
|
@@ -67,7 +67,7 @@ const props = defineProps({
|
|
|
67
67
|
},
|
|
68
68
|
/** 按钮的文字数组,可以自定义颜色和字体大小,字体单位为rpx */
|
|
69
69
|
list: {
|
|
70
|
-
type: Array as () => Array<
|
|
70
|
+
type: Array as () => Array<{ text: string; subText?: string; color?: string; fontSize?: string; disabled?: boolean }>,
|
|
71
71
|
default: () => []
|
|
72
72
|
},
|
|
73
73
|
/** 顶部的提示文字 */
|
|
@@ -25,7 +25,7 @@ let base64Avatar =
|
|
|
25
25
|
/**
|
|
26
26
|
* avatar 头像
|
|
27
27
|
* @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。
|
|
28
|
-
* @tutorial https://uview-pro.
|
|
28
|
+
* @tutorial https://uview-pro.netlify.app/components/avatar.html
|
|
29
29
|
* @property {String} bg-color 背景颜色,一般显示文字时用(默认#ffffff)
|
|
30
30
|
* @property {String} src 头像路径,如加载失败,将会显示默认头像
|
|
31
31
|
* @property {String Number} size 头像尺寸,可以为指定字符串(large, default, mini),或者数值,单位rpx(默认default)
|
|
@@ -29,7 +29,7 @@ defineOptions({
|
|
|
29
29
|
/**
|
|
30
30
|
* badge 角标
|
|
31
31
|
* @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。
|
|
32
|
-
* @tutorial https://uview-pro.
|
|
32
|
+
* @tutorial https://uview-pro.netlify.app/components/badge.html
|
|
33
33
|
* @property {String|Number} count 展示的数字,大于 overflowCount 时显示为 ${overflowCount}+,为0且show-zero为false时隐藏
|
|
34
34
|
* @property {Boolean} is-dot 不展示数字,只有一个小点(默认false)
|
|
35
35
|
* @property {Boolean} absolute 组件是否绝对定位,为true时,offset参数才有效(默认true)
|
|
@@ -66,7 +66,7 @@ defineOptions({
|
|
|
66
66
|
/**
|
|
67
67
|
* button 按钮
|
|
68
68
|
* @description Button 按钮
|
|
69
|
-
* @tutorial https://uview-pro.
|
|
69
|
+
* @tutorial https://uview-pro.netlify.app/components/button.html
|
|
70
70
|
* @property {String} size 按钮的大小
|
|
71
71
|
* @property {Boolean} ripple 是否开启点击水波纹效果
|
|
72
72
|
* @property {String} ripple-bg-color 水波纹的背景色,ripple为true时有效
|
|
@@ -82,7 +82,7 @@ defineOptions({
|
|
|
82
82
|
/**
|
|
83
83
|
* card 卡片
|
|
84
84
|
* @description 卡片组件一般用于多个列表条目,且风格统一的场景
|
|
85
|
-
* @tutorial https://uview-pro.
|
|
85
|
+
* @tutorial https://uview-pro.netlify.app/components/card.html
|
|
86
86
|
* @property {Boolean} full 卡片与屏幕两侧是否留空隙(默认false)
|
|
87
87
|
* @property {String} title 头部左边的标题
|
|
88
88
|
* @property {String} title-color 标题颜色(默认#303133)
|
|
@@ -17,7 +17,7 @@ defineOptions({
|
|
|
17
17
|
/**
|
|
18
18
|
* cellGroup 单元格父组件Group
|
|
19
19
|
* @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。搭配u-cell-item
|
|
20
|
-
* @tutorial https://uview-pro.
|
|
20
|
+
* @tutorial https://uview-pro.netlify.app/components/cell.html
|
|
21
21
|
* @property {String} title 分组标题
|
|
22
22
|
* @property {Boolean} border 是否显示外边框(默认true)
|
|
23
23
|
* @property {Object} title-style 分组标题的的样式,对象形式,如{'font-size': '24rpx'} 或 {'fontSize': '24rpx'}
|
|
@@ -45,7 +45,7 @@ defineOptions({
|
|
|
45
45
|
/**
|
|
46
46
|
* cellItem 单元格Item
|
|
47
47
|
* @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。搭配u-cell-group使用
|
|
48
|
-
* @tutorial https://uview-pro.
|
|
48
|
+
* @tutorial https://uview-pro.netlify.app/components/cell.html
|
|
49
49
|
* @property {String} title 左侧标题
|
|
50
50
|
* @property {String} icon 左侧图标名,只支持uView内置图标,见Icon 图标
|
|
51
51
|
* @property {Object} icon-style 左边图标的样式,对象形式
|
|
@@ -26,7 +26,7 @@ defineOptions({
|
|
|
26
26
|
/**
|
|
27
27
|
* checkbox 复选框
|
|
28
28
|
* @description 该组件需要搭配checkboxGroup组件使用,以便用户进行操作时,获得当前复选框组的选中情况。
|
|
29
|
-
* @tutorial https://uview-pro.
|
|
29
|
+
* @tutorial https://uview-pro.netlify.app/components/checkbox.html
|
|
30
30
|
* @property {String Number} icon-size 图标大小,单位rpx(默认20)
|
|
31
31
|
* @property {String Number} label-size label字体大小,单位rpx(默认28)
|
|
32
32
|
* @property {String Number} name checkbox组件的标示符
|
|
@@ -15,7 +15,7 @@ defineOptions({
|
|
|
15
15
|
/**
|
|
16
16
|
* checkboxGroup 开关选择器父组件Group
|
|
17
17
|
* @description 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便
|
|
18
|
-
* @tutorial https://uview-pro.
|
|
18
|
+
* @tutorial https://uview-pro.netlify.app/components/checkbox.html
|
|
19
19
|
* @property {String Number} max 最多能选中多少个checkbox(默认999)
|
|
20
20
|
* @property {String Number} size 组件整体的大小,单位rpx(默认40)
|
|
21
21
|
* @property {Boolean} disabled 是否禁用所有checkbox(默认false)
|
|
@@ -43,7 +43,7 @@ defineOptions({
|
|
|
43
43
|
/**
|
|
44
44
|
* circleProgress 环形进度条
|
|
45
45
|
* @description 展示操作或任务的当前进度,比如上传文件,是一个圆形的进度条。注意:此组件的percent值只能动态增加,不能动态减少。
|
|
46
|
-
* @tutorial https://uview-pro.
|
|
46
|
+
* @tutorial https://uview-pro.netlify.app/components/circleProgress.html
|
|
47
47
|
* @property {String Number} percent 圆环进度百分比值,为数值类型,0-100
|
|
48
48
|
* @property {String} inactive-color 圆环的底色,默认为灰色(该值无法动态变更)(默认#ececec)
|
|
49
49
|
* @property {String} active-color 圆环激活部分的颜色(该值无法动态变更)(默认#19be6b)
|
|
@@ -14,7 +14,7 @@ defineOptions({
|
|
|
14
14
|
/**
|
|
15
15
|
* col 布局单元格
|
|
16
16
|
* @description 通过基础的 12 分栏,迅速简便地创建布局(搭配<u-row>使用)
|
|
17
|
-
* @tutorial https://uview-pro.
|
|
17
|
+
* @tutorial https://uview-pro.netlify.app/components/layout.html
|
|
18
18
|
* @property {String|Number} span 栅格占据的列数,总12等分(默认0)
|
|
19
19
|
* @property {String} text-align 文字水平对齐方式(默认left)
|
|
20
20
|
* @property {String|Number} offset 分栏左边偏移,计算方式与span相同(默认0)
|
|
@@ -14,7 +14,7 @@ defineOptions({
|
|
|
14
14
|
/**
|
|
15
15
|
* collapse 手风琴
|
|
16
16
|
* @description 通过折叠面板收纳内容区域
|
|
17
|
-
* @tutorial https://uview-pro.
|
|
17
|
+
* @tutorial https://uview-pro.netlify.app/components/collapse.html
|
|
18
18
|
* @property {Boolean} accordion 是否手风琴模式(默认true)
|
|
19
19
|
* @property {Boolean} arrow 是否显示标题右侧的箭头(默认true)
|
|
20
20
|
* @property {String} arrow-color 标题右侧箭头的颜色(默认#909399)
|
|
@@ -31,7 +31,7 @@ defineOptions({
|
|
|
31
31
|
/**
|
|
32
32
|
* collapseItem 手风琴Item
|
|
33
33
|
* @description 通过折叠面板收纳内容区域(搭配u-collapse使用)
|
|
34
|
-
* @tutorial https://uview-pro.
|
|
34
|
+
* @tutorial https://uview-pro.netlify.app/components/collapse.html
|
|
35
35
|
* @property {String} title 面板标题
|
|
36
36
|
* @property {String Number} index 主要用于事件的回调,标识那个Item被点击
|
|
37
37
|
* @property {Boolean} disabled 面板是否可以打开或收起(默认false)
|
|
@@ -121,7 +121,7 @@ function headClick() {
|
|
|
121
121
|
* 查询内容高度
|
|
122
122
|
*/
|
|
123
123
|
function queryRect() {
|
|
124
|
-
// getRect为uView自带的节点查询简化方法,详见文档介绍:https://uview-pro.
|
|
124
|
+
// getRect为uView自带的节点查询简化方法,详见文档介绍:https://uview-pro.netlify.app/js/getRect.html
|
|
125
125
|
// 组件内部一般用this.$uGetRect,对外的为this.$u.getRect,二者功能一致,名称不同
|
|
126
126
|
$u.getRect('#' + elId.value, instance).then((res: any) => {
|
|
127
127
|
height.value = res.height;
|
|
@@ -59,7 +59,7 @@ defineOptions({ name: 'u-count-down' });
|
|
|
59
59
|
/**
|
|
60
60
|
* countDown 倒计时
|
|
61
61
|
* @description 该组件一般使用于某个活动的截止时间上,通过数字的变化,给用户明确的时间感受,提示用户进行某一个行为操作。
|
|
62
|
-
* @tutorial https://uview-pro.
|
|
62
|
+
* @tutorial https://uview-pro.netlify.app/components/countDown.html
|
|
63
63
|
* @property {String | Number} timestamp 倒计时,单位为秒
|
|
64
64
|
* @property {Boolean} autoplay 是否自动开始倒计时,如果为false,需手动调用开始方法。见官网说明(默认true)
|
|
65
65
|
* @property {String} separator 分隔符,colon为英文冒号,zh为中文(默认colon)
|
|
@@ -19,7 +19,7 @@ defineOptions({ name: 'u-count-to' });
|
|
|
19
19
|
/**
|
|
20
20
|
* countTo 数字滚动
|
|
21
21
|
* @description 该组件一般用于需要滚动数字到某一个值的场景,目标要求是一个递增的值。
|
|
22
|
-
* @tutorial https://uview-pro.
|
|
22
|
+
* @tutorial https://uview-pro.netlify.app/components/countTo.html
|
|
23
23
|
* @property {String | Number} start-val 开始值
|
|
24
24
|
* @property {String | Number} end-val 结束值
|
|
25
25
|
* @property {String | Number} duration 滚动过程所需的时间,单位ms(默认2000)
|
|
@@ -33,7 +33,7 @@ defineOptions({
|
|
|
33
33
|
/**
|
|
34
34
|
* divider 分割线
|
|
35
35
|
* @description 区隔内容的分割线,一般用于页面底部"没有更多"的提示。
|
|
36
|
-
* @tutorial https://uview-pro.
|
|
36
|
+
* @tutorial https://uview-pro.netlify.app/components/divider.html
|
|
37
37
|
* @property {String Number} half-width 文字左或右边线条宽度,数值或百分比,数值时单位为rpx
|
|
38
38
|
* @property {String} border-color 线条颜色,优先级高于type(默认#dcdfe6)
|
|
39
39
|
* @property {String} color 文字颜色(默认#909399)
|
|
@@ -25,7 +25,7 @@ defineOptions({
|
|
|
25
25
|
/**
|
|
26
26
|
* empty 内容为空
|
|
27
27
|
* @description 该组件用于需要加载内容,但是加载的第一页数据就为空,提示一个"没有内容"的场景, 我们精心挑选了十几个场景的图标,方便您使用。
|
|
28
|
-
* @tutorial https://uview-pro.
|
|
28
|
+
* @tutorial https://uview-pro.netlify.app/components/empty.html
|
|
29
29
|
* @property {String} color 文字颜色(默认#c0c4cc)
|
|
30
30
|
* @property {String} text 文字提示(默认“无内容”)
|
|
31
31
|
* @property {String} src 自定义图标路径,如定义,mode参数会失效
|
|
@@ -87,7 +87,7 @@ defineOptions({ name: 'u-field' });
|
|
|
87
87
|
/**
|
|
88
88
|
* field 输入框
|
|
89
89
|
* @description 借助此组件,可以实现表单的输入, 有"text"和"textarea"类型的,此外,借助uView的picker和actionSheet组件可以快速实现上拉菜单,时间,地区选择等, 为表单解决方案的利器。
|
|
90
|
-
* @tutorial https://uview-pro.
|
|
90
|
+
* @tutorial https://uview-pro.netlify.app/components/field.html
|
|
91
91
|
* @property {String} type 输入框的类型(默认text)
|
|
92
92
|
* @property {String} icon label左边的图标,限uView的图标名称
|
|
93
93
|
* @property {Object} icon-style 左边图标的样式,对象形式
|
|
@@ -12,7 +12,7 @@ defineOptions({
|
|
|
12
12
|
/**
|
|
13
13
|
* gap 间隔槽
|
|
14
14
|
* @description 该组件一般用于内容块之间的用一个灰色块隔开的场景,方便用户风格统一,减少工作量
|
|
15
|
-
* @tutorial https://uview-pro.
|
|
15
|
+
* @tutorial https://uview-pro.netlify.app/components/gap.html
|
|
16
16
|
* @property {String} bg-color 背景颜色(默认#f3f4f6)
|
|
17
17
|
* @property {String Number} height 分割槽高度,单位rpx(默认30)
|
|
18
18
|
* @property {String Number} margin-top 与前一个组件的距离,单位rpx(默认0)
|
|
@@ -11,7 +11,7 @@ defineOptions({ name: 'u-grid' });
|
|
|
11
11
|
/**
|
|
12
12
|
* grid 宫格布局
|
|
13
13
|
* @description 宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式。
|
|
14
|
-
* @tutorial https://uview-pro.
|
|
14
|
+
* @tutorial https://uview-pro.netlify.app/components/grid.html
|
|
15
15
|
* @property {String|Number} col 宫格的列数(默认3)
|
|
16
16
|
* @property {Boolean} border 是否显示宫格的边框(默认true)
|
|
17
17
|
* @property {Boolean} hover-class 点击宫格的时候,是否显示按下的灰色背景(默认false)
|
|
@@ -24,7 +24,7 @@ defineOptions({ name: 'u-grid-item' });
|
|
|
24
24
|
/**
|
|
25
25
|
* gridItem 宫格项
|
|
26
26
|
* @description 宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式。搭配u-grid使用
|
|
27
|
-
* @tutorial https://uview-pro.
|
|
27
|
+
* @tutorial https://uview-pro.netlify.app/components/grid.html
|
|
28
28
|
* @property {String} bg-color 宫格的背景颜色(默认#ffffff)
|
|
29
29
|
* @property {String|Number} index 点击宫格时,返回的值
|
|
30
30
|
* @property {Object} custom-style 自定义样式,对象形式
|
|
@@ -21,7 +21,7 @@ defineOptions({
|
|
|
21
21
|
/**
|
|
22
22
|
* icon 图标
|
|
23
23
|
* @description 基于字体的图标集,包含了大多数常见场景的图标。
|
|
24
|
-
* @tutorial https://uview-pro.
|
|
24
|
+
* @tutorial https://uview-pro.netlify.app/components/icon.html
|
|
25
25
|
* @property {String} name 图标名称,见示例图标集
|
|
26
26
|
* @property {String} color 图标颜色(默认inherit)
|
|
27
27
|
* @property {String | Number} size 图标字体大小,单位rpx(默认32)
|
|
@@ -35,6 +35,7 @@ defineOptions({
|
|
|
35
35
|
* @property {String | Number} margin-top label在下方时与图标的距离,单位rpx(默认6)
|
|
36
36
|
* @property {String | Number} margin-bottom label在上方时与图标的距离,单位rpx(默认6)
|
|
37
37
|
* @property {String | Number} margin-right label在左侧时与图标的距离,单位rpx(默认6)
|
|
38
|
+
* @property {String | Number} space label与图标的距离,单位rpx,权重高于 margin
|
|
38
39
|
* @property {String} index 一个用于区分多个图标的值,点击图标时通过click事件传出
|
|
39
40
|
* @property {String} hover-class 图标按下去的样式类,用法同uni的view组件的hover-class参数,详情见官网
|
|
40
41
|
* @property {String} width 显示图片小图标时的宽度
|
|
@@ -110,26 +111,31 @@ const props = defineProps({
|
|
|
110
111
|
* @default '#606266'
|
|
111
112
|
*/
|
|
112
113
|
labelColor: { type: String, default: '#606266' },
|
|
114
|
+
/**
|
|
115
|
+
* label与图标的距离(横向排列),单位rpx(默认6)
|
|
116
|
+
* @default '6'
|
|
117
|
+
*/
|
|
118
|
+
marginLeft: { type: [String, Number], default: '6' },
|
|
119
|
+
/**
|
|
120
|
+
* label与图标的距离(竖向排列),单位rpx(默认6)
|
|
121
|
+
* @default '6'
|
|
122
|
+
*/
|
|
123
|
+
marginTop: { type: [String, Number], default: '6' },
|
|
124
|
+
/**
|
|
125
|
+
* label与图标的距离(竖向排列),单位rpx(默认6)
|
|
126
|
+
* @default '6'
|
|
127
|
+
*/
|
|
128
|
+
marginRight: { type: [String, Number], default: '6' },
|
|
129
|
+
/**
|
|
130
|
+
* label与图标的距离(竖向排列),单位rpx(默认6)
|
|
131
|
+
* @default '6'
|
|
132
|
+
*/
|
|
133
|
+
marginBottom: { type: [String, Number], default: '6' },
|
|
113
134
|
/**
|
|
114
|
-
* label
|
|
115
|
-
* @default '
|
|
116
|
-
*/
|
|
117
|
-
marginLeft: { type: [String, Number], default: '6' },
|
|
118
|
-
/**
|
|
119
|
-
* label与图标的距离(竖向排列),单位rpx(默认6)
|
|
120
|
-
* @default '6'
|
|
121
|
-
*/
|
|
122
|
-
marginTop: { type: [String, Number], default: '6' },
|
|
123
|
-
/**
|
|
124
|
-
* label与图标的距离(竖向排列),单位rpx(默认6)
|
|
125
|
-
* @default '6'
|
|
126
|
-
*/
|
|
127
|
-
marginRight: { type: [String, Number], default: '6' },
|
|
128
|
-
/**
|
|
129
|
-
* label与图标的距离(竖向排列),单位rpx(默认6)
|
|
130
|
-
* @default '6'
|
|
135
|
+
* label与图标的距离,单位rpx,权重高于 margin
|
|
136
|
+
* @default ''
|
|
131
137
|
*/
|
|
132
|
-
|
|
138
|
+
space: { type: [String, Number], default: '' },
|
|
133
139
|
/**
|
|
134
140
|
* 图片的mode,参考uni-app image组件
|
|
135
141
|
* @default 'widthFix'
|
|
@@ -293,10 +299,10 @@ const labelStyle = computed(() => {
|
|
|
293
299
|
return {
|
|
294
300
|
color: props.labelColor,
|
|
295
301
|
fontSize: $u.addUnit(props.labelSize),
|
|
296
|
-
marginLeft: props.labelPos === 'right' ? $u.addUnit(props.marginLeft) : 0,
|
|
297
|
-
marginTop: props.labelPos === 'bottom' ? $u.addUnit(props.marginTop) : 0,
|
|
298
|
-
marginRight: props.labelPos === 'left' ? $u.addUnit(props.marginRight) : 0,
|
|
299
|
-
marginBottom: props.labelPos === 'top' ? $u.addUnit(props.marginBottom) : 0
|
|
302
|
+
marginLeft: props.labelPos === 'right' ? $u.addUnit(props.space || props.marginLeft) : 0,
|
|
303
|
+
marginTop: props.labelPos === 'bottom' ? $u.addUnit(props.space || props.marginTop) : 0,
|
|
304
|
+
marginRight: props.labelPos === 'left' ? $u.addUnit(props.space || props.marginRight) : 0,
|
|
305
|
+
marginBottom: props.labelPos === 'top' ? $u.addUnit(props.space || props.marginBottom) : 0
|
|
300
306
|
};
|
|
301
307
|
});
|
|
302
308
|
|
|
@@ -23,7 +23,7 @@ defineOptions({
|
|
|
23
23
|
/**
|
|
24
24
|
* indexAnchor 索引列表锚点
|
|
25
25
|
* @description 通过折叠面板收纳内容区域,搭配<u-index-anchor>使用
|
|
26
|
-
* @tutorial https://uview-pro.
|
|
26
|
+
* @tutorial https://uview-pro.netlify.app/components/indexList.html#indexanchor-props
|
|
27
27
|
* @property {Boolean} use-slot 是否使用自定义内容的插槽(默认false)
|
|
28
28
|
* @property {String|Number} index 索引字符,如果定义了use-slot,此参数自动失效
|
|
29
29
|
* @property {Object} customStyle 自定义样式,对象形式,如"{color: 'red'}"
|
|
@@ -57,7 +57,7 @@ defineOptions({
|
|
|
57
57
|
/**
|
|
58
58
|
* indexList 索引列表
|
|
59
59
|
* @description 通过折叠面板收纳内容区域,搭配<u-index-anchor>使用
|
|
60
|
-
* @tutorial https://uview-pro.
|
|
60
|
+
* @tutorial https://uview-pro.netlify.app/components/indexList.html#indexanchor-props
|
|
61
61
|
* @property {Number|String} scroll-top 当前滚动高度,自定义组件无法获得滚动条事件,所以依赖接入方传入
|
|
62
62
|
* @property {Array} index-list 索引字符列表,数组(默认A-Z)
|
|
63
63
|
* @property {Number|String} z-index 锚点吸顶时的层级(默认965)
|
|
@@ -41,7 +41,7 @@ defineOptions({
|
|
|
41
41
|
/**
|
|
42
42
|
* keyboard 键盘
|
|
43
43
|
* @description 此为uViw自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3中模式,都有可以打乱按键顺序的选项。
|
|
44
|
-
* @tutorial https://uview-pro.
|
|
44
|
+
* @tutorial https://uview-pro.netlify.app/components/keyboard.html
|
|
45
45
|
* @property {String} mode 键盘类型,见官网基本使用的说明(默认number)
|
|
46
46
|
* @property {Boolean} dot-enabled 是否显示"."按键,只在mode=number时有效(默认true)
|
|
47
47
|
* @property {Boolean} tooltip 是否显示键盘顶部工具条(默认true)
|
|
@@ -42,7 +42,7 @@ defineOptions({ name: 'u-lazy-load' });
|
|
|
42
42
|
/**
|
|
43
43
|
* lazyLoad 懒加载
|
|
44
44
|
* @description 懒加载使用的场景为:页面有很多图片时,APP会同时加载所有的图片,导致页面卡顿,各个位置的图片出现前后不一致等.
|
|
45
|
-
* @tutorial https://uview-pro.
|
|
45
|
+
* @tutorial https://uview-pro.netlify.app/components/lazyLoad.html
|
|
46
46
|
* @property {String | Number} index 用户自定义值,在事件触发时回调,用以区分是哪个图片
|
|
47
47
|
* @property {String} image 图片路径
|
|
48
48
|
* @property {String} loading-img 预加载时的占位图
|
|
@@ -13,7 +13,7 @@ defineOptions({
|
|
|
13
13
|
/**
|
|
14
14
|
* line 线条
|
|
15
15
|
* @description 此组件一般用于显示一根线条,用于分隔内容块,有横向和竖向两种模式,且能设置0.5px线条,使用也很简单
|
|
16
|
-
* @tutorial https://uview-pro.
|
|
16
|
+
* @tutorial https://uview-pro.netlify.app/components/line.html
|
|
17
17
|
* @property {String} color 线条的颜色(默认#e4e7ed)
|
|
18
18
|
* @property {String} length 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带rpx单位的值等
|
|
19
19
|
* @property {String} direction 线条的方向,row-横向,col-竖向(默认row)
|
|
@@ -26,7 +26,7 @@ defineOptions({
|
|
|
26
26
|
/**
|
|
27
27
|
* lineProgress 线型进度条
|
|
28
28
|
* @description 展示操作或任务的当前进度,比如上传文件,是一个线形的进度条。
|
|
29
|
-
* @tutorial https://uview-pro.
|
|
29
|
+
* @tutorial https://uview-pro.netlify.app/components/lineProgress.html
|
|
30
30
|
* @property {String Number} percent 进度条百分比值,为数值类型,0-100
|
|
31
31
|
* @property {Boolean} round 进度条两端是否为半圆(默认true)
|
|
32
32
|
* @property {String} type 如设置,active-color值将会失效
|
|
@@ -23,7 +23,7 @@ defineOptions({
|
|
|
23
23
|
/**
|
|
24
24
|
* link 超链接
|
|
25
25
|
* @description 该组件为超链接组件,在不同平台有不同表现形式:在APP平台会通过plus环境打开内置浏览器,在小程序中把链接复制到粘贴板,同时提示信息,在H5中通过window.open打开链接。
|
|
26
|
-
* @tutorial https://uview-pro.
|
|
26
|
+
* @tutorial https://uview-pro.netlify.app/components/link.html
|
|
27
27
|
* @property {String} color 文字颜色(默认#606266)
|
|
28
28
|
* @property {String Number} font-size 字体大小,单位rpx(默认28)
|
|
29
29
|
* @property {Boolean} under-line 是否显示下划线(默认false)
|
|
@@ -12,7 +12,7 @@ defineOptions({
|
|
|
12
12
|
/**
|
|
13
13
|
* loading 加载动画
|
|
14
14
|
* @description 此组件为一个小动画,目前用在uView的loadmore加载更多和switch开关等组件的正在加载状态场景。
|
|
15
|
-
* @tutorial https://uview-pro.
|
|
15
|
+
* @tutorial https://uview-pro.netlify.app/components/loading.html
|
|
16
16
|
* @property {String} mode 模式选择,见官网说明(默认circle)
|
|
17
17
|
* @property {String} color 动画活动区域的颜色,只对 mode = flower 模式有效(默认#c7c7c7)
|
|
18
18
|
* @property {String|Number} size 加载图标的大小,单位rpx(默认34)
|
|
@@ -37,7 +37,7 @@ defineOptions({ name: 'u-loadmore' });
|
|
|
37
37
|
/**
|
|
38
38
|
* loadmore 加载更多
|
|
39
39
|
* @description 此组件一般用于标识页面底部加载数据时的状态。
|
|
40
|
-
* @tutorial https://uview-pro.
|
|
40
|
+
* @tutorial https://uview-pro.netlify.app/components/loadMore.html
|
|
41
41
|
* @property {String} status 组件状态(默认loadmore)
|
|
42
42
|
* @property {String} bg-color 组件背景颜色,在页面是非白色时会用到(默认#ffffff)
|
|
43
43
|
* @property {Boolean} icon 加载中时是否显示图标(默认true)
|
|
@@ -23,7 +23,7 @@ defineOptions({ name: 'u-mask' });
|
|
|
23
23
|
/**
|
|
24
24
|
* mask 遮罩
|
|
25
25
|
* @description 创建一个遮罩层,用于强调特定的页面元素,并阻止用户对遮罩下层的内容进行操作,一般用于弹窗场景
|
|
26
|
-
* @tutorial https://uview-pro.
|
|
26
|
+
* @tutorial https://uview-pro.netlify.app/components/mask.html
|
|
27
27
|
* @property {Boolean} show 是否显示遮罩(默认false)
|
|
28
28
|
* @property {String|Number} z-index z-index 层级(默认1070)
|
|
29
29
|
* @property {Object} custom-style 自定义样式对象,见上方说明
|
|
@@ -63,7 +63,7 @@ defineOptions({ name: 'u-message-input' });
|
|
|
63
63
|
/**
|
|
64
64
|
* messageInput 验证码输入框
|
|
65
65
|
* @description 该组件一般用于验证用户短信验证码的场景,也可以结合uView的键盘组件使用
|
|
66
|
-
* @tutorial https://uview-pro.
|
|
66
|
+
* @tutorial https://uview-pro.netlify.app/components/messageInput.html
|
|
67
67
|
* @property {String|Number} maxlength 输入字符个数(默认4)
|
|
68
68
|
* @property {Boolean} dot-fill 是否用圆点填充(默认false)
|
|
69
69
|
* @property {String} mode 模式选择,见上方"基本使用"说明(默认box)
|
|
@@ -56,7 +56,7 @@ defineOptions({
|
|
|
56
56
|
/**
|
|
57
57
|
* modal 模态框
|
|
58
58
|
* @description 弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作
|
|
59
|
-
* @tutorial https://uview-pro.
|
|
59
|
+
* @tutorial https://uview-pro.netlify.app/components/modal.html
|
|
60
60
|
* @property {Boolean} value 是否显示模态框
|
|
61
61
|
* @property {String | Number} z-index 层级
|
|
62
62
|
* @property {String} title 模态框标题(默认"提示")
|
|
@@ -47,7 +47,7 @@ defineOptions({ name: 'u-navbar' });
|
|
|
47
47
|
/**
|
|
48
48
|
* navbar 自定义导航栏
|
|
49
49
|
* @description 此组件一般用于在特殊情况下,需要自定义导航栏的时候用到,一般建议使用uniapp自带的导航栏。
|
|
50
|
-
* @tutorial https://uview-pro.
|
|
50
|
+
* @tutorial https://uview-pro.netlify.app/components/navbar.html
|
|
51
51
|
* @property {String|Number} height 导航栏高度(不包括状态栏高度在内,内部自动加上),注意这里的单位是px(默认44)
|
|
52
52
|
* @property {String} back-icon-color 左边返回图标的颜色(默认#606266)
|
|
53
53
|
* @property {String} back-icon-name 左边返回图标的名称,只能为uView自带的图标(默认arrow-left)
|
|
@@ -24,7 +24,7 @@ defineOptions({ name: 'u-no-network' });
|
|
|
24
24
|
/**
|
|
25
25
|
* noNetwork 无网络提示
|
|
26
26
|
* @description 该组件无需任何配置,引入即可,内部自动处理所有功能和事件。
|
|
27
|
-
* @tutorial https://uview-pro.
|
|
27
|
+
* @tutorial https://uview-pro.netlify.app/components/noNetwork.html
|
|
28
28
|
* @property {String} tips 没有网络时的提示语(默认哎呀,网络信号丢失)
|
|
29
29
|
* @property {String | Number} zIndex 组件的z-index值(默认1080)
|
|
30
30
|
* @property {String} image 无网络的图片提示,可用的src地址或base64图片
|
|
@@ -54,7 +54,7 @@ defineOptions({ name: 'u-notice-bar' });
|
|
|
54
54
|
/**
|
|
55
55
|
* noticeBar 滚动通知
|
|
56
56
|
* @description 该组件用于滚动通告场景,有多种模式可供选择
|
|
57
|
-
* @tutorial https://uview-pro.
|
|
57
|
+
* @tutorial https://uview-pro.netlify.app/components/noticeBar.html
|
|
58
58
|
* @property {Array} list 滚动内容,数组形式,见上方说明
|
|
59
59
|
* @property {String} type 显示的主题(默认warning)
|
|
60
60
|
* @property {Boolean} volumeIcon 是否显示小喇叭图标(默认true)
|
|
@@ -56,7 +56,7 @@ defineOptions({
|
|
|
56
56
|
/**
|
|
57
57
|
* numberBox 步进器
|
|
58
58
|
* @description 该组件一般用于商城购物选择物品数量的场景。注意:该输入框只能输入大于或等于0的整数,不支持小数输入
|
|
59
|
-
* @tutorial https://uview-pro.
|
|
59
|
+
* @tutorial https://uview-pro.netlify.app/components/numberBox.html
|
|
60
60
|
* @property {Number} modelValue 输入框初始值(默认1)
|
|
61
61
|
* @property {String} bg-color 输入框和按钮的背景颜色(默认#F2F3F5)
|
|
62
62
|
* @property {Number} min 用户可输入的最小值(默认0)
|
|
@@ -114,7 +114,7 @@ defineOptions({
|
|
|
114
114
|
/**
|
|
115
115
|
* picker picker弹出选择器
|
|
116
116
|
* @description 此选择器有两种弹出模式:一是时间模式,可以配置年,日,月,时,分,秒参数 二是地区模式,可以配置省,市,区参数
|
|
117
|
-
* @tutorial https://uview-pro.
|
|
117
|
+
* @tutorial https://uview-pro.netlify.app/components/picker.html
|
|
118
118
|
* @property {Object} params 需要显示的参数,见官网说明
|
|
119
119
|
* @property {String} mode 模式选择,region-地区类型,time-时间类型(默认time)
|
|
120
120
|
* @property {String Number} start-year 可选的开始年份,mode=time时有效(默认1950)
|
|
@@ -56,7 +56,7 @@ defineOptions({
|
|
|
56
56
|
/**
|
|
57
57
|
* popup 弹窗
|
|
58
58
|
* @description 弹出层容器,用于展示弹窗、信息提示等内容,支持上、下、左、右和中部弹出。组件只提供容器,内部内容由用户自定义
|
|
59
|
-
* @tutorial https://uview-pro.
|
|
59
|
+
* @tutorial https://uview-pro.netlify.app/components/popup.html
|
|
60
60
|
* @property {String} mode 弹出方向(默认left)
|
|
61
61
|
* @property {Boolean} mask 是否显示遮罩(默认true)
|
|
62
62
|
* @property {Stringr | Number} length mode=left | 见官网说明(默认auto)
|
|
@@ -26,7 +26,7 @@ defineOptions({
|
|
|
26
26
|
/**
|
|
27
27
|
* radio 单选框
|
|
28
28
|
* @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配u-radio-group使用
|
|
29
|
-
* @tutorial https://uview-pro.
|
|
29
|
+
* @tutorial https://uview-pro.netlify.app/components/radio.html
|
|
30
30
|
* @property {String|Number} icon-size 图标大小,单位rpx(默认24)
|
|
31
31
|
* @property {String|Number} label-size label字体大小,单位rpx(默认28)
|
|
32
32
|
* @property {String|Number} name radio组件的标示符
|
|
@@ -15,7 +15,7 @@ defineOptions({
|
|
|
15
15
|
/**
|
|
16
16
|
* radioGroup 单选框父组件
|
|
17
17
|
* @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配u-radio使用
|
|
18
|
-
* @tutorial https://uview-pro.
|
|
18
|
+
* @tutorial https://uview-pro.netlify.app/components/radio.html
|
|
19
19
|
* @property {Boolean} disabled 是否禁用所有radio(默认false)
|
|
20
20
|
* @property {String|Number} size 组件整体的大小,单位rpx(默认40)
|
|
21
21
|
* @property {String} active-color 选中时的颜色,应用到所有子Radio组件(默认#2979ff)
|
|
@@ -29,7 +29,7 @@ defineOptions({
|
|
|
29
29
|
/**
|
|
30
30
|
* rate 评分
|
|
31
31
|
* @description 该组件一般用于满意度调查,星型评分的场景
|
|
32
|
-
* @tutorial https://uview-pro.
|
|
32
|
+
* @tutorial https://uview-pro.netlify.app/components/rate.html
|
|
33
33
|
* @property {String|Number} count 最多可选的星星数量(默认5)
|
|
34
34
|
* @property {String|Number} current 默认选中的星星数量(默认0)
|
|
35
35
|
* @property {Boolean} disabled 是否禁止用户操作(默认false)
|
|
@@ -36,7 +36,7 @@ defineOptions({ name: 'u-read-more' });
|
|
|
36
36
|
/**
|
|
37
37
|
* readMore 阅读更多
|
|
38
38
|
* @description 该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。
|
|
39
|
-
* @tutorial https://uview-pro.
|
|
39
|
+
* @tutorial https://uview-pro.netlify.app/components/readMore.html
|
|
40
40
|
* @property {String|Number} showHeight 内容超出此高度才会显示展开全文按钮,单位rpx(默认400)
|
|
41
41
|
* @property {Boolean} toggle 展开后是否显示收起按钮(默认false)
|
|
42
42
|
* @property {String} closeText 关闭时的提示文字(默认“展开阅读全文”)
|
|
@@ -21,7 +21,7 @@ defineOptions({
|
|
|
21
21
|
/**
|
|
22
22
|
* row 行布局
|
|
23
23
|
* @description 通过基础的 12 分栏,迅速简便地创建布局。
|
|
24
|
-
* @tutorial https://uview-pro.
|
|
24
|
+
* @tutorial https://uview-pro.netlify.app/components/layout.html#row-props
|
|
25
25
|
* @property {String|Number} gutter 栅格间隔,左右各为此值的一半,单位rpx(默认0)
|
|
26
26
|
* @property {String} justify 水平排列方式(微信小程序暂不支持)默认(start(或flex-start))
|
|
27
27
|
* @property {String} align 垂直排列方式(默认center)
|
|
@@ -58,7 +58,7 @@ defineOptions({ name: 'u-search' });
|
|
|
58
58
|
/**
|
|
59
59
|
* search 搜索框
|
|
60
60
|
* @description 搜索组件,集成了常见搜索框所需功能,用户可以一键引入,开箱即用。
|
|
61
|
-
* @tutorial https://uview-pro.
|
|
61
|
+
* @tutorial https://uview-pro.netlify.app/components/search.html
|
|
62
62
|
* @property {String} shape 搜索框形状,round-圆形,square-方形(默认round)
|
|
63
63
|
* @property {String} bg-color 搜索框背景颜色(默认#f2f2f2)
|
|
64
64
|
* @property {String} border-color 边框颜色,配置了颜色,才会有边框
|