uview-plus 3.1.45 → 3.1.47
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/components/u-action-sheet/props.js +10 -11
- package/components/u-album/props.js +11 -12
- package/components/u-alert/props.js +8 -9
- package/components/u-avatar/props.js +14 -15
- package/components/u-avatar-group/props.js +9 -10
- package/components/u-back-top/props.js +10 -11
- package/components/u-badge/props.js +14 -15
- package/components/u-button/props.js +28 -29
- package/components/u-calendar/month.vue +1 -1
- package/components/u-calendar/props.js +27 -28
- package/components/u-car-keyboard/props.js +0 -1
- package/components/u-cell/props.js +17 -18
- package/components/u-cell/u-cell.vue +11 -2
- package/components/u-cell-group/props.js +2 -3
- package/components/u-checkbox/props.js +13 -14
- package/components/u-checkbox-group/props.js +16 -17
- package/components/u-circle-progress/props.js +1 -2
- package/components/u-code/props.js +6 -7
- package/components/u-code/u-code.vue +5 -0
- package/components/u-code-input/props.js +16 -17
- package/components/u-col/props.js +5 -6
- package/components/u-collapse/props.js +3 -4
- package/components/u-collapse-item/props.js +11 -12
- package/components/u-column-notice/props.js +10 -11
- package/components/u-count-down/props.js +4 -5
- package/components/u-count-down/u-count-down.vue +5 -0
- package/components/u-count-to/props.js +11 -12
- package/components/u-datetime-picker/props.js +24 -25
- package/components/u-divider/props.js +8 -9
- package/components/u-dropdown/props.js +0 -1
- package/components/u-dropdown-item/props.js +0 -1
- package/components/u-empty/props.js +11 -12
- package/components/u-form/props.js +8 -9
- package/components/u-form/u-form.vue +1 -1
- package/components/u-form-item/props.js +13 -9
- package/components/u-form-item/u-form-item.vue +1 -0
- package/components/u-gap/props.js +4 -5
- package/components/u-grid/props.js +3 -4
- package/components/u-grid-item/props.js +2 -3
- package/components/u-grid-item/u-grid-item.vue +5 -0
- package/components/u-icon/props.js +17 -18
- package/components/u-icon/u-icon.vue +9 -6
- package/components/u-image/props.js +16 -17
- package/components/u-index-anchor/props.js +5 -6
- package/components/u-index-item/props.js +0 -1
- package/components/u-index-list/props.js +5 -6
- package/components/u-index-list/u-index-list.vue +2 -1
- package/components/u-input/props.js +35 -36
- package/components/u-keyboard/props.js +16 -17
- package/components/u-line/props.js +6 -7
- package/components/u-line-progress/props.js +5 -6
- package/components/u-link/props.js +7 -8
- package/components/u-list/props.js +14 -15
- package/components/u-list-item/props.js +1 -2
- package/components/u-loading-icon/props.js +11 -12
- package/components/u-loading-page/props.js +9 -10
- package/components/u-loadmore/props.js +18 -19
- package/components/u-modal/props.js +16 -17
- package/components/u-navbar/props.js +16 -17
- package/components/u-no-network/props.js +3 -4
- package/components/u-notice-bar/props.js +13 -14
- package/components/u-notify/props.js +9 -10
- package/components/u-notify/u-notify.vue +5 -0
- package/components/u-number-box/props.js +22 -23
- package/components/u-number-keyboard/props.js +3 -4
- package/components/u-overlay/props.js +4 -5
- package/components/u-parse/props.js +8 -9
- package/components/u-parse/u-parse.vue +6 -1
- package/components/u-picker/props.js +16 -17
- package/components/u-picker-column/props.js +0 -1
- package/components/u-popup/props.js +15 -16
- package/components/u-radio/props.js +13 -14
- package/components/u-radio-group/props.js +17 -18
- package/components/u-rate/props.js +14 -15
- package/components/u-read-more/props.js +8 -9
- package/components/u-row/props.js +3 -4
- package/components/u-row-notice/props.js +7 -8
- package/components/u-row-notice/u-row-notice.vue +5 -0
- package/components/u-safe-bottom/props.js +0 -1
- package/components/u-scroll-list/props.js +6 -7
- package/components/u-search/props.js +24 -25
- package/components/u-skeleton/props.js +11 -12
- package/components/u-slider/props.js +11 -12
- package/components/u-status-bar/props.js +1 -2
- package/components/u-steps/props.js +7 -8
- package/components/u-steps-item/props.js +4 -5
- package/components/u-sticky/props.js +6 -7
- package/components/u-sticky/u-sticky.vue +5 -0
- package/components/u-subsection/props.js +9 -10
- package/components/u-swipe-action/props.js +1 -2
- package/components/u-swipe-action-item/nvue.js +5 -0
- package/components/u-swipe-action-item/props.js +6 -7
- package/components/u-swiper/props.js +24 -25
- package/components/u-swiper-indicator/props.js +5 -6
- package/components/u-switch/props.js +11 -12
- package/components/u-tabbar/props.js +8 -9
- package/components/u-tabbar-item/props.js +6 -7
- package/components/u-table/props.js +0 -1
- package/components/u-tabs/props.js +12 -13
- package/components/u-tabs-item/props.js +0 -1
- package/components/u-tag/props.js +15 -16
- package/components/u-td/props.js +0 -1
- package/components/u-text/props.js +21 -22
- package/components/u-textarea/props.js +23 -24
- package/components/u-toast/u-toast.vue +5 -0
- package/components/u-toolbar/props.js +6 -7
- package/components/u-tooltip/props.js +11 -12
- package/components/u-tr/props.js +0 -1
- package/components/u-transition/props.js +4 -5
- package/components/u-transition/transition.js +8 -9
- package/components/u-upload/props.js +22 -23
- package/libs/config/props/actionSheet.js +1 -1
- package/libs/config/props/album.js +1 -1
- package/libs/config/props/avatarGroup.js +1 -1
- package/libs/config/props/backtop.js +2 -2
- package/libs/config/props/badge.js +1 -1
- package/libs/config/props/calendar.js +3 -3
- package/libs/config/props/checkboxGroup.js +1 -1
- package/libs/config/props/datetimePicker.js +1 -1
- package/libs/config/props/form.js +3 -3
- package/libs/config/props/formItem.js +1 -0
- package/libs/config/props/indexList.js +1 -1
- package/libs/config/props/noticeBar.js +1 -1
- package/libs/config/props/picker.js +2 -2
- package/libs/config/props/popup.js +1 -1
- package/libs/config/props/search.js +2 -2
- package/libs/config/props/slider.js +1 -1
- package/libs/config/props/swiper.js +1 -1
- package/libs/config/props/tabs.js +7 -7
- package/libs/config/props/text.js +2 -2
- package/libs/config/props/toast.js +1 -1
- package/libs/config/props/tooltip.js +1 -1
- package/libs/config/props/upload.js +3 -3
- package/libs/css/components.scss +11 -1
- package/libs/css/flex.scss +41 -39
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 3.1.47(2024-03-18)
|
|
2
|
+
fix: setConfig设置组件默认参数无效问题
|
|
3
|
+
fix: 修复自定义图标无效问题
|
|
4
|
+
feat: 增加u-form-item单独设置规则变量
|
|
5
|
+
fix:#293小程序是自定义导航栏的时候即传了customNavHeight的时候会出现跳转偏移的情况
|
|
6
|
+
|
|
7
|
+
## 3.1.46(2024-01-29)
|
|
8
|
+
beforeUnmount
|
|
1
9
|
## 3.1.45(2024-01-24)
|
|
2
10
|
fix: #262ext组件为超链接的情况下size属性不生效
|
|
3
11
|
fix: #263最新版本3.1.42中微信小程序u-swipe-action-item报错
|
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 操作菜单是否展示 (默认false)
|
|
5
4
|
show: {
|
|
6
5
|
type: Boolean,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.actionSheet.show
|
|
8
7
|
},
|
|
9
8
|
// 标题
|
|
10
9
|
title: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.actionSheet.title
|
|
13
12
|
},
|
|
14
13
|
// 选项上方的描述信息
|
|
15
14
|
description: {
|
|
16
15
|
type: String,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.actionSheet.description
|
|
18
17
|
},
|
|
19
18
|
// 数据
|
|
20
19
|
actions: {
|
|
21
20
|
type: Array,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.actionSheet.actions
|
|
23
22
|
},
|
|
24
23
|
// 取消按钮的文字,不为空时显示按钮
|
|
25
24
|
cancelText: {
|
|
26
25
|
type: String,
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.actionSheet.cancelText
|
|
28
27
|
},
|
|
29
28
|
// 点击某个菜单项时是否关闭弹窗
|
|
30
29
|
closeOnClickAction: {
|
|
31
30
|
type: Boolean,
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.actionSheet.closeOnClickAction
|
|
33
32
|
},
|
|
34
33
|
// 处理底部安全区(默认true)
|
|
35
34
|
safeAreaInsetBottom: {
|
|
36
35
|
type: Boolean,
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.actionSheet.safeAreaInsetBottom
|
|
38
37
|
},
|
|
39
38
|
// 小程序的打开方式
|
|
40
39
|
openType: {
|
|
41
40
|
type: String,
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.actionSheet.openType
|
|
43
42
|
},
|
|
44
43
|
// 点击遮罩是否允许关闭 (默认true)
|
|
45
44
|
closeOnClickOverlay: {
|
|
46
45
|
type: Boolean,
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.actionSheet.closeOnClickOverlay
|
|
48
47
|
},
|
|
49
48
|
// 圆角值
|
|
50
49
|
round: {
|
|
51
50
|
type: [Boolean, String, Number],
|
|
52
|
-
default:
|
|
51
|
+
default: () => uni.$u.props.actionSheet.round
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
54
|
}
|
|
@@ -1,60 +1,59 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 图片地址,Array<String>|Array<Object>形式
|
|
5
4
|
urls: {
|
|
6
5
|
type: Array,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.album.urls
|
|
8
7
|
},
|
|
9
8
|
// 指定从数组的对象元素中读取哪个属性作为图片地址
|
|
10
9
|
keyName: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.album.keyName
|
|
13
12
|
},
|
|
14
13
|
// 单图时,图片长边的长度
|
|
15
14
|
singleSize: {
|
|
16
15
|
type: [String, Number],
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.album.singleSize
|
|
18
17
|
},
|
|
19
18
|
// 多图时,图片边长
|
|
20
19
|
multipleSize: {
|
|
21
20
|
type: [String, Number],
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.album.multipleSize
|
|
23
22
|
},
|
|
24
23
|
// 多图时,图片水平和垂直之间的间隔
|
|
25
24
|
space: {
|
|
26
25
|
type: [String, Number],
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.album.space
|
|
28
27
|
},
|
|
29
28
|
// 单图时,图片缩放裁剪的模式
|
|
30
29
|
singleMode: {
|
|
31
30
|
type: String,
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.album.singleMode
|
|
33
32
|
},
|
|
34
33
|
// 多图时,图片缩放裁剪的模式
|
|
35
34
|
multipleMode: {
|
|
36
35
|
type: String,
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.album.multipleMode
|
|
38
37
|
},
|
|
39
38
|
// 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量
|
|
40
39
|
maxCount: {
|
|
41
40
|
type: [String, Number],
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.album.maxCount
|
|
43
42
|
},
|
|
44
43
|
// 是否可以预览图片
|
|
45
44
|
previewFullImage: {
|
|
46
45
|
type: Boolean,
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.album.previewFullImage
|
|
48
47
|
},
|
|
49
48
|
// 每行展示图片数量,如设置,singleSize和multipleSize将会无效
|
|
50
49
|
rowCount: {
|
|
51
50
|
type: [String, Number],
|
|
52
|
-
default:
|
|
51
|
+
default: () => uni.$u.props.album.rowCount
|
|
53
52
|
},
|
|
54
53
|
// 超出maxCount时是否显示查看更多的提示
|
|
55
54
|
showMore: {
|
|
56
55
|
type: Boolean,
|
|
57
|
-
default:
|
|
56
|
+
default: () => uni.$u.props.album.showMore
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
}
|
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 显示文字
|
|
5
4
|
title: {
|
|
6
5
|
type: String,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.alert.title
|
|
8
7
|
},
|
|
9
8
|
// 主题,success/warning/info/error
|
|
10
9
|
type: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.alert.type
|
|
13
12
|
},
|
|
14
13
|
// 辅助性文字
|
|
15
14
|
description: {
|
|
16
15
|
type: String,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.alert.description
|
|
18
17
|
},
|
|
19
18
|
// 是否可关闭
|
|
20
19
|
closable: {
|
|
21
20
|
type: Boolean,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.alert.closable
|
|
23
22
|
},
|
|
24
23
|
// 是否显示图标
|
|
25
24
|
showIcon: {
|
|
26
25
|
type: Boolean,
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.alert.showIcon
|
|
28
27
|
},
|
|
29
28
|
// 浅或深色调,light-浅色,dark-深色
|
|
30
29
|
effect: {
|
|
31
30
|
type: String,
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.alert.effect
|
|
33
32
|
},
|
|
34
33
|
// 文字是否居中
|
|
35
34
|
center: {
|
|
36
35
|
type: Boolean,
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.alert.center
|
|
38
37
|
},
|
|
39
38
|
// 字体大小
|
|
40
39
|
fontSize: {
|
|
41
40
|
type: [String, Number],
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.alert.fontSize
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
44
|
}
|
|
@@ -1,65 +1,64 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 头像图片路径(不能为相对路径)
|
|
5
4
|
src: {
|
|
6
5
|
type: String,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.avatar.src
|
|
8
7
|
},
|
|
9
8
|
// 头像形状,circle-圆形,square-方形
|
|
10
9
|
shape: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.avatar.shape
|
|
13
12
|
},
|
|
14
13
|
// 头像尺寸
|
|
15
14
|
size: {
|
|
16
15
|
type: [String, Number],
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.avatar.size
|
|
18
17
|
},
|
|
19
18
|
// 裁剪模式
|
|
20
19
|
mode: {
|
|
21
20
|
type: String,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.avatar.mode
|
|
23
22
|
},
|
|
24
23
|
// 显示的文字
|
|
25
24
|
text: {
|
|
26
25
|
type: String,
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.avatar.text
|
|
28
27
|
},
|
|
29
28
|
// 背景色
|
|
30
29
|
bgColor: {
|
|
31
30
|
type: String,
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.avatar.bgColor
|
|
33
32
|
},
|
|
34
33
|
// 文字颜色
|
|
35
34
|
color: {
|
|
36
35
|
type: String,
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.avatar.color
|
|
38
37
|
},
|
|
39
38
|
// 文字大小
|
|
40
39
|
fontSize: {
|
|
41
40
|
type: [String, Number],
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.avatar.fontSize
|
|
43
42
|
},
|
|
44
43
|
// 显示的图标
|
|
45
44
|
icon: {
|
|
46
45
|
type: String,
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.avatar.icon
|
|
48
47
|
},
|
|
49
48
|
// 显示小程序头像,只对百度,微信,QQ小程序有效
|
|
50
49
|
mpAvatar: {
|
|
51
50
|
type: Boolean,
|
|
52
|
-
default:
|
|
51
|
+
default: () => uni.$u.props.avatar.mpAvatar
|
|
53
52
|
},
|
|
54
53
|
// 是否使用随机背景色
|
|
55
54
|
randomBgColor: {
|
|
56
55
|
type: Boolean,
|
|
57
|
-
default:
|
|
56
|
+
default: () => uni.$u.props.avatar.randomBgColor
|
|
58
57
|
},
|
|
59
58
|
// 加载失败的默认头像(组件有内置默认图片)
|
|
60
59
|
defaultUrl: {
|
|
61
60
|
type: String,
|
|
62
|
-
default:
|
|
61
|
+
default: () => uni.$u.props.avatar.defaultUrl
|
|
63
62
|
},
|
|
64
63
|
// 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
|
|
65
64
|
colorIndex: {
|
|
@@ -68,12 +67,12 @@ export default {
|
|
|
68
67
|
validator(n) {
|
|
69
68
|
return uni.$u.test.range(n, [0, 19]) || n === ''
|
|
70
69
|
},
|
|
71
|
-
default:
|
|
70
|
+
default: () => uni.$u.props.avatar.colorIndex
|
|
72
71
|
},
|
|
73
72
|
// 组件标识符
|
|
74
73
|
name: {
|
|
75
74
|
type: String,
|
|
76
|
-
default:
|
|
75
|
+
default: () => uni.$u.props.avatar.name
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
78
|
}
|
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 头像图片组
|
|
5
4
|
urls: {
|
|
6
5
|
type: Array,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.avatarGroup.urls
|
|
8
7
|
},
|
|
9
8
|
// 最多展示的头像数量
|
|
10
9
|
maxCount: {
|
|
11
10
|
type: [String, Number],
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.avatarGroup.maxCount
|
|
13
12
|
},
|
|
14
13
|
// 头像形状
|
|
15
14
|
shape: {
|
|
16
15
|
type: String,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.avatarGroup.shape
|
|
18
17
|
},
|
|
19
18
|
// 图片裁剪模式
|
|
20
19
|
mode: {
|
|
21
20
|
type: String,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.avatarGroup.mode
|
|
23
22
|
},
|
|
24
23
|
// 超出maxCount时是否显示查看更多的提示
|
|
25
24
|
showMore: {
|
|
26
25
|
type: Boolean,
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.avatarGroup.showMore
|
|
28
27
|
},
|
|
29
28
|
// 头像大小
|
|
30
29
|
size: {
|
|
31
30
|
type: [String, Number],
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.avatarGroup.size
|
|
33
32
|
},
|
|
34
33
|
// 指定从数组的对象元素中读取哪个属性作为图片地址
|
|
35
34
|
keyName: {
|
|
36
35
|
type: String,
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.avatarGroup.keyName
|
|
38
37
|
},
|
|
39
38
|
// 头像之间的遮挡比例
|
|
40
39
|
gap: {
|
|
@@ -42,12 +41,12 @@ export default {
|
|
|
42
41
|
validator(value) {
|
|
43
42
|
return value >= 0 && value <= 1
|
|
44
43
|
},
|
|
45
|
-
default:
|
|
44
|
+
default: () => uni.$u.props.avatarGroup.gap
|
|
46
45
|
},
|
|
47
46
|
// 需额外显示的值
|
|
48
47
|
extraValue: {
|
|
49
48
|
type: [Number, String],
|
|
50
|
-
default:
|
|
49
|
+
default: () => uni.$u.props.avatarGroup.extraValue
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
}
|
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 返回顶部的形状,circle-圆形,square-方形
|
|
5
4
|
mode: {
|
|
6
5
|
type: String,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.backtop.mode
|
|
8
7
|
},
|
|
9
8
|
// 自定义图标
|
|
10
9
|
icon: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.backtop.icon
|
|
13
12
|
},
|
|
14
13
|
// 提示文字
|
|
15
14
|
text: {
|
|
16
15
|
type: String,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.backtop.text
|
|
18
17
|
},
|
|
19
18
|
// 返回顶部滚动时间
|
|
20
19
|
duration: {
|
|
21
20
|
type: [String, Number],
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.backtop.duration
|
|
23
22
|
},
|
|
24
23
|
// 滚动距离
|
|
25
24
|
scrollTop: {
|
|
26
25
|
type: [String, Number],
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.backtop.scrollTop
|
|
28
27
|
},
|
|
29
28
|
// 距离顶部多少距离显示,单位px
|
|
30
29
|
top: {
|
|
31
30
|
type: [String, Number],
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.backtop.top
|
|
33
32
|
},
|
|
34
33
|
// 返回顶部按钮到底部的距离,单位px
|
|
35
34
|
bottom: {
|
|
36
35
|
type: [String, Number],
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.backtop.bottom
|
|
38
37
|
},
|
|
39
38
|
// 返回顶部按钮到右边的距离,单位px
|
|
40
39
|
right: {
|
|
41
40
|
type: [String, Number],
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.backtop.right
|
|
43
42
|
},
|
|
44
43
|
// 层级
|
|
45
44
|
zIndex: {
|
|
46
45
|
type: [String, Number],
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.backtop.zIndex
|
|
48
47
|
},
|
|
49
48
|
// 图标的样式,对象形式
|
|
50
49
|
iconStyle: {
|
|
51
50
|
type: Object,
|
|
52
|
-
default:
|
|
51
|
+
default: () => uni.$u.props.backtop.iconStyle
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
54
|
}
|
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 是否显示圆点
|
|
5
4
|
isDot: {
|
|
6
5
|
type: Boolean,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.badge.isDot
|
|
8
7
|
},
|
|
9
8
|
// 显示的内容
|
|
10
9
|
value: {
|
|
11
10
|
type: [Number, String],
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.badge.value
|
|
13
12
|
},
|
|
14
13
|
// 显示的内容
|
|
15
14
|
modelValue: {
|
|
16
15
|
type: [Number, String],
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.badge.modelValue
|
|
18
17
|
},
|
|
19
18
|
// 是否显示
|
|
20
19
|
show: {
|
|
21
20
|
type: Boolean,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.badge.show
|
|
23
22
|
},
|
|
24
23
|
// 最大值,超过最大值会显示 '{max}+'
|
|
25
24
|
max: {
|
|
26
25
|
type: [Number, String],
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.badge.max
|
|
28
27
|
},
|
|
29
28
|
// 主题类型,error|warning|success|primary
|
|
30
29
|
type: {
|
|
31
30
|
type: String,
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.badge.type
|
|
33
32
|
},
|
|
34
33
|
// 当数值为 0 时,是否展示 Badge
|
|
35
34
|
showZero: {
|
|
36
35
|
type: Boolean,
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.badge.showZero
|
|
38
37
|
},
|
|
39
38
|
// 背景颜色,优先级比type高,如设置,type参数会失效
|
|
40
39
|
bgColor: {
|
|
41
40
|
type: [String, null],
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.badge.bgColor
|
|
43
42
|
},
|
|
44
43
|
// 字体颜色
|
|
45
44
|
color: {
|
|
46
45
|
type: [String, null],
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.badge.color
|
|
48
47
|
},
|
|
49
48
|
// 徽标形状,circle-四角均为圆角,horn-左下角为直角
|
|
50
49
|
shape: {
|
|
51
50
|
type: String,
|
|
52
|
-
default:
|
|
51
|
+
default: () => uni.$u.props.badge.shape
|
|
53
52
|
},
|
|
54
53
|
// 设置数字的显示方式,overflow|ellipsis|limit
|
|
55
54
|
// overflow会根据max字段判断,超出显示`${max}+`
|
|
@@ -57,22 +56,22 @@ export default {
|
|
|
57
56
|
// limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
|
|
58
57
|
numberType: {
|
|
59
58
|
type: String,
|
|
60
|
-
default:
|
|
59
|
+
default: () => uni.$u.props.badge.numberType
|
|
61
60
|
},
|
|
62
61
|
// 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
|
|
63
62
|
offset: {
|
|
64
63
|
type: Array,
|
|
65
|
-
default:
|
|
64
|
+
default: () => uni.$u.props.badge.offset
|
|
66
65
|
},
|
|
67
66
|
// 是否反转背景和字体颜色
|
|
68
67
|
inverted: {
|
|
69
68
|
type: Boolean,
|
|
70
|
-
default:
|
|
69
|
+
default: () => uni.$u.props.badge.inverted
|
|
71
70
|
},
|
|
72
71
|
// 是否绝对定位
|
|
73
72
|
absolute: {
|
|
74
73
|
type: Boolean,
|
|
75
|
-
default:
|
|
74
|
+
default: () => uni.$u.props.badge.absolute
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
77
|
}
|