uview-plus 3.1.50 → 3.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/changelog.md +15 -1
- 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-back-top/u-back-top.vue +1 -1
- package/components/u-badge/props.js +14 -15
- package/components/u-badge/u-badge.vue +1 -1
- package/components/u-button/props.js +28 -29
- package/components/u-button/vue.scss +8 -7
- 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-car-keyboard/u-car-keyboard.vue +1 -1
- package/components/u-cell/props.js +17 -18
- package/components/u-cell/u-cell.vue +12 -3
- package/components/u-cell-group/props.js +2 -3
- package/components/u-cell-group/u-cell-group.vue +1 -1
- package/components/u-checkbox/props.js +13 -14
- package/components/u-checkbox/u-checkbox.vue +1 -1
- 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 +6 -1
- package/components/u-count-to/props.js +11 -12
- package/components/u-datetime-picker/props.js +37 -25
- package/components/u-datetime-picker/u-datetime-picker.vue +58 -3
- 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-image/u-image.vue +1 -1
- package/components/u-index-anchor/props.js +5 -6
- package/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/components/u-index-item/props.js +0 -1
- package/components/u-index-item/u-index-item.vue +1 -1
- package/components/u-index-list/props.js +5 -6
- package/components/u-index-list/u-index-list.vue +3 -2
- package/components/u-input/props.js +35 -36
- package/components/u-input/u-input.vue +10 -4
- 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-box/u-number-box.vue +21 -1
- 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-qrcode/qrcode.js +1206 -0
- package/components/u-qrcode/u-qrcode.vue +199 -0
- 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-status-bar/u-status-bar.vue +1 -1
- package/components/u-steps/props.js +7 -8
- package/components/u-steps/u-steps.vue +1 -1
- package/components/u-steps-item/props.js +4 -5
- package/components/u-steps-item/u-steps-item.vue +1 -1
- 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-subsection/u-subsection.vue +2 -2
- 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-tooltip/u-tooltip.vue +0 -28
- 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-transition/u-transition.vue +1 -1
- package/components/u-upload/props.js +22 -23
- package/components/u-upload/u-upload.vue +1 -1
- package/index.js +1 -5
- 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 +73 -71
- package/package.json +3 -2
|
@@ -1,85 +1,84 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 是否展示modal
|
|
5
4
|
show: {
|
|
6
5
|
type: Boolean,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.modal.show
|
|
8
7
|
},
|
|
9
8
|
// 标题
|
|
10
9
|
title: {
|
|
11
10
|
type: [String],
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.modal.title
|
|
13
12
|
},
|
|
14
13
|
// 弹窗内容
|
|
15
14
|
content: {
|
|
16
15
|
type: String,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.modal.content
|
|
18
17
|
},
|
|
19
18
|
// 确认文案
|
|
20
19
|
confirmText: {
|
|
21
20
|
type: String,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.modal.confirmText
|
|
23
22
|
},
|
|
24
23
|
// 取消文案
|
|
25
24
|
cancelText: {
|
|
26
25
|
type: String,
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.modal.cancelText
|
|
28
27
|
},
|
|
29
28
|
// 是否显示确认按钮
|
|
30
29
|
showConfirmButton: {
|
|
31
30
|
type: Boolean,
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.modal.showConfirmButton
|
|
33
32
|
},
|
|
34
33
|
// 是否显示取消按钮
|
|
35
34
|
showCancelButton: {
|
|
36
35
|
type: Boolean,
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.modal.showCancelButton
|
|
38
37
|
},
|
|
39
38
|
// 确认按钮颜色
|
|
40
39
|
confirmColor: {
|
|
41
40
|
type: String,
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.modal.confirmColor
|
|
43
42
|
},
|
|
44
43
|
// 取消文字颜色
|
|
45
44
|
cancelColor: {
|
|
46
45
|
type: String,
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.modal.cancelColor
|
|
48
47
|
},
|
|
49
48
|
// 对调确认和取消的位置
|
|
50
49
|
buttonReverse: {
|
|
51
50
|
type: Boolean,
|
|
52
|
-
default:
|
|
51
|
+
default: () => uni.$u.props.modal.buttonReverse
|
|
53
52
|
},
|
|
54
53
|
// 是否开启缩放效果
|
|
55
54
|
zoom: {
|
|
56
55
|
type: Boolean,
|
|
57
|
-
default:
|
|
56
|
+
default: () => uni.$u.props.modal.zoom
|
|
58
57
|
},
|
|
59
58
|
// 是否异步关闭,只对确定按钮有效
|
|
60
59
|
asyncClose: {
|
|
61
60
|
type: Boolean,
|
|
62
|
-
default:
|
|
61
|
+
default: () => uni.$u.props.modal.asyncClose
|
|
63
62
|
},
|
|
64
63
|
// 是否允许点击遮罩关闭modal
|
|
65
64
|
closeOnClickOverlay: {
|
|
66
65
|
type: Boolean,
|
|
67
|
-
default:
|
|
66
|
+
default: () => uni.$u.props.modal.closeOnClickOverlay
|
|
68
67
|
},
|
|
69
68
|
// 给一个负的margin-top,往上偏移,避免和键盘重合的情况
|
|
70
69
|
negativeTop: {
|
|
71
70
|
type: [String, Number],
|
|
72
|
-
default:
|
|
71
|
+
default: () => uni.$u.props.modal.negativeTop
|
|
73
72
|
},
|
|
74
73
|
// modal宽度,不支持百分比,可以数值,px,rpx单位
|
|
75
74
|
width: {
|
|
76
75
|
type: [String, Number],
|
|
77
|
-
default:
|
|
76
|
+
default: () => uni.$u.props.modal.width
|
|
78
77
|
},
|
|
79
78
|
// 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
|
|
80
79
|
confirmButtonShape: {
|
|
81
80
|
type: String,
|
|
82
|
-
default:
|
|
81
|
+
default: () => uni.$u.props.modal.confirmButtonShape
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
}
|
|
@@ -1,85 +1,84 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 是否开启顶部安全区适配
|
|
5
4
|
safeAreaInsetTop: {
|
|
6
5
|
type: Boolean,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.navbar.safeAreaInsetTop
|
|
8
7
|
},
|
|
9
8
|
// 固定在顶部时,是否生成一个等高元素,以防止塌陷
|
|
10
9
|
placeholder: {
|
|
11
10
|
type: Boolean,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.navbar.placeholder
|
|
13
12
|
},
|
|
14
13
|
// 是否固定在顶部
|
|
15
14
|
fixed: {
|
|
16
15
|
type: Boolean,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.navbar.fixed
|
|
18
17
|
},
|
|
19
18
|
// 是否显示下边框
|
|
20
19
|
border: {
|
|
21
20
|
type: Boolean,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.navbar.border
|
|
23
22
|
},
|
|
24
23
|
// 左边的图标
|
|
25
24
|
leftIcon: {
|
|
26
25
|
type: String,
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.navbar.leftIcon
|
|
28
27
|
},
|
|
29
28
|
// 左边的提示文字
|
|
30
29
|
leftText: {
|
|
31
30
|
type: String,
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.navbar.leftText
|
|
33
32
|
},
|
|
34
33
|
// 左右的提示文字
|
|
35
34
|
rightText: {
|
|
36
35
|
type: String,
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.navbar.rightText
|
|
38
37
|
},
|
|
39
38
|
// 右边的图标
|
|
40
39
|
rightIcon: {
|
|
41
40
|
type: String,
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.navbar.rightIcon
|
|
43
42
|
},
|
|
44
43
|
// 标题
|
|
45
44
|
title: {
|
|
46
45
|
type: [String, Number],
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.navbar.title
|
|
48
47
|
},
|
|
49
48
|
// 背景颜色
|
|
50
49
|
bgColor: {
|
|
51
50
|
type: String,
|
|
52
|
-
default:
|
|
51
|
+
default: () => uni.$u.props.navbar.bgColor
|
|
53
52
|
},
|
|
54
53
|
// 标题的宽度
|
|
55
54
|
titleWidth: {
|
|
56
55
|
type: [String, Number],
|
|
57
|
-
default:
|
|
56
|
+
default: () => uni.$u.props.navbar.titleWidth
|
|
58
57
|
},
|
|
59
58
|
// 导航栏高度
|
|
60
59
|
height: {
|
|
61
60
|
type: [String, Number],
|
|
62
|
-
default:
|
|
61
|
+
default: () => uni.$u.props.navbar.height
|
|
63
62
|
},
|
|
64
63
|
// 左侧返回图标的大小
|
|
65
64
|
leftIconSize: {
|
|
66
65
|
type: [String, Number],
|
|
67
|
-
default:
|
|
66
|
+
default: () => uni.$u.props.navbar.leftIconSize
|
|
68
67
|
},
|
|
69
68
|
// 左侧返回图标的颜色
|
|
70
69
|
leftIconColor: {
|
|
71
70
|
type: String,
|
|
72
|
-
default:
|
|
71
|
+
default: () => uni.$u.props.navbar.leftIconColor
|
|
73
72
|
},
|
|
74
73
|
// 点击左侧区域(返回图标),是否自动返回上一页
|
|
75
74
|
autoBack: {
|
|
76
75
|
type: Boolean,
|
|
77
|
-
default:
|
|
76
|
+
default: () => uni.$u.props.navbar.autoBack
|
|
78
77
|
},
|
|
79
78
|
// 标题的样式,对象或字符串
|
|
80
79
|
titleStyle: {
|
|
81
80
|
type: [String, Object],
|
|
82
|
-
default:
|
|
81
|
+
default: () => uni.$u.props.navbar.titleStyle
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 页面文字提示
|
|
5
4
|
tips: {
|
|
6
5
|
type: String,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.noNetwork.tips
|
|
8
7
|
},
|
|
9
8
|
// 一个z-index值,用于设置没有网络这个组件的层次,因为页面可能会有其他定位的元素层级过高,导致此组件被覆盖
|
|
10
9
|
zIndex: {
|
|
11
10
|
type: [String, Number],
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.noNetwork.zIndex
|
|
13
12
|
},
|
|
14
13
|
// image 没有网络的图片提示
|
|
15
14
|
image: {
|
|
16
15
|
type: String,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.noNetwork.image
|
|
18
17
|
}
|
|
19
18
|
}
|
|
20
19
|
}
|
|
@@ -1,71 +1,70 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 显示的内容,数组
|
|
5
4
|
text: {
|
|
6
5
|
type: [Array, String],
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.noticeBar.text
|
|
8
7
|
},
|
|
9
8
|
// 通告滚动模式,row-横向滚动,column-竖向滚动
|
|
10
9
|
direction: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.noticeBar.direction
|
|
13
12
|
},
|
|
14
13
|
// direction = row时,是否使用步进形式滚动
|
|
15
14
|
step: {
|
|
16
15
|
type: Boolean,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.noticeBar.step
|
|
18
17
|
},
|
|
19
18
|
// 是否显示左侧的音量图标
|
|
20
19
|
icon: {
|
|
21
20
|
type: String,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.noticeBar.icon
|
|
23
22
|
},
|
|
24
23
|
// 通告模式,link-显示右箭头,closable-显示右侧关闭图标
|
|
25
24
|
mode: {
|
|
26
25
|
type: String,
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.noticeBar.mode
|
|
28
27
|
},
|
|
29
28
|
// 文字颜色,各图标也会使用文字颜色
|
|
30
29
|
color: {
|
|
31
30
|
type: String,
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.noticeBar.color
|
|
33
32
|
},
|
|
34
33
|
// 背景颜色
|
|
35
34
|
bgColor: {
|
|
36
35
|
type: String,
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.noticeBar.bgColor
|
|
38
37
|
},
|
|
39
38
|
// 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
|
|
40
39
|
speed: {
|
|
41
40
|
type: [String, Number],
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.noticeBar.speed
|
|
43
42
|
},
|
|
44
43
|
// 字体大小
|
|
45
44
|
fontSize: {
|
|
46
45
|
type: [String, Number],
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.noticeBar.fontSize
|
|
48
47
|
},
|
|
49
48
|
// 滚动一个周期的时间长,单位ms
|
|
50
49
|
duration: {
|
|
51
50
|
type: [String, Number],
|
|
52
|
-
default:
|
|
51
|
+
default: () => uni.$u.props.noticeBar.duration
|
|
53
52
|
},
|
|
54
53
|
// 是否禁止用手滑动切换
|
|
55
54
|
// 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序
|
|
56
55
|
disableTouch: {
|
|
57
56
|
type: Boolean,
|
|
58
|
-
default:
|
|
57
|
+
default: () => uni.$u.props.noticeBar.disableTouch
|
|
59
58
|
},
|
|
60
59
|
// 跳转的页面路径
|
|
61
60
|
url: {
|
|
62
61
|
type: String,
|
|
63
|
-
default:
|
|
62
|
+
default: () => uni.$u.props.noticeBar.url
|
|
64
63
|
},
|
|
65
64
|
// 页面跳转的类型
|
|
66
65
|
linkType: {
|
|
67
66
|
type: String,
|
|
68
|
-
default:
|
|
67
|
+
default: () => uni.$u.props.noticeBar.linkType
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
}
|
|
@@ -1,50 +1,49 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 到顶部的距离
|
|
5
4
|
top: {
|
|
6
5
|
type: [String, Number],
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.notify.top
|
|
8
7
|
},
|
|
9
8
|
// 是否展示组件
|
|
10
9
|
// show: {
|
|
11
10
|
// type: Boolean,
|
|
12
|
-
// default:
|
|
11
|
+
// default: () => uni.$u.props.notify.show
|
|
13
12
|
// },
|
|
14
13
|
// type主题,primary,success,warning,error
|
|
15
14
|
type: {
|
|
16
15
|
type: String,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.notify.type
|
|
18
17
|
},
|
|
19
18
|
// 字体颜色
|
|
20
19
|
color: {
|
|
21
20
|
type: String,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.notify.color
|
|
23
22
|
},
|
|
24
23
|
// 背景颜色
|
|
25
24
|
bgColor: {
|
|
26
25
|
type: String,
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.notify.bgColor
|
|
28
27
|
},
|
|
29
28
|
// 展示的文字内容
|
|
30
29
|
message: {
|
|
31
30
|
type: String,
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.notify.message
|
|
33
32
|
},
|
|
34
33
|
// 展示时长,为0时不消失,单位ms
|
|
35
34
|
duration: {
|
|
36
35
|
type: [String, Number],
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.notify.duration
|
|
38
37
|
},
|
|
39
38
|
// 字体大小
|
|
40
39
|
fontSize: {
|
|
41
40
|
type: [String, Number],
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.notify.fontSize
|
|
43
42
|
},
|
|
44
43
|
// 是否留出顶部安全距离(状态栏高度)
|
|
45
44
|
safeAreaInsetTop: {
|
|
46
45
|
type: Boolean,
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.notify.safeAreaInsetTop
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
}
|
|
@@ -1,119 +1,118 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 步进器标识符,在change回调返回
|
|
5
4
|
name: {
|
|
6
5
|
type: [String, Number],
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.numberBox.name
|
|
8
7
|
},
|
|
9
8
|
// #ifdef VUE2
|
|
10
9
|
// 用于双向绑定的值,初始化时设置设为默认min值(最小值)
|
|
11
10
|
value: {
|
|
12
11
|
type: [String, Number],
|
|
13
|
-
default:
|
|
12
|
+
default: () => uni.$u.props.numberBox.value
|
|
14
13
|
},
|
|
15
14
|
// #endif
|
|
16
15
|
// #ifdef VUE3
|
|
17
16
|
// 用于双向绑定的值,初始化时设置设为默认min值(最小值)
|
|
18
17
|
modelValue: {
|
|
19
18
|
type: [String, Number],
|
|
20
|
-
default:
|
|
19
|
+
default: () => uni.$u.props.numberBox.value
|
|
21
20
|
},
|
|
22
21
|
// #endif
|
|
23
22
|
// 最小值
|
|
24
23
|
min: {
|
|
25
24
|
type: [String, Number],
|
|
26
|
-
default:
|
|
25
|
+
default: () => uni.$u.props.numberBox.min
|
|
27
26
|
},
|
|
28
27
|
// 最大值
|
|
29
28
|
max: {
|
|
30
29
|
type: [String, Number],
|
|
31
|
-
default:
|
|
30
|
+
default: () => uni.$u.props.numberBox.max
|
|
32
31
|
},
|
|
33
32
|
// 加减的步长,可为小数
|
|
34
33
|
step: {
|
|
35
34
|
type: [String, Number],
|
|
36
|
-
default:
|
|
35
|
+
default: () => uni.$u.props.numberBox.step
|
|
37
36
|
},
|
|
38
37
|
// 是否只允许输入整数
|
|
39
38
|
integer: {
|
|
40
39
|
type: Boolean,
|
|
41
|
-
default:
|
|
40
|
+
default: () => uni.$u.props.numberBox.integer
|
|
42
41
|
},
|
|
43
42
|
// 是否禁用,包括输入框,加减按钮
|
|
44
43
|
disabled: {
|
|
45
44
|
type: Boolean,
|
|
46
|
-
default:
|
|
45
|
+
default: () => uni.$u.props.numberBox.disabled
|
|
47
46
|
},
|
|
48
47
|
// 是否禁用输入框
|
|
49
48
|
disabledInput: {
|
|
50
49
|
type: Boolean,
|
|
51
|
-
default:
|
|
50
|
+
default: () => uni.$u.props.numberBox.disabledInput
|
|
52
51
|
},
|
|
53
52
|
// 是否开启异步变更,开启后需要手动控制输入值
|
|
54
53
|
asyncChange: {
|
|
55
54
|
type: Boolean,
|
|
56
|
-
default:
|
|
55
|
+
default: () => uni.$u.props.numberBox.asyncChange
|
|
57
56
|
},
|
|
58
57
|
// 输入框宽度,单位为px
|
|
59
58
|
inputWidth: {
|
|
60
59
|
type: [String, Number],
|
|
61
|
-
default:
|
|
60
|
+
default: () => uni.$u.props.numberBox.inputWidth
|
|
62
61
|
},
|
|
63
62
|
// 是否显示减少按钮
|
|
64
63
|
showMinus: {
|
|
65
64
|
type: Boolean,
|
|
66
|
-
default:
|
|
65
|
+
default: () => uni.$u.props.numberBox.showMinus
|
|
67
66
|
},
|
|
68
67
|
// 是否显示增加按钮
|
|
69
68
|
showPlus: {
|
|
70
69
|
type: Boolean,
|
|
71
|
-
default:
|
|
70
|
+
default: () => uni.$u.props.numberBox.showPlus
|
|
72
71
|
},
|
|
73
72
|
// 显示的小数位数
|
|
74
73
|
decimalLength: {
|
|
75
74
|
type: [String, Number, null],
|
|
76
|
-
default:
|
|
75
|
+
default: () => uni.$u.props.numberBox.decimalLength
|
|
77
76
|
},
|
|
78
77
|
// 是否开启长按加减手势
|
|
79
78
|
longPress: {
|
|
80
79
|
type: Boolean,
|
|
81
|
-
default:
|
|
80
|
+
default: () => uni.$u.props.numberBox.longPress
|
|
82
81
|
},
|
|
83
82
|
// 输入框文字和加减按钮图标的颜色
|
|
84
83
|
color: {
|
|
85
84
|
type: String,
|
|
86
|
-
default:
|
|
85
|
+
default: () => uni.$u.props.numberBox.color
|
|
87
86
|
},
|
|
88
87
|
// 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
|
|
89
88
|
buttonSize: {
|
|
90
89
|
type: [String, Number],
|
|
91
|
-
default:
|
|
90
|
+
default: () => uni.$u.props.numberBox.buttonSize
|
|
92
91
|
},
|
|
93
92
|
// 输入框和按钮的背景颜色
|
|
94
93
|
bgColor: {
|
|
95
94
|
type: String,
|
|
96
|
-
default:
|
|
95
|
+
default: () => uni.$u.props.numberBox.bgColor
|
|
97
96
|
},
|
|
98
97
|
// 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
|
|
99
98
|
cursorSpacing: {
|
|
100
99
|
type: [String, Number],
|
|
101
|
-
default:
|
|
100
|
+
default: () => uni.$u.props.numberBox.cursorSpacing
|
|
102
101
|
},
|
|
103
102
|
// 是否禁用增加按钮
|
|
104
103
|
disablePlus: {
|
|
105
104
|
type: Boolean,
|
|
106
|
-
default:
|
|
105
|
+
default: () => uni.$u.props.numberBox.disablePlus
|
|
107
106
|
},
|
|
108
107
|
// 是否禁用减少按钮
|
|
109
108
|
disableMinus: {
|
|
110
109
|
type: Boolean,
|
|
111
|
-
default:
|
|
110
|
+
default: () => uni.$u.props.numberBox.disableMinus
|
|
112
111
|
},
|
|
113
112
|
// 加减按钮图标的样式
|
|
114
113
|
iconStyle: {
|
|
115
114
|
type: [Object, String],
|
|
116
|
-
default:
|
|
115
|
+
default: () => uni.$u.props.numberBox.iconStyle
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
118
|
}
|
|
@@ -30,6 +30,21 @@
|
|
|
30
30
|
</view>
|
|
31
31
|
|
|
32
32
|
<slot name="input">
|
|
33
|
+
<!-- #ifdef MP-WEIXIN -->
|
|
34
|
+
<input
|
|
35
|
+
:disabled="disabledInput || disabled"
|
|
36
|
+
:cursor-spacing="getCursorSpacing"
|
|
37
|
+
:class="{ 'u-number-box__input--disabled': disabled || disabledInput }"
|
|
38
|
+
:value="currentValue"
|
|
39
|
+
class="u-number-box__input"
|
|
40
|
+
@blur="onBlur"
|
|
41
|
+
@focus="onFocus"
|
|
42
|
+
@input="onInput"
|
|
43
|
+
type="number"
|
|
44
|
+
:style="[inputStyle]"
|
|
45
|
+
/>
|
|
46
|
+
<!-- #endif -->
|
|
47
|
+
<!-- #ifndef MP-WEIXIN -->
|
|
33
48
|
<input
|
|
34
49
|
:disabled="disabledInput || disabled"
|
|
35
50
|
:cursor-spacing="getCursorSpacing"
|
|
@@ -42,6 +57,7 @@
|
|
|
42
57
|
type="number"
|
|
43
58
|
:style="[inputStyle]"
|
|
44
59
|
/>
|
|
60
|
+
<!-- #endif -->
|
|
45
61
|
</slot>
|
|
46
62
|
<view
|
|
47
63
|
class="u-number-box__slot"
|
|
@@ -81,7 +97,7 @@
|
|
|
81
97
|
/**
|
|
82
98
|
* numberBox 步进器
|
|
83
99
|
* @description 该组件一般用于商城购物选择物品数量的场景。
|
|
84
|
-
* @tutorial https://
|
|
100
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/numberBox.html
|
|
85
101
|
* @property {String | Number} name 步进器标识符,在change回调返回
|
|
86
102
|
* @property {String | Number} value 用于双向绑定的值,初始化时设置设为默认min值(最小值) (默认 0 )
|
|
87
103
|
* @property {String | Number} min 最小值 (默认 1 )
|
|
@@ -295,6 +311,10 @@
|
|
|
295
311
|
}
|
|
296
312
|
formatted = this.format(formatted)
|
|
297
313
|
this.emitChange(formatted);
|
|
314
|
+
// #ifdef MP-WEIXIN
|
|
315
|
+
return formatted
|
|
316
|
+
// #endif
|
|
317
|
+
|
|
298
318
|
},
|
|
299
319
|
// 发出change事件
|
|
300
320
|
emitChange(value) {
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 键盘的类型,number-数字键盘,card-身份证键盘
|
|
5
4
|
mode: {
|
|
6
5
|
type: String,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.numberKeyboard.value
|
|
8
7
|
},
|
|
9
8
|
// 是否显示键盘的"."符号
|
|
10
9
|
dotDisabled: {
|
|
11
10
|
type: Boolean,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.numberKeyboard.dotDisabled
|
|
13
12
|
},
|
|
14
13
|
// 是否打乱键盘按键的顺序
|
|
15
14
|
random: {
|
|
16
15
|
type: Boolean,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.numberKeyboard.random
|
|
18
17
|
}
|
|
19
18
|
}
|
|
20
19
|
}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 是否显示遮罩
|
|
5
4
|
show: {
|
|
6
5
|
type: Boolean,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.overlay.show
|
|
8
7
|
},
|
|
9
8
|
// 层级z-index
|
|
10
9
|
zIndex: {
|
|
11
10
|
type: [String, Number],
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.overlay.zIndex
|
|
13
12
|
},
|
|
14
13
|
// 遮罩的过渡时间,单位为ms
|
|
15
14
|
duration: {
|
|
16
15
|
type: [String, Number],
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.overlay.duration
|
|
18
17
|
},
|
|
19
18
|
// 不透明度值,当做rgba的第四个参数
|
|
20
19
|
opacity: {
|
|
21
20
|
type: [String, Number],
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.overlay.opacity
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
}
|