uview-plus 3.1.50 → 3.1.52

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 (169) hide show
  1. package/README.md +10 -10
  2. package/changelog.md +18 -1
  3. package/components/u-action-sheet/props.js +10 -11
  4. package/components/u-album/props.js +11 -12
  5. package/components/u-alert/props.js +8 -9
  6. package/components/u-avatar/props.js +14 -15
  7. package/components/u-avatar-group/props.js +9 -10
  8. package/components/u-back-top/props.js +10 -11
  9. package/components/u-back-top/u-back-top.vue +1 -1
  10. package/components/u-badge/props.js +14 -15
  11. package/components/u-badge/u-badge.vue +1 -1
  12. package/components/u-button/props.js +28 -29
  13. package/components/u-button/u-button.vue +6 -6
  14. package/components/u-button/vue.scss +8 -7
  15. package/components/u-calendar/month.vue +1 -1
  16. package/components/u-calendar/props.js +27 -28
  17. package/components/u-car-keyboard/props.js +0 -1
  18. package/components/u-car-keyboard/u-car-keyboard.vue +1 -1
  19. package/components/u-cell/props.js +17 -18
  20. package/components/u-cell/u-cell.vue +14 -4
  21. package/components/u-cell-group/props.js +2 -3
  22. package/components/u-cell-group/u-cell-group.vue +1 -1
  23. package/components/u-checkbox/props.js +13 -14
  24. package/components/u-checkbox/u-checkbox.vue +1 -1
  25. package/components/u-checkbox-group/props.js +16 -17
  26. package/components/u-circle-progress/props.js +1 -2
  27. package/components/u-code/props.js +6 -7
  28. package/components/u-code/u-code.vue +5 -0
  29. package/components/u-code-input/props.js +16 -17
  30. package/components/u-col/props.js +5 -6
  31. package/components/u-collapse/props.js +3 -4
  32. package/components/u-collapse-item/props.js +11 -12
  33. package/components/u-column-notice/props.js +10 -11
  34. package/components/u-copy/u-copy.vue +70 -0
  35. package/components/u-count-down/props.js +4 -5
  36. package/components/u-count-down/u-count-down.vue +6 -1
  37. package/components/u-count-to/props.js +11 -12
  38. package/components/u-datetime-picker/props.js +37 -25
  39. package/components/u-datetime-picker/u-datetime-picker.vue +58 -3
  40. package/components/u-divider/props.js +8 -9
  41. package/components/u-dropdown/props.js +0 -1
  42. package/components/u-dropdown-item/props.js +0 -1
  43. package/components/u-empty/props.js +11 -12
  44. package/components/u-form/props.js +8 -9
  45. package/components/u-form/u-form.vue +1 -1
  46. package/components/u-form-item/props.js +13 -9
  47. package/components/u-form-item/u-form-item.vue +1 -0
  48. package/components/u-gap/props.js +4 -5
  49. package/components/u-gap/u-gap.vue +5 -4
  50. package/components/u-grid/props.js +3 -4
  51. package/components/u-grid-item/props.js +2 -3
  52. package/components/u-grid-item/u-grid-item.vue +5 -0
  53. package/components/u-icon/props.js +17 -18
  54. package/components/u-icon/u-icon.vue +9 -6
  55. package/components/u-image/props.js +16 -17
  56. package/components/u-image/u-image.vue +1 -1
  57. package/components/u-index-anchor/props.js +5 -6
  58. package/components/u-index-anchor/u-index-anchor.vue +1 -1
  59. package/components/u-index-item/props.js +0 -1
  60. package/components/u-index-item/u-index-item.vue +1 -1
  61. package/components/u-index-list/props.js +5 -6
  62. package/components/u-index-list/u-index-list.vue +3 -2
  63. package/components/u-input/props.js +35 -36
  64. package/components/u-input/u-input.vue +10 -4
  65. package/components/u-keyboard/props.js +16 -17
  66. package/components/u-line/props.js +6 -7
  67. package/components/u-line-progress/props.js +5 -6
  68. package/components/u-link/props.js +7 -8
  69. package/components/u-list/props.js +14 -15
  70. package/components/u-list-item/props.js +1 -2
  71. package/components/u-loading-icon/props.js +11 -12
  72. package/components/u-loading-page/props.js +9 -10
  73. package/components/u-loadmore/props.js +18 -19
  74. package/components/u-modal/props.js +16 -17
  75. package/components/u-navbar/props.js +16 -17
  76. package/components/u-no-network/props.js +3 -4
  77. package/components/u-notice-bar/props.js +13 -14
  78. package/components/u-notify/props.js +9 -10
  79. package/components/u-notify/u-notify.vue +5 -0
  80. package/components/u-number-box/props.js +22 -23
  81. package/components/u-number-box/u-number-box.vue +21 -1
  82. package/components/u-number-keyboard/props.js +3 -4
  83. package/components/u-overlay/props.js +4 -5
  84. package/components/u-parse/props.js +8 -9
  85. package/components/u-parse/u-parse.vue +6 -1
  86. package/components/u-picker/props.js +16 -17
  87. package/components/u-picker-column/props.js +0 -1
  88. package/components/u-popup/props.js +15 -16
  89. package/components/u-qrcode/qrcode.js +1206 -0
  90. package/components/u-qrcode/u-qrcode.vue +199 -0
  91. package/components/u-radio/props.js +13 -14
  92. package/components/u-radio-group/props.js +17 -18
  93. package/components/u-rate/props.js +14 -15
  94. package/components/u-read-more/props.js +8 -9
  95. package/components/u-row/props.js +3 -4
  96. package/components/u-row-notice/props.js +7 -8
  97. package/components/u-row-notice/u-row-notice.vue +5 -0
  98. package/components/u-safe-bottom/props.js +0 -1
  99. package/components/u-scroll-list/props.js +6 -7
  100. package/components/u-search/props.js +24 -25
  101. package/components/u-skeleton/props.js +11 -12
  102. package/components/u-slider/props.js +11 -12
  103. package/components/u-status-bar/props.js +1 -2
  104. package/components/u-status-bar/u-status-bar.vue +1 -1
  105. package/components/u-steps/props.js +7 -8
  106. package/components/u-steps/u-steps.vue +1 -1
  107. package/components/u-steps-item/props.js +4 -5
  108. package/components/u-steps-item/u-steps-item.vue +1 -1
  109. package/components/u-sticky/props.js +6 -7
  110. package/components/u-sticky/u-sticky.vue +5 -0
  111. package/components/u-subsection/props.js +9 -10
  112. package/components/u-subsection/u-subsection.vue +2 -2
  113. package/components/u-swipe-action/props.js +1 -2
  114. package/components/u-swipe-action-item/nvue.js +5 -0
  115. package/components/u-swipe-action-item/props.js +6 -7
  116. package/components/u-swiper/props.js +24 -25
  117. package/components/u-swiper-indicator/props.js +5 -6
  118. package/components/u-switch/props.js +11 -12
  119. package/components/u-tabbar/props.js +8 -9
  120. package/components/u-tabbar-item/props.js +6 -7
  121. package/components/u-table/props.js +0 -1
  122. package/components/u-tabs/props.js +12 -13
  123. package/components/u-tabs-item/props.js +0 -1
  124. package/components/u-tag/props.js +15 -16
  125. package/components/u-td/props.js +0 -1
  126. package/components/u-text/props.js +21 -22
  127. package/components/u-textarea/props.js +23 -24
  128. package/components/u-toast/u-toast.vue +5 -0
  129. package/components/u-toolbar/props.js +6 -7
  130. package/components/u-tooltip/props.js +11 -12
  131. package/components/u-tooltip/u-tooltip.vue +0 -28
  132. package/components/u-tr/props.js +0 -1
  133. package/components/u-transition/props.js +4 -5
  134. package/components/u-transition/transition.js +8 -9
  135. package/components/u-transition/u-transition.vue +1 -1
  136. package/components/u-upload/props.js +22 -23
  137. package/components/u-upload/u-upload.vue +1 -1
  138. package/index.js +6 -6
  139. package/libs/config/props/actionSheet.js +1 -1
  140. package/libs/config/props/album.js +1 -1
  141. package/libs/config/props/avatarGroup.js +1 -1
  142. package/libs/config/props/backtop.js +2 -2
  143. package/libs/config/props/badge.js +1 -1
  144. package/libs/config/props/calendar.js +3 -3
  145. package/libs/config/props/checkboxGroup.js +1 -1
  146. package/libs/config/props/datetimePicker.js +1 -1
  147. package/libs/config/props/form.js +3 -3
  148. package/libs/config/props/formItem.js +1 -0
  149. package/libs/config/props/indexList.js +1 -1
  150. package/libs/config/props/noticeBar.js +1 -1
  151. package/libs/config/props/picker.js +2 -2
  152. package/libs/config/props/popup.js +1 -1
  153. package/libs/config/props/search.js +2 -2
  154. package/libs/config/props/slider.js +1 -1
  155. package/libs/config/props/swiper.js +1 -1
  156. package/libs/config/props/tabs.js +7 -7
  157. package/libs/config/props/text.js +2 -2
  158. package/libs/config/props/toast.js +1 -1
  159. package/libs/config/props/tooltip.js +1 -1
  160. package/libs/config/props/upload.js +3 -3
  161. package/libs/css/components.scss +11 -1
  162. package/libs/css/flex.scss +103 -101
  163. package/libs/function/colorGradient.js +8 -8
  164. package/libs/function/debounce.js +2 -2
  165. package/libs/function/digit.js +5 -5
  166. package/libs/function/index.js +29 -29
  167. package/libs/function/test.js +28 -28
  168. package/libs/function/throttle.js +2 -2
  169. package/package.json +4 -3
@@ -1,50 +1,49 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 提示内容
5
4
  loadingText: {
6
5
  type: [String, Number],
7
- default: defprops.loadingPage.loadingText
6
+ default: () => uni.$u.props.loadingPage.loadingText
8
7
  },
9
8
  // 文字上方用于替换loading动画的图片
10
9
  image: {
11
10
  type: String,
12
- default: defprops.loadingPage.image
11
+ default: () => uni.$u.props.loadingPage.image
13
12
  },
14
13
  // 加载动画的模式,circle-圆形,spinner-花朵形,semicircle-半圆形
15
14
  loadingMode: {
16
15
  type: String,
17
- default: defprops.loadingPage.loadingMode
16
+ default: () => uni.$u.props.loadingPage.loadingMode
18
17
  },
19
18
  // 是否加载中
20
19
  loading: {
21
20
  type: Boolean,
22
- default: defprops.loadingPage.loading
21
+ default: () => uni.$u.props.loadingPage.loading
23
22
  },
24
23
  // 背景色
25
24
  bgColor: {
26
25
  type: String,
27
- default: defprops.loadingPage.bgColor
26
+ default: () => uni.$u.props.loadingPage.bgColor
28
27
  },
29
28
  // 文字颜色
30
29
  color: {
31
30
  type: String,
32
- default: defprops.loadingPage.color
31
+ default: () => uni.$u.props.loadingPage.color
33
32
  },
34
33
  // 文字大小
35
34
  fontSize: {
36
35
  type: [String, Number],
37
- default: defprops.loadingPage.fontSize
36
+ default: () => uni.$u.props.loadingPage.fontSize
38
37
  },
39
38
  // 图标大小
40
39
  iconSize: {
41
40
  type: [String, Number],
42
- default: defprops.loadingPage.fontSize
41
+ default: () => uni.$u.props.loadingPage.fontSize
43
42
  },
44
43
  // 加载中图标的颜色,只能rgb或者十六进制颜色值
45
44
  loadingColor: {
46
45
  type: String,
47
- default: defprops.loadingPage.loadingColor
46
+ default: () => uni.$u.props.loadingPage.loadingColor
48
47
  }
49
48
  }
50
49
  }
@@ -1,95 +1,94 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
5
4
  status: {
6
5
  type: String,
7
- default: defprops.loadmore.status
6
+ default: () => uni.$u.props.loadmore.status
8
7
  },
9
8
  // 组件背景色
10
9
  bgColor: {
11
10
  type: String,
12
- default: defprops.loadmore.bgColor
11
+ default: () => uni.$u.props.loadmore.bgColor
13
12
  },
14
13
  // 是否显示加载中的图标
15
14
  icon: {
16
15
  type: Boolean,
17
- default: defprops.loadmore.icon
16
+ default: () => uni.$u.props.loadmore.icon
18
17
  },
19
18
  // 字体大小
20
19
  fontSize: {
21
20
  type: [String, Number],
22
- default: defprops.loadmore.fontSize
21
+ default: () => uni.$u.props.loadmore.fontSize
23
22
  },
24
23
  // 图标大小
25
24
  iconSize: {
26
25
  type: [String, Number],
27
- default: defprops.loadmore.iconSize
26
+ default: () => uni.$u.props.loadmore.iconSize
28
27
  },
29
28
  // 字体颜色
30
29
  color: {
31
30
  type: String,
32
- default: defprops.loadmore.color
31
+ default: () => uni.$u.props.loadmore.color
33
32
  },
34
33
  // 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆
35
34
  loadingIcon: {
36
35
  type: String,
37
- default: defprops.loadmore.loadingIcon
36
+ default: () => uni.$u.props.loadmore.loadingIcon
38
37
  },
39
38
  // 加载前的提示语
40
39
  loadmoreText: {
41
40
  type: String,
42
- default: defprops.loadmore.loadmoreText
41
+ default: () => uni.$u.props.loadmore.loadmoreText
43
42
  },
44
43
  // 加载中提示语
45
44
  loadingText: {
46
45
  type: String,
47
- default: defprops.loadmore.loadingText
46
+ default: () => uni.$u.props.loadmore.loadingText
48
47
  },
49
48
  // 没有更多的提示语
50
49
  nomoreText: {
51
50
  type: String,
52
- default: defprops.loadmore.nomoreText
51
+ default: () => uni.$u.props.loadmore.nomoreText
53
52
  },
54
53
  // 在“没有更多”状态下,是否显示粗点
55
54
  isDot: {
56
55
  type: Boolean,
57
- default: defprops.loadmore.isDot
56
+ default: () => uni.$u.props.loadmore.isDot
58
57
  },
59
58
  // 加载中图标的颜色
60
59
  iconColor: {
61
60
  type: String,
62
- default: defprops.loadmore.iconColor
61
+ default: () => uni.$u.props.loadmore.iconColor
63
62
  },
64
63
  // 上边距
65
64
  marginTop: {
66
65
  type: [String, Number],
67
- default: defprops.loadmore.marginTop
66
+ default: () => uni.$u.props.loadmore.marginTop
68
67
  },
69
68
  // 下边距
70
69
  marginBottom: {
71
70
  type: [String, Number],
72
- default: defprops.loadmore.marginBottom
71
+ default: () => uni.$u.props.loadmore.marginBottom
73
72
  },
74
73
  // 高度,单位px
75
74
  height: {
76
75
  type: [String, Number],
77
- default: defprops.loadmore.height
76
+ default: () => uni.$u.props.loadmore.height
78
77
  },
79
78
  // 是否显示左边分割线
80
79
  line: {
81
80
  type: Boolean,
82
- default: defprops.loadmore.line
81
+ default: () => uni.$u.props.loadmore.line
83
82
  },
84
83
  // 线条颜色
85
84
  lineColor: {
86
85
  type: String,
87
- default: defprops.loadmore.lineColor
86
+ default: () => uni.$u.props.loadmore.lineColor
88
87
  },
89
88
  // 是否虚线,true-虚线,false-实线
90
89
  dashed: {
91
90
  type: Boolean,
92
- default: defprops.loadmore.dashed
91
+ default: () => uni.$u.props.loadmore.dashed
93
92
  }
94
93
  }
95
94
  }
@@ -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: defprops.modal.show
6
+ default: () => uni.$u.props.modal.show
8
7
  },
9
8
  // 标题
10
9
  title: {
11
10
  type: [String],
12
- default: defprops.modal.title
11
+ default: () => uni.$u.props.modal.title
13
12
  },
14
13
  // 弹窗内容
15
14
  content: {
16
15
  type: String,
17
- default: defprops.modal.content
16
+ default: () => uni.$u.props.modal.content
18
17
  },
19
18
  // 确认文案
20
19
  confirmText: {
21
20
  type: String,
22
- default: defprops.modal.confirmText
21
+ default: () => uni.$u.props.modal.confirmText
23
22
  },
24
23
  // 取消文案
25
24
  cancelText: {
26
25
  type: String,
27
- default: defprops.modal.cancelText
26
+ default: () => uni.$u.props.modal.cancelText
28
27
  },
29
28
  // 是否显示确认按钮
30
29
  showConfirmButton: {
31
30
  type: Boolean,
32
- default: defprops.modal.showConfirmButton
31
+ default: () => uni.$u.props.modal.showConfirmButton
33
32
  },
34
33
  // 是否显示取消按钮
35
34
  showCancelButton: {
36
35
  type: Boolean,
37
- default: defprops.modal.showCancelButton
36
+ default: () => uni.$u.props.modal.showCancelButton
38
37
  },
39
38
  // 确认按钮颜色
40
39
  confirmColor: {
41
40
  type: String,
42
- default: defprops.modal.confirmColor
41
+ default: () => uni.$u.props.modal.confirmColor
43
42
  },
44
43
  // 取消文字颜色
45
44
  cancelColor: {
46
45
  type: String,
47
- default: defprops.modal.cancelColor
46
+ default: () => uni.$u.props.modal.cancelColor
48
47
  },
49
48
  // 对调确认和取消的位置
50
49
  buttonReverse: {
51
50
  type: Boolean,
52
- default: defprops.modal.buttonReverse
51
+ default: () => uni.$u.props.modal.buttonReverse
53
52
  },
54
53
  // 是否开启缩放效果
55
54
  zoom: {
56
55
  type: Boolean,
57
- default: defprops.modal.zoom
56
+ default: () => uni.$u.props.modal.zoom
58
57
  },
59
58
  // 是否异步关闭,只对确定按钮有效
60
59
  asyncClose: {
61
60
  type: Boolean,
62
- default: defprops.modal.asyncClose
61
+ default: () => uni.$u.props.modal.asyncClose
63
62
  },
64
63
  // 是否允许点击遮罩关闭modal
65
64
  closeOnClickOverlay: {
66
65
  type: Boolean,
67
- default: defprops.modal.closeOnClickOverlay
66
+ default: () => uni.$u.props.modal.closeOnClickOverlay
68
67
  },
69
68
  // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
70
69
  negativeTop: {
71
70
  type: [String, Number],
72
- default: defprops.modal.negativeTop
71
+ default: () => uni.$u.props.modal.negativeTop
73
72
  },
74
73
  // modal宽度,不支持百分比,可以数值,px,rpx单位
75
74
  width: {
76
75
  type: [String, Number],
77
- default: defprops.modal.width
76
+ default: () => uni.$u.props.modal.width
78
77
  },
79
78
  // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
80
79
  confirmButtonShape: {
81
80
  type: String,
82
- default: defprops.modal.confirmButtonShape
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: defprops.navbar.safeAreaInsetTop
6
+ default: () => uni.$u.props.navbar.safeAreaInsetTop
8
7
  },
9
8
  // 固定在顶部时,是否生成一个等高元素,以防止塌陷
10
9
  placeholder: {
11
10
  type: Boolean,
12
- default: defprops.navbar.placeholder
11
+ default: () => uni.$u.props.navbar.placeholder
13
12
  },
14
13
  // 是否固定在顶部
15
14
  fixed: {
16
15
  type: Boolean,
17
- default: defprops.navbar.fixed
16
+ default: () => uni.$u.props.navbar.fixed
18
17
  },
19
18
  // 是否显示下边框
20
19
  border: {
21
20
  type: Boolean,
22
- default: defprops.navbar.border
21
+ default: () => uni.$u.props.navbar.border
23
22
  },
24
23
  // 左边的图标
25
24
  leftIcon: {
26
25
  type: String,
27
- default: defprops.navbar.leftIcon
26
+ default: () => uni.$u.props.navbar.leftIcon
28
27
  },
29
28
  // 左边的提示文字
30
29
  leftText: {
31
30
  type: String,
32
- default: defprops.navbar.leftText
31
+ default: () => uni.$u.props.navbar.leftText
33
32
  },
34
33
  // 左右的提示文字
35
34
  rightText: {
36
35
  type: String,
37
- default: defprops.navbar.rightText
36
+ default: () => uni.$u.props.navbar.rightText
38
37
  },
39
38
  // 右边的图标
40
39
  rightIcon: {
41
40
  type: String,
42
- default: defprops.navbar.rightIcon
41
+ default: () => uni.$u.props.navbar.rightIcon
43
42
  },
44
43
  // 标题
45
44
  title: {
46
45
  type: [String, Number],
47
- default: defprops.navbar.title
46
+ default: () => uni.$u.props.navbar.title
48
47
  },
49
48
  // 背景颜色
50
49
  bgColor: {
51
50
  type: String,
52
- default: defprops.navbar.bgColor
51
+ default: () => uni.$u.props.navbar.bgColor
53
52
  },
54
53
  // 标题的宽度
55
54
  titleWidth: {
56
55
  type: [String, Number],
57
- default: defprops.navbar.titleWidth
56
+ default: () => uni.$u.props.navbar.titleWidth
58
57
  },
59
58
  // 导航栏高度
60
59
  height: {
61
60
  type: [String, Number],
62
- default: defprops.navbar.height
61
+ default: () => uni.$u.props.navbar.height
63
62
  },
64
63
  // 左侧返回图标的大小
65
64
  leftIconSize: {
66
65
  type: [String, Number],
67
- default: defprops.navbar.leftIconSize
66
+ default: () => uni.$u.props.navbar.leftIconSize
68
67
  },
69
68
  // 左侧返回图标的颜色
70
69
  leftIconColor: {
71
70
  type: String,
72
- default: defprops.navbar.leftIconColor
71
+ default: () => uni.$u.props.navbar.leftIconColor
73
72
  },
74
73
  // 点击左侧区域(返回图标),是否自动返回上一页
75
74
  autoBack: {
76
75
  type: Boolean,
77
- default: defprops.navbar.autoBack
76
+ default: () => uni.$u.props.navbar.autoBack
78
77
  },
79
78
  // 标题的样式,对象或字符串
80
79
  titleStyle: {
81
80
  type: [String, Object],
82
- default: defprops.navbar.titleStyle
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: defprops.noNetwork.tips
6
+ default: () => uni.$u.props.noNetwork.tips
8
7
  },
9
8
  // 一个z-index值,用于设置没有网络这个组件的层次,因为页面可能会有其他定位的元素层级过高,导致此组件被覆盖
10
9
  zIndex: {
11
10
  type: [String, Number],
12
- default: defprops.noNetwork.zIndex
11
+ default: () => uni.$u.props.noNetwork.zIndex
13
12
  },
14
13
  // image 没有网络的图片提示
15
14
  image: {
16
15
  type: String,
17
- default: defprops.noNetwork.image
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: defprops.noticeBar.text
6
+ default: () => uni.$u.props.noticeBar.text
8
7
  },
9
8
  // 通告滚动模式,row-横向滚动,column-竖向滚动
10
9
  direction: {
11
10
  type: String,
12
- default: defprops.noticeBar.direction
11
+ default: () => uni.$u.props.noticeBar.direction
13
12
  },
14
13
  // direction = row时,是否使用步进形式滚动
15
14
  step: {
16
15
  type: Boolean,
17
- default: defprops.noticeBar.step
16
+ default: () => uni.$u.props.noticeBar.step
18
17
  },
19
18
  // 是否显示左侧的音量图标
20
19
  icon: {
21
20
  type: String,
22
- default: defprops.noticeBar.icon
21
+ default: () => uni.$u.props.noticeBar.icon
23
22
  },
24
23
  // 通告模式,link-显示右箭头,closable-显示右侧关闭图标
25
24
  mode: {
26
25
  type: String,
27
- default: defprops.noticeBar.mode
26
+ default: () => uni.$u.props.noticeBar.mode
28
27
  },
29
28
  // 文字颜色,各图标也会使用文字颜色
30
29
  color: {
31
30
  type: String,
32
- default: defprops.noticeBar.color
31
+ default: () => uni.$u.props.noticeBar.color
33
32
  },
34
33
  // 背景颜色
35
34
  bgColor: {
36
35
  type: String,
37
- default: defprops.noticeBar.bgColor
36
+ default: () => uni.$u.props.noticeBar.bgColor
38
37
  },
39
38
  // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
40
39
  speed: {
41
40
  type: [String, Number],
42
- default: defprops.noticeBar.speed
41
+ default: () => uni.$u.props.noticeBar.speed
43
42
  },
44
43
  // 字体大小
45
44
  fontSize: {
46
45
  type: [String, Number],
47
- default: defprops.noticeBar.fontSize
46
+ default: () => uni.$u.props.noticeBar.fontSize
48
47
  },
49
48
  // 滚动一个周期的时间长,单位ms
50
49
  duration: {
51
50
  type: [String, Number],
52
- default: defprops.noticeBar.duration
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: defprops.noticeBar.disableTouch
57
+ default: () => uni.$u.props.noticeBar.disableTouch
59
58
  },
60
59
  // 跳转的页面路径
61
60
  url: {
62
61
  type: String,
63
- default: defprops.noticeBar.url
62
+ default: () => uni.$u.props.noticeBar.url
64
63
  },
65
64
  // 页面跳转的类型
66
65
  linkType: {
67
66
  type: String,
68
- default: defprops.noticeBar.linkType
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: defprops.notify.top
6
+ default: () => uni.$u.props.notify.top
8
7
  },
9
8
  // 是否展示组件
10
9
  // show: {
11
10
  // type: Boolean,
12
- // default: defprops.notify.show
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: defprops.notify.type
16
+ default: () => uni.$u.props.notify.type
18
17
  },
19
18
  // 字体颜色
20
19
  color: {
21
20
  type: String,
22
- default: defprops.notify.color
21
+ default: () => uni.$u.props.notify.color
23
22
  },
24
23
  // 背景颜色
25
24
  bgColor: {
26
25
  type: String,
27
- default: defprops.notify.bgColor
26
+ default: () => uni.$u.props.notify.bgColor
28
27
  },
29
28
  // 展示的文字内容
30
29
  message: {
31
30
  type: String,
32
- default: defprops.notify.message
31
+ default: () => uni.$u.props.notify.message
33
32
  },
34
33
  // 展示时长,为0时不消失,单位ms
35
34
  duration: {
36
35
  type: [String, Number],
37
- default: defprops.notify.duration
36
+ default: () => uni.$u.props.notify.duration
38
37
  },
39
38
  // 字体大小
40
39
  fontSize: {
41
40
  type: [String, Number],
42
- default: defprops.notify.fontSize
41
+ default: () => uni.$u.props.notify.fontSize
43
42
  },
44
43
  // 是否留出顶部安全距离(状态栏高度)
45
44
  safeAreaInsetTop: {
46
45
  type: Boolean,
47
- default: defprops.notify.safeAreaInsetTop
46
+ default: () => uni.$u.props.notify.safeAreaInsetTop
48
47
  }
49
48
  }
50
49
  }
@@ -162,7 +162,12 @@
162
162
  this.timer = null
163
163
  }
164
164
  },
165
+ // #ifdef VUE2
165
166
  beforeDestroy() {
167
+ // #endif
168
+ // #ifdef VUE3
169
+ beforeUnmount() {
170
+ // #endif
166
171
  this.clearTimer()
167
172
  }
168
173
  }