uview-plus 3.1.49 → 3.1.50

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.
Files changed (155) hide show
  1. package/README.md +10 -10
  2. package/changelog.md +5 -14
  3. package/components/u-action-sheet/props.js +11 -10
  4. package/components/u-album/props.js +12 -11
  5. package/components/u-alert/props.js +9 -8
  6. package/components/u-avatar/props.js +15 -14
  7. package/components/u-avatar-group/props.js +10 -9
  8. package/components/u-back-top/props.js +11 -10
  9. package/components/u-back-top/u-back-top.vue +1 -1
  10. package/components/u-badge/props.js +15 -14
  11. package/components/u-badge/u-badge.vue +1 -1
  12. package/components/u-button/props.js +29 -28
  13. package/components/u-calendar/month.vue +1 -1
  14. package/components/u-calendar/props.js +28 -27
  15. package/components/u-car-keyboard/props.js +1 -0
  16. package/components/u-car-keyboard/u-car-keyboard.vue +1 -1
  17. package/components/u-cell/props.js +18 -17
  18. package/components/u-cell/u-cell.vue +3 -12
  19. package/components/u-cell-group/props.js +3 -2
  20. package/components/u-cell-group/u-cell-group.vue +1 -1
  21. package/components/u-checkbox/props.js +14 -13
  22. package/components/u-checkbox/u-checkbox.vue +1 -1
  23. package/components/u-checkbox-group/props.js +17 -16
  24. package/components/u-circle-progress/props.js +2 -1
  25. package/components/u-code/props.js +7 -6
  26. package/components/u-code/u-code.vue +0 -5
  27. package/components/u-code-input/props.js +17 -16
  28. package/components/u-col/props.js +6 -5
  29. package/components/u-collapse/props.js +4 -3
  30. package/components/u-collapse-item/props.js +12 -11
  31. package/components/u-column-notice/props.js +11 -10
  32. package/components/u-count-down/props.js +5 -4
  33. package/components/u-count-down/u-count-down.vue +1 -6
  34. package/components/u-count-to/props.js +12 -11
  35. package/components/u-datetime-picker/props.js +25 -37
  36. package/components/u-datetime-picker/u-datetime-picker.vue +3 -22
  37. package/components/u-divider/props.js +9 -8
  38. package/components/u-dropdown/props.js +1 -0
  39. package/components/u-dropdown-item/props.js +1 -0
  40. package/components/u-empty/props.js +12 -11
  41. package/components/u-form/props.js +9 -8
  42. package/components/u-form/u-form.vue +1 -1
  43. package/components/u-form-item/props.js +9 -13
  44. package/components/u-form-item/u-form-item.vue +0 -1
  45. package/components/u-gap/props.js +5 -4
  46. package/components/u-grid/props.js +4 -3
  47. package/components/u-grid-item/props.js +3 -2
  48. package/components/u-grid-item/u-grid-item.vue +0 -5
  49. package/components/u-icon/props.js +18 -17
  50. package/components/u-icon/u-icon.vue +6 -9
  51. package/components/u-image/props.js +17 -16
  52. package/components/u-image/u-image.vue +1 -1
  53. package/components/u-index-anchor/props.js +6 -5
  54. package/components/u-index-anchor/u-index-anchor.vue +1 -1
  55. package/components/u-index-item/props.js +1 -0
  56. package/components/u-index-item/u-index-item.vue +1 -1
  57. package/components/u-index-list/props.js +6 -5
  58. package/components/u-index-list/u-index-list.vue +2 -3
  59. package/components/u-input/props.js +36 -35
  60. package/components/u-input/u-input.vue +4 -10
  61. package/components/u-keyboard/props.js +17 -16
  62. package/components/u-line/props.js +7 -6
  63. package/components/u-line-progress/props.js +6 -5
  64. package/components/u-link/props.js +8 -7
  65. package/components/u-list/props.js +15 -14
  66. package/components/u-list-item/props.js +2 -1
  67. package/components/u-loading-icon/props.js +12 -11
  68. package/components/u-loading-page/props.js +10 -9
  69. package/components/u-loadmore/props.js +19 -18
  70. package/components/u-modal/props.js +17 -16
  71. package/components/u-navbar/props.js +17 -16
  72. package/components/u-no-network/props.js +4 -3
  73. package/components/u-notice-bar/props.js +14 -13
  74. package/components/u-notify/props.js +10 -9
  75. package/components/u-notify/u-notify.vue +0 -5
  76. package/components/u-number-box/props.js +23 -22
  77. package/components/u-number-box/u-number-box.vue +1 -21
  78. package/components/u-number-keyboard/props.js +4 -3
  79. package/components/u-overlay/props.js +5 -4
  80. package/components/u-parse/props.js +9 -8
  81. package/components/u-parse/u-parse.vue +1 -6
  82. package/components/u-picker/props.js +17 -16
  83. package/components/u-picker-column/props.js +1 -0
  84. package/components/u-popup/props.js +16 -15
  85. package/components/u-radio/props.js +14 -13
  86. package/components/u-radio-group/props.js +18 -17
  87. package/components/u-rate/props.js +15 -14
  88. package/components/u-read-more/props.js +9 -8
  89. package/components/u-row/props.js +4 -3
  90. package/components/u-row-notice/props.js +8 -7
  91. package/components/u-row-notice/u-row-notice.vue +0 -5
  92. package/components/u-safe-bottom/props.js +1 -0
  93. package/components/u-scroll-list/props.js +7 -6
  94. package/components/u-search/props.js +25 -24
  95. package/components/u-skeleton/props.js +12 -11
  96. package/components/u-slider/props.js +12 -11
  97. package/components/u-status-bar/props.js +2 -1
  98. package/components/u-status-bar/u-status-bar.vue +1 -1
  99. package/components/u-steps/props.js +8 -7
  100. package/components/u-steps/u-steps.vue +1 -1
  101. package/components/u-steps-item/props.js +5 -4
  102. package/components/u-steps-item/u-steps-item.vue +1 -1
  103. package/components/u-sticky/props.js +7 -6
  104. package/components/u-sticky/u-sticky.vue +0 -5
  105. package/components/u-subsection/props.js +10 -9
  106. package/components/u-swipe-action/props.js +2 -1
  107. package/components/u-swipe-action-item/nvue.js +0 -5
  108. package/components/u-swipe-action-item/props.js +7 -6
  109. package/components/u-swiper/props.js +25 -24
  110. package/components/u-swiper-indicator/props.js +6 -5
  111. package/components/u-switch/props.js +12 -11
  112. package/components/u-tabbar/props.js +9 -8
  113. package/components/u-tabbar-item/props.js +7 -6
  114. package/components/u-table/props.js +1 -0
  115. package/components/u-tabs/props.js +13 -12
  116. package/components/u-tabs-item/props.js +1 -0
  117. package/components/u-tag/props.js +16 -15
  118. package/components/u-td/props.js +1 -0
  119. package/components/u-text/props.js +22 -21
  120. package/components/u-textarea/props.js +24 -23
  121. package/components/u-toast/u-toast.vue +0 -5
  122. package/components/u-toolbar/props.js +7 -6
  123. package/components/u-tooltip/props.js +12 -11
  124. package/components/u-tr/props.js +1 -0
  125. package/components/u-transition/props.js +5 -4
  126. package/components/u-transition/transition.js +9 -8
  127. package/components/u-transition/u-transition.vue +1 -1
  128. package/components/u-upload/props.js +23 -22
  129. package/components/u-upload/u-upload.vue +1 -1
  130. package/index.js +5 -1
  131. package/libs/config/props/actionSheet.js +1 -1
  132. package/libs/config/props/album.js +1 -1
  133. package/libs/config/props/avatarGroup.js +1 -1
  134. package/libs/config/props/backtop.js +2 -2
  135. package/libs/config/props/badge.js +1 -1
  136. package/libs/config/props/calendar.js +3 -3
  137. package/libs/config/props/checkboxGroup.js +1 -1
  138. package/libs/config/props/datetimePicker.js +1 -1
  139. package/libs/config/props/form.js +3 -3
  140. package/libs/config/props/formItem.js +0 -1
  141. package/libs/config/props/indexList.js +1 -1
  142. package/libs/config/props/noticeBar.js +1 -1
  143. package/libs/config/props/picker.js +2 -2
  144. package/libs/config/props/popup.js +1 -1
  145. package/libs/config/props/search.js +2 -2
  146. package/libs/config/props/slider.js +1 -1
  147. package/libs/config/props/swiper.js +1 -1
  148. package/libs/config/props/tabs.js +7 -7
  149. package/libs/config/props/text.js +2 -2
  150. package/libs/config/props/toast.js +1 -1
  151. package/libs/config/props/tooltip.js +1 -1
  152. package/libs/config/props/upload.js +3 -3
  153. package/libs/css/components.scss +1 -11
  154. package/libs/css/flex.scss +71 -73
  155. package/package.json +1 -1
@@ -1,84 +1,85 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // 是否展示modal
4
5
  show: {
5
6
  type: Boolean,
6
- default: () => uni.$u.props.modal.show
7
+ default: defprops.modal.show
7
8
  },
8
9
  // 标题
9
10
  title: {
10
11
  type: [String],
11
- default: () => uni.$u.props.modal.title
12
+ default: defprops.modal.title
12
13
  },
13
14
  // 弹窗内容
14
15
  content: {
15
16
  type: String,
16
- default: () => uni.$u.props.modal.content
17
+ default: defprops.modal.content
17
18
  },
18
19
  // 确认文案
19
20
  confirmText: {
20
21
  type: String,
21
- default: () => uni.$u.props.modal.confirmText
22
+ default: defprops.modal.confirmText
22
23
  },
23
24
  // 取消文案
24
25
  cancelText: {
25
26
  type: String,
26
- default: () => uni.$u.props.modal.cancelText
27
+ default: defprops.modal.cancelText
27
28
  },
28
29
  // 是否显示确认按钮
29
30
  showConfirmButton: {
30
31
  type: Boolean,
31
- default: () => uni.$u.props.modal.showConfirmButton
32
+ default: defprops.modal.showConfirmButton
32
33
  },
33
34
  // 是否显示取消按钮
34
35
  showCancelButton: {
35
36
  type: Boolean,
36
- default: () => uni.$u.props.modal.showCancelButton
37
+ default: defprops.modal.showCancelButton
37
38
  },
38
39
  // 确认按钮颜色
39
40
  confirmColor: {
40
41
  type: String,
41
- default: () => uni.$u.props.modal.confirmColor
42
+ default: defprops.modal.confirmColor
42
43
  },
43
44
  // 取消文字颜色
44
45
  cancelColor: {
45
46
  type: String,
46
- default: () => uni.$u.props.modal.cancelColor
47
+ default: defprops.modal.cancelColor
47
48
  },
48
49
  // 对调确认和取消的位置
49
50
  buttonReverse: {
50
51
  type: Boolean,
51
- default: () => uni.$u.props.modal.buttonReverse
52
+ default: defprops.modal.buttonReverse
52
53
  },
53
54
  // 是否开启缩放效果
54
55
  zoom: {
55
56
  type: Boolean,
56
- default: () => uni.$u.props.modal.zoom
57
+ default: defprops.modal.zoom
57
58
  },
58
59
  // 是否异步关闭,只对确定按钮有效
59
60
  asyncClose: {
60
61
  type: Boolean,
61
- default: () => uni.$u.props.modal.asyncClose
62
+ default: defprops.modal.asyncClose
62
63
  },
63
64
  // 是否允许点击遮罩关闭modal
64
65
  closeOnClickOverlay: {
65
66
  type: Boolean,
66
- default: () => uni.$u.props.modal.closeOnClickOverlay
67
+ default: defprops.modal.closeOnClickOverlay
67
68
  },
68
69
  // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
69
70
  negativeTop: {
70
71
  type: [String, Number],
71
- default: () => uni.$u.props.modal.negativeTop
72
+ default: defprops.modal.negativeTop
72
73
  },
73
74
  // modal宽度,不支持百分比,可以数值,px,rpx单位
74
75
  width: {
75
76
  type: [String, Number],
76
- default: () => uni.$u.props.modal.width
77
+ default: defprops.modal.width
77
78
  },
78
79
  // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
79
80
  confirmButtonShape: {
80
81
  type: String,
81
- default: () => uni.$u.props.modal.confirmButtonShape
82
+ default: defprops.modal.confirmButtonShape
82
83
  }
83
84
  }
84
85
  }
@@ -1,84 +1,85 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // 是否开启顶部安全区适配
4
5
  safeAreaInsetTop: {
5
6
  type: Boolean,
6
- default: () => uni.$u.props.navbar.safeAreaInsetTop
7
+ default: defprops.navbar.safeAreaInsetTop
7
8
  },
8
9
  // 固定在顶部时,是否生成一个等高元素,以防止塌陷
9
10
  placeholder: {
10
11
  type: Boolean,
11
- default: () => uni.$u.props.navbar.placeholder
12
+ default: defprops.navbar.placeholder
12
13
  },
13
14
  // 是否固定在顶部
14
15
  fixed: {
15
16
  type: Boolean,
16
- default: () => uni.$u.props.navbar.fixed
17
+ default: defprops.navbar.fixed
17
18
  },
18
19
  // 是否显示下边框
19
20
  border: {
20
21
  type: Boolean,
21
- default: () => uni.$u.props.navbar.border
22
+ default: defprops.navbar.border
22
23
  },
23
24
  // 左边的图标
24
25
  leftIcon: {
25
26
  type: String,
26
- default: () => uni.$u.props.navbar.leftIcon
27
+ default: defprops.navbar.leftIcon
27
28
  },
28
29
  // 左边的提示文字
29
30
  leftText: {
30
31
  type: String,
31
- default: () => uni.$u.props.navbar.leftText
32
+ default: defprops.navbar.leftText
32
33
  },
33
34
  // 左右的提示文字
34
35
  rightText: {
35
36
  type: String,
36
- default: () => uni.$u.props.navbar.rightText
37
+ default: defprops.navbar.rightText
37
38
  },
38
39
  // 右边的图标
39
40
  rightIcon: {
40
41
  type: String,
41
- default: () => uni.$u.props.navbar.rightIcon
42
+ default: defprops.navbar.rightIcon
42
43
  },
43
44
  // 标题
44
45
  title: {
45
46
  type: [String, Number],
46
- default: () => uni.$u.props.navbar.title
47
+ default: defprops.navbar.title
47
48
  },
48
49
  // 背景颜色
49
50
  bgColor: {
50
51
  type: String,
51
- default: () => uni.$u.props.navbar.bgColor
52
+ default: defprops.navbar.bgColor
52
53
  },
53
54
  // 标题的宽度
54
55
  titleWidth: {
55
56
  type: [String, Number],
56
- default: () => uni.$u.props.navbar.titleWidth
57
+ default: defprops.navbar.titleWidth
57
58
  },
58
59
  // 导航栏高度
59
60
  height: {
60
61
  type: [String, Number],
61
- default: () => uni.$u.props.navbar.height
62
+ default: defprops.navbar.height
62
63
  },
63
64
  // 左侧返回图标的大小
64
65
  leftIconSize: {
65
66
  type: [String, Number],
66
- default: () => uni.$u.props.navbar.leftIconSize
67
+ default: defprops.navbar.leftIconSize
67
68
  },
68
69
  // 左侧返回图标的颜色
69
70
  leftIconColor: {
70
71
  type: String,
71
- default: () => uni.$u.props.navbar.leftIconColor
72
+ default: defprops.navbar.leftIconColor
72
73
  },
73
74
  // 点击左侧区域(返回图标),是否自动返回上一页
74
75
  autoBack: {
75
76
  type: Boolean,
76
- default: () => uni.$u.props.navbar.autoBack
77
+ default: defprops.navbar.autoBack
77
78
  },
78
79
  // 标题的样式,对象或字符串
79
80
  titleStyle: {
80
81
  type: [String, Object],
81
- default: () => uni.$u.props.navbar.titleStyle
82
+ default: defprops.navbar.titleStyle
82
83
  }
83
84
  }
84
85
  }
@@ -1,19 +1,20 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // 页面文字提示
4
5
  tips: {
5
6
  type: String,
6
- default: () => uni.$u.props.noNetwork.tips
7
+ default: defprops.noNetwork.tips
7
8
  },
8
9
  // 一个z-index值,用于设置没有网络这个组件的层次,因为页面可能会有其他定位的元素层级过高,导致此组件被覆盖
9
10
  zIndex: {
10
11
  type: [String, Number],
11
- default: () => uni.$u.props.noNetwork.zIndex
12
+ default: defprops.noNetwork.zIndex
12
13
  },
13
14
  // image 没有网络的图片提示
14
15
  image: {
15
16
  type: String,
16
- default: () => uni.$u.props.noNetwork.image
17
+ default: defprops.noNetwork.image
17
18
  }
18
19
  }
19
20
  }
@@ -1,70 +1,71 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // 显示的内容,数组
4
5
  text: {
5
6
  type: [Array, String],
6
- default: () => uni.$u.props.noticeBar.text
7
+ default: defprops.noticeBar.text
7
8
  },
8
9
  // 通告滚动模式,row-横向滚动,column-竖向滚动
9
10
  direction: {
10
11
  type: String,
11
- default: () => uni.$u.props.noticeBar.direction
12
+ default: defprops.noticeBar.direction
12
13
  },
13
14
  // direction = row时,是否使用步进形式滚动
14
15
  step: {
15
16
  type: Boolean,
16
- default: () => uni.$u.props.noticeBar.step
17
+ default: defprops.noticeBar.step
17
18
  },
18
19
  // 是否显示左侧的音量图标
19
20
  icon: {
20
21
  type: String,
21
- default: () => uni.$u.props.noticeBar.icon
22
+ default: defprops.noticeBar.icon
22
23
  },
23
24
  // 通告模式,link-显示右箭头,closable-显示右侧关闭图标
24
25
  mode: {
25
26
  type: String,
26
- default: () => uni.$u.props.noticeBar.mode
27
+ default: defprops.noticeBar.mode
27
28
  },
28
29
  // 文字颜色,各图标也会使用文字颜色
29
30
  color: {
30
31
  type: String,
31
- default: () => uni.$u.props.noticeBar.color
32
+ default: defprops.noticeBar.color
32
33
  },
33
34
  // 背景颜色
34
35
  bgColor: {
35
36
  type: String,
36
- default: () => uni.$u.props.noticeBar.bgColor
37
+ default: defprops.noticeBar.bgColor
37
38
  },
38
39
  // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
39
40
  speed: {
40
41
  type: [String, Number],
41
- default: () => uni.$u.props.noticeBar.speed
42
+ default: defprops.noticeBar.speed
42
43
  },
43
44
  // 字体大小
44
45
  fontSize: {
45
46
  type: [String, Number],
46
- default: () => uni.$u.props.noticeBar.fontSize
47
+ default: defprops.noticeBar.fontSize
47
48
  },
48
49
  // 滚动一个周期的时间长,单位ms
49
50
  duration: {
50
51
  type: [String, Number],
51
- default: () => uni.$u.props.noticeBar.duration
52
+ default: defprops.noticeBar.duration
52
53
  },
53
54
  // 是否禁止用手滑动切换
54
55
  // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序
55
56
  disableTouch: {
56
57
  type: Boolean,
57
- default: () => uni.$u.props.noticeBar.disableTouch
58
+ default: defprops.noticeBar.disableTouch
58
59
  },
59
60
  // 跳转的页面路径
60
61
  url: {
61
62
  type: String,
62
- default: () => uni.$u.props.noticeBar.url
63
+ default: defprops.noticeBar.url
63
64
  },
64
65
  // 页面跳转的类型
65
66
  linkType: {
66
67
  type: String,
67
- default: () => uni.$u.props.noticeBar.linkType
68
+ default: defprops.noticeBar.linkType
68
69
  }
69
70
  }
70
71
  }
@@ -1,49 +1,50 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // 到顶部的距离
4
5
  top: {
5
6
  type: [String, Number],
6
- default: () => uni.$u.props.notify.top
7
+ default: defprops.notify.top
7
8
  },
8
9
  // 是否展示组件
9
10
  // show: {
10
11
  // type: Boolean,
11
- // default: () => uni.$u.props.notify.show
12
+ // default: defprops.notify.show
12
13
  // },
13
14
  // type主题,primary,success,warning,error
14
15
  type: {
15
16
  type: String,
16
- default: () => uni.$u.props.notify.type
17
+ default: defprops.notify.type
17
18
  },
18
19
  // 字体颜色
19
20
  color: {
20
21
  type: String,
21
- default: () => uni.$u.props.notify.color
22
+ default: defprops.notify.color
22
23
  },
23
24
  // 背景颜色
24
25
  bgColor: {
25
26
  type: String,
26
- default: () => uni.$u.props.notify.bgColor
27
+ default: defprops.notify.bgColor
27
28
  },
28
29
  // 展示的文字内容
29
30
  message: {
30
31
  type: String,
31
- default: () => uni.$u.props.notify.message
32
+ default: defprops.notify.message
32
33
  },
33
34
  // 展示时长,为0时不消失,单位ms
34
35
  duration: {
35
36
  type: [String, Number],
36
- default: () => uni.$u.props.notify.duration
37
+ default: defprops.notify.duration
37
38
  },
38
39
  // 字体大小
39
40
  fontSize: {
40
41
  type: [String, Number],
41
- default: () => uni.$u.props.notify.fontSize
42
+ default: defprops.notify.fontSize
42
43
  },
43
44
  // 是否留出顶部安全距离(状态栏高度)
44
45
  safeAreaInsetTop: {
45
46
  type: Boolean,
46
- default: () => uni.$u.props.notify.safeAreaInsetTop
47
+ default: defprops.notify.safeAreaInsetTop
47
48
  }
48
49
  }
49
50
  }
@@ -162,12 +162,7 @@
162
162
  this.timer = null
163
163
  }
164
164
  },
165
- // #ifdef VUE2
166
165
  beforeDestroy() {
167
- // #endif
168
- // #ifdef VUE3
169
- beforeUnmount() {
170
- // #endif
171
166
  this.clearTimer()
172
167
  }
173
168
  }
@@ -1,118 +1,119 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // 步进器标识符,在change回调返回
4
5
  name: {
5
6
  type: [String, Number],
6
- default: () => uni.$u.props.numberBox.name
7
+ default: defprops.numberBox.name
7
8
  },
8
9
  // #ifdef VUE2
9
10
  // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
10
11
  value: {
11
12
  type: [String, Number],
12
- default: () => uni.$u.props.numberBox.value
13
+ default: defprops.numberBox.value
13
14
  },
14
15
  // #endif
15
16
  // #ifdef VUE3
16
17
  // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
17
18
  modelValue: {
18
19
  type: [String, Number],
19
- default: () => uni.$u.props.numberBox.value
20
+ default: defprops.numberBox.value
20
21
  },
21
22
  // #endif
22
23
  // 最小值
23
24
  min: {
24
25
  type: [String, Number],
25
- default: () => uni.$u.props.numberBox.min
26
+ default: defprops.numberBox.min
26
27
  },
27
28
  // 最大值
28
29
  max: {
29
30
  type: [String, Number],
30
- default: () => uni.$u.props.numberBox.max
31
+ default: defprops.numberBox.max
31
32
  },
32
33
  // 加减的步长,可为小数
33
34
  step: {
34
35
  type: [String, Number],
35
- default: () => uni.$u.props.numberBox.step
36
+ default: defprops.numberBox.step
36
37
  },
37
38
  // 是否只允许输入整数
38
39
  integer: {
39
40
  type: Boolean,
40
- default: () => uni.$u.props.numberBox.integer
41
+ default: defprops.numberBox.integer
41
42
  },
42
43
  // 是否禁用,包括输入框,加减按钮
43
44
  disabled: {
44
45
  type: Boolean,
45
- default: () => uni.$u.props.numberBox.disabled
46
+ default: defprops.numberBox.disabled
46
47
  },
47
48
  // 是否禁用输入框
48
49
  disabledInput: {
49
50
  type: Boolean,
50
- default: () => uni.$u.props.numberBox.disabledInput
51
+ default: defprops.numberBox.disabledInput
51
52
  },
52
53
  // 是否开启异步变更,开启后需要手动控制输入值
53
54
  asyncChange: {
54
55
  type: Boolean,
55
- default: () => uni.$u.props.numberBox.asyncChange
56
+ default: defprops.numberBox.asyncChange
56
57
  },
57
58
  // 输入框宽度,单位为px
58
59
  inputWidth: {
59
60
  type: [String, Number],
60
- default: () => uni.$u.props.numberBox.inputWidth
61
+ default: defprops.numberBox.inputWidth
61
62
  },
62
63
  // 是否显示减少按钮
63
64
  showMinus: {
64
65
  type: Boolean,
65
- default: () => uni.$u.props.numberBox.showMinus
66
+ default: defprops.numberBox.showMinus
66
67
  },
67
68
  // 是否显示增加按钮
68
69
  showPlus: {
69
70
  type: Boolean,
70
- default: () => uni.$u.props.numberBox.showPlus
71
+ default: defprops.numberBox.showPlus
71
72
  },
72
73
  // 显示的小数位数
73
74
  decimalLength: {
74
75
  type: [String, Number, null],
75
- default: () => uni.$u.props.numberBox.decimalLength
76
+ default: defprops.numberBox.decimalLength
76
77
  },
77
78
  // 是否开启长按加减手势
78
79
  longPress: {
79
80
  type: Boolean,
80
- default: () => uni.$u.props.numberBox.longPress
81
+ default: defprops.numberBox.longPress
81
82
  },
82
83
  // 输入框文字和加减按钮图标的颜色
83
84
  color: {
84
85
  type: String,
85
- default: () => uni.$u.props.numberBox.color
86
+ default: defprops.numberBox.color
86
87
  },
87
88
  // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
88
89
  buttonSize: {
89
90
  type: [String, Number],
90
- default: () => uni.$u.props.numberBox.buttonSize
91
+ default: defprops.numberBox.buttonSize
91
92
  },
92
93
  // 输入框和按钮的背景颜色
93
94
  bgColor: {
94
95
  type: String,
95
- default: () => uni.$u.props.numberBox.bgColor
96
+ default: defprops.numberBox.bgColor
96
97
  },
97
98
  // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
98
99
  cursorSpacing: {
99
100
  type: [String, Number],
100
- default: () => uni.$u.props.numberBox.cursorSpacing
101
+ default: defprops.numberBox.cursorSpacing
101
102
  },
102
103
  // 是否禁用增加按钮
103
104
  disablePlus: {
104
105
  type: Boolean,
105
- default: () => uni.$u.props.numberBox.disablePlus
106
+ default: defprops.numberBox.disablePlus
106
107
  },
107
108
  // 是否禁用减少按钮
108
109
  disableMinus: {
109
110
  type: Boolean,
110
- default: () => uni.$u.props.numberBox.disableMinus
111
+ default: defprops.numberBox.disableMinus
111
112
  },
112
113
  // 加减按钮图标的样式
113
114
  iconStyle: {
114
115
  type: [Object, String],
115
- default: () => uni.$u.props.numberBox.iconStyle
116
+ default: defprops.numberBox.iconStyle
116
117
  }
117
118
  }
118
119
  }
@@ -30,21 +30,6 @@
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 -->
48
33
  <input
49
34
  :disabled="disabledInput || disabled"
50
35
  :cursor-spacing="getCursorSpacing"
@@ -57,7 +42,6 @@
57
42
  type="number"
58
43
  :style="[inputStyle]"
59
44
  />
60
- <!-- #endif -->
61
45
  </slot>
62
46
  <view
63
47
  class="u-number-box__slot"
@@ -97,7 +81,7 @@
97
81
  /**
98
82
  * numberBox 步进器
99
83
  * @description 该组件一般用于商城购物选择物品数量的场景。
100
- * @tutorial https://uview-plus.jiangruyi.com/components/numberBox.html
84
+ * @tutorial https://uiadmin.net/uview-plus/components/numberBox.html
101
85
  * @property {String | Number} name 步进器标识符,在change回调返回
102
86
  * @property {String | Number} value 用于双向绑定的值,初始化时设置设为默认min值(最小值) (默认 0 )
103
87
  * @property {String | Number} min 最小值 (默认 1 )
@@ -311,10 +295,6 @@
311
295
  }
312
296
  formatted = this.format(formatted)
313
297
  this.emitChange(formatted);
314
- // #ifdef MP-WEIXIN
315
- return formatted
316
- // #endif
317
-
318
298
  },
319
299
  // 发出change事件
320
300
  emitChange(value) {
@@ -1,19 +1,20 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // 键盘的类型,number-数字键盘,card-身份证键盘
4
5
  mode: {
5
6
  type: String,
6
- default: () => uni.$u.props.numberKeyboard.value
7
+ default: defprops.numberKeyboard.value
7
8
  },
8
9
  // 是否显示键盘的"."符号
9
10
  dotDisabled: {
10
11
  type: Boolean,
11
- default: () => uni.$u.props.numberKeyboard.dotDisabled
12
+ default: defprops.numberKeyboard.dotDisabled
12
13
  },
13
14
  // 是否打乱键盘按键的顺序
14
15
  random: {
15
16
  type: Boolean,
16
- default: () => uni.$u.props.numberKeyboard.random
17
+ default: defprops.numberKeyboard.random
17
18
  }
18
19
  }
19
20
  }
@@ -1,24 +1,25 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // 是否显示遮罩
4
5
  show: {
5
6
  type: Boolean,
6
- default: () => uni.$u.props.overlay.show
7
+ default: defprops.overlay.show
7
8
  },
8
9
  // 层级z-index
9
10
  zIndex: {
10
11
  type: [String, Number],
11
- default: () => uni.$u.props.overlay.zIndex
12
+ default: defprops.overlay.zIndex
12
13
  },
13
14
  // 遮罩的过渡时间,单位为ms
14
15
  duration: {
15
16
  type: [String, Number],
16
- default: () => uni.$u.props.overlay.duration
17
+ default: defprops.overlay.duration
17
18
  },
18
19
  // 不透明度值,当做rgba的第四个参数
19
20
  opacity: {
20
21
  type: [String, Number],
21
- default: () => uni.$u.props.overlay.opacity
22
+ default: defprops.overlay.opacity
22
23
  }
23
24
  }
24
25
  }