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,123 +1,122 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 搜索框形状,round-圆形,square-方形
5
4
  shape: {
6
5
  type: String,
7
- default: defprops.search.shape
6
+ default: () => uni.$u.props.search.shape
8
7
  },
9
8
  // 搜索框背景色,默认值#f2f2f2
10
9
  bgColor: {
11
10
  type: String,
12
- default: defprops.search.bgColor
11
+ default: () => uni.$u.props.search.bgColor
13
12
  },
14
13
  // 占位提示文字
15
14
  placeholder: {
16
15
  type: String,
17
- default: defprops.search.placeholder
16
+ default: () => uni.$u.props.search.placeholder
18
17
  },
19
18
  // 是否启用清除控件
20
19
  clearabled: {
21
20
  type: Boolean,
22
- default: defprops.search.clearabled
21
+ default: () => uni.$u.props.search.clearabled
23
22
  },
24
23
  // 是否自动聚焦
25
24
  focus: {
26
25
  type: Boolean,
27
- default: defprops.search.focus
26
+ default: () => uni.$u.props.search.focus
28
27
  },
29
28
  // 是否在搜索框右侧显示取消按钮
30
29
  showAction: {
31
30
  type: Boolean,
32
- default: defprops.search.showAction
31
+ default: () => uni.$u.props.search.showAction
33
32
  },
34
33
  // 右边控件的样式
35
34
  actionStyle: {
36
35
  type: Object,
37
- default: defprops.search.actionStyle
36
+ default: () => uni.$u.props.search.actionStyle
38
37
  },
39
38
  // 取消按钮文字
40
39
  actionText: {
41
40
  type: String,
42
- default: defprops.search.actionText
41
+ default: () => uni.$u.props.search.actionText
43
42
  },
44
43
  // 输入框内容对齐方式,可选值为 left|center|right
45
44
  inputAlign: {
46
45
  type: String,
47
- default: defprops.search.inputAlign
46
+ default: () => uni.$u.props.search.inputAlign
48
47
  },
49
48
  // input输入框的样式,可以定义文字颜色,大小等,对象形式
50
49
  inputStyle: {
51
50
  type: Object,
52
- default: defprops.search.inputStyle
51
+ default: () => uni.$u.props.search.inputStyle
53
52
  },
54
53
  // 是否启用输入框
55
54
  disabled: {
56
55
  type: Boolean,
57
- default: defprops.search.disabled
56
+ default: () => uni.$u.props.search.disabled
58
57
  },
59
58
  // 边框颜色
60
59
  borderColor: {
61
60
  type: String,
62
- default: defprops.search.borderColor
61
+ default: () => uni.$u.props.search.borderColor
63
62
  },
64
63
  // 搜索图标的颜色,默认同输入框字体颜色
65
64
  searchIconColor: {
66
65
  type: String,
67
- default: defprops.search.searchIconColor
66
+ default: () => uni.$u.props.search.searchIconColor
68
67
  },
69
68
  // 输入框字体颜色
70
69
  color: {
71
70
  type: String,
72
- default: defprops.search.color
71
+ default: () => uni.$u.props.search.color
73
72
  },
74
73
  // placeholder的颜色
75
74
  placeholderColor: {
76
75
  type: String,
77
- default: defprops.search.placeholderColor
76
+ default: () => uni.$u.props.search.placeholderColor
78
77
  },
79
78
  // 左边输入框的图标,可以为uView图标名称或图片路径
80
79
  searchIcon: {
81
80
  type: String,
82
- default: defprops.search.searchIcon
81
+ default: () => uni.$u.props.search.searchIcon
83
82
  },
84
83
  searchIconSize: {
85
84
  type: [Number, String],
86
- default: defprops.search.searchIconSize
85
+ default: () => uni.$u.props.search.searchIconSize
87
86
  },
88
87
  // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
89
88
  margin: {
90
89
  type: String,
91
- default: defprops.search.margin
90
+ default: () => uni.$u.props.search.margin
92
91
  },
93
92
  // 开启showAction时,是否在input获取焦点时才显示
94
93
  animation: {
95
94
  type: Boolean,
96
- default: defprops.search.animation
95
+ default: () => uni.$u.props.search.animation
97
96
  },
98
97
  // 输入框的初始化内容
99
98
  modelValue: {
100
99
  type: String,
101
- default: defprops.search.value
100
+ default: () => uni.$u.props.search.value
102
101
  },
103
102
  value: {
104
103
  type: String,
105
- default: defprops.search.value
104
+ default: () => uni.$u.props.search.value
106
105
  },
107
106
  // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
108
107
  maxlength: {
109
108
  type: [String, Number],
110
- default: defprops.search.maxlength
109
+ default: () => uni.$u.props.search.maxlength
111
110
  },
112
111
  // 搜索框高度,单位px
113
112
  height: {
114
113
  type: [String, Number],
115
- default: defprops.search.height
114
+ default: () => uni.$u.props.search.height
116
115
  },
117
116
  // 搜索框左侧文本
118
117
  label: {
119
118
  type: [String, Number, null],
120
- default: defprops.search.label
119
+ default: () => uni.$u.props.search.label
121
120
  }
122
121
  }
123
122
  }
@@ -1,60 +1,59 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 是否展示骨架组件
5
4
  loading: {
6
5
  type: Boolean,
7
- default: defprops.skeleton.loading
6
+ default: () => uni.$u.props.skeleton.loading
8
7
  },
9
8
  // 是否开启动画效果
10
9
  animate: {
11
10
  type: Boolean,
12
- default: defprops.skeleton.animate
11
+ default: () => uni.$u.props.skeleton.animate
13
12
  },
14
13
  // 段落占位图行数
15
14
  rows: {
16
15
  type: [String, Number],
17
- default: defprops.skeleton.rows
16
+ default: () => uni.$u.props.skeleton.rows
18
17
  },
19
18
  // 段落占位图的宽度
20
19
  rowsWidth: {
21
20
  type: [String, Number, Array],
22
- default: defprops.skeleton.rowsWidth
21
+ default: () => uni.$u.props.skeleton.rowsWidth
23
22
  },
24
23
  // 段落占位图的高度
25
24
  rowsHeight: {
26
25
  type: [String, Number, Array],
27
- default: defprops.skeleton.rowsHeight
26
+ default: () => uni.$u.props.skeleton.rowsHeight
28
27
  },
29
28
  // 是否展示标题占位图
30
29
  title: {
31
30
  type: Boolean,
32
- default: defprops.skeleton.title
31
+ default: () => uni.$u.props.skeleton.title
33
32
  },
34
33
  // 段落标题的宽度
35
34
  titleWidth: {
36
35
  type: [String, Number],
37
- default: defprops.skeleton.titleWidth
36
+ default: () => uni.$u.props.skeleton.titleWidth
38
37
  },
39
38
  // 段落标题的高度
40
39
  titleHeight: {
41
40
  type: [String, Number],
42
- default: defprops.skeleton.titleHeight
41
+ default: () => uni.$u.props.skeleton.titleHeight
43
42
  },
44
43
  // 是否展示头像占位图
45
44
  avatar: {
46
45
  type: Boolean,
47
- default: defprops.skeleton.avatar
46
+ default: () => uni.$u.props.skeleton.avatar
48
47
  },
49
48
  // 头像占位图大小
50
49
  avatarSize: {
51
50
  type: [String, Number],
52
- default: defprops.skeleton.avatarSize
51
+ default: () => uni.$u.props.skeleton.avatarSize
53
52
  },
54
53
  // 头像占位图的形状,circle-圆形,square-方形
55
54
  avatarShape: {
56
55
  type: String,
57
- default: defprops.skeleton.avatarShape
56
+ default: () => uni.$u.props.skeleton.avatarShape
58
57
  }
59
58
  }
60
59
  }
@@ -1,64 +1,63 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 最小可选值
5
4
  min: {
6
5
  type: [Number, String],
7
- default: defprops.slider.min
6
+ default: () => uni.$u.props.slider.min
8
7
  },
9
8
  // 最大可选值
10
9
  max: {
11
10
  type: [Number, String],
12
- default: defprops.slider.max
11
+ default: () => uni.$u.props.slider.max
13
12
  },
14
13
  // 步长,取值必须大于 0,并且可被(max - min)整除
15
14
  step: {
16
15
  type: [Number, String],
17
- default: defprops.slider.step
16
+ default: () => uni.$u.props.slider.step
18
17
  },
19
18
  // #ifdef VUE3
20
19
  // 当前取值
21
20
  modelValue: {
22
21
  type: [String, Number],
23
- default: defprops.slider.value
22
+ default: () => uni.$u.props.slider.value
24
23
  },
25
24
  // #endif
26
25
  // #ifdef VUE2
27
26
  // 当前取值
28
27
  value: {
29
28
  type: [String, Number],
30
- default: defprops.slider.value
29
+ default: () => uni.$u.props.slider.value
31
30
  },
32
31
  // #endif
33
32
  // 滑块右侧已选择部分的背景色
34
33
  activeColor: {
35
34
  type: String,
36
- default: defprops.slider.activeColor
35
+ default: () => uni.$u.props.slider.activeColor
37
36
  },
38
37
  // 滑块左侧未选择部分的背景色
39
38
  inactiveColor: {
40
39
  type: String,
41
- default: defprops.slider.inactiveColor
40
+ default: () => uni.$u.props.slider.inactiveColor
42
41
  },
43
42
  // 滑块的大小,取值范围为 12 - 28
44
43
  blockSize: {
45
44
  type: [Number, String],
46
- default: defprops.slider.blockSize
45
+ default: () => uni.$u.props.slider.blockSize
47
46
  },
48
47
  // 滑块的颜色
49
48
  blockColor: {
50
49
  type: String,
51
- default: defprops.slider.blockColor
50
+ default: () => uni.$u.props.slider.blockColor
52
51
  },
53
52
  // 禁用状态
54
53
  disabled: {
55
54
  type: Boolean,
56
- default: defprops.slider.disabled
55
+ default: () => uni.$u.props.slider.disabled
57
56
  },
58
57
  // 是否显示当前的选择值
59
58
  showValue: {
60
59
  type: Boolean,
61
- default: defprops.slider.showValue
60
+ default: () => uni.$u.props.slider.showValue
62
61
  }
63
62
  }
64
63
  }
@@ -1,9 +1,8 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  bgColor: {
5
4
  type: String,
6
- default: defprops.statusBar.bgColor
5
+ default: () => uni.$u.props.statusBar.bgColor
7
6
  }
8
7
  }
9
8
  }
@@ -14,7 +14,7 @@
14
14
  /**
15
15
  * StatbusBar 状态栏占位
16
16
  * @description 本组件主要用于状态填充,比如在自定导航栏的时候,它会自动适配一个恰当的状态栏高度。
17
- * @tutorial https://uiadmin.net/uview-plus/components/statusBar.html
17
+ * @tutorial https://uview-plus.jiangruyi.com/components/statusBar.html
18
18
  * @property {String} bgColor 背景色 (默认 'transparent' )
19
19
  * @property {String | Object} customStyle 自定义样式
20
20
  * @example <u-status-bar></u-status-bar>
@@ -1,40 +1,39 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 排列方向
5
4
  direction: {
6
5
  type: String,
7
- default: defprops.steps.direction
6
+ default: () => uni.$u.props.steps.direction
8
7
  },
9
8
  // 设置第几个步骤
10
9
  current: {
11
10
  type: [String, Number],
12
- default: defprops.steps.current
11
+ default: () => uni.$u.props.steps.current
13
12
  },
14
13
  // 激活状态颜色
15
14
  activeColor: {
16
15
  type: String,
17
- default: defprops.steps.activeColor
16
+ default: () => uni.$u.props.steps.activeColor
18
17
  },
19
18
  // 未激活状态颜色
20
19
  inactiveColor: {
21
20
  type: String,
22
- default: defprops.steps.inactiveColor
21
+ default: () => uni.$u.props.steps.inactiveColor
23
22
  },
24
23
  // 激活状态的图标
25
24
  activeIcon: {
26
25
  type: String,
27
- default: defprops.steps.activeIcon
26
+ default: () => uni.$u.props.steps.activeIcon
28
27
  },
29
28
  // 未激活状态图标
30
29
  inactiveIcon: {
31
30
  type: String,
32
- default: defprops.steps.inactiveIcon
31
+ default: () => uni.$u.props.steps.inactiveIcon
33
32
  },
34
33
  // 是否显示点类型
35
34
  dot: {
36
35
  type: Boolean,
37
- default: defprops.steps.dot
36
+ default: () => uni.$u.props.steps.dot
38
37
  }
39
38
  }
40
39
  }
@@ -14,7 +14,7 @@
14
14
  /**
15
15
  * Steps 步骤条
16
16
  * @description 该组件一般用于完成一个任务要分几个步骤,标识目前处于第几步的场景。
17
- * @tutorial https://uiadmin.net/uview-plus/components/steps.html
17
+ * @tutorial https://uview-plus.jiangruyi.com/components/steps.html
18
18
  * @property {String} direction row-横向,column-竖向 (默认 'row' )
19
19
  * @property {String | Number} current 设置当前处于第几步 (默认 0 )
20
20
  * @property {String} activeColor 激活状态颜色 (默认 '#3c9cff' )
@@ -1,25 +1,24 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 标题
5
4
  title: {
6
5
  type: [String, Number],
7
- default: defprops.stepsItem.title
6
+ default: () => uni.$u.props.stepsItem.title
8
7
  },
9
8
  // 描述文本
10
9
  desc: {
11
10
  type: [String, Number],
12
- default: defprops.stepsItem.desc
11
+ default: () => uni.$u.props.stepsItem.desc
13
12
  },
14
13
  // 图标大小
15
14
  iconSize: {
16
15
  type: [String, Number],
17
- default: defprops.stepsItem.iconSize
16
+ default: () => uni.$u.props.stepsItem.iconSize
18
17
  },
19
18
  // 当前步骤是否处于失败状态
20
19
  error: {
21
20
  type: Boolean,
22
- default: defprops.stepsItem.error
21
+ default: () => uni.$u.props.stepsItem.error
23
22
  }
24
23
  }
25
24
  }
@@ -56,7 +56,7 @@
56
56
  /**
57
57
  * StepsItem 步骤条的子组件
58
58
  * @description 本组件需要和u-steps配合使用
59
- * @tutorial https://uiadmin.net/uview-plus/components/steps.html
59
+ * @tutorial https://uview-plus.jiangruyi.com/components/steps.html
60
60
  * @property {String} title 标题文字
61
61
  * @property {String} current 描述文本
62
62
  * @property {String | Number} iconSize 图标大小 (默认 17 )
@@ -1,10 +1,9 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
5
4
  offsetTop: {
6
5
  type: [String, Number],
7
- default: defprops.sticky.offsetTop
6
+ default: () => uni.$u.props.sticky.offsetTop
8
7
  },
9
8
  // 自定义导航栏的高度
10
9
  customNavHeight: {
@@ -14,28 +13,28 @@ export default {
14
13
  default: 44,
15
14
  // #endif
16
15
  // #ifndef H5
17
- default: defprops.sticky.customNavHeight
16
+ default: () => uni.$u.props.sticky.customNavHeight
18
17
  // #endif
19
18
  },
20
19
  // 是否开启吸顶功能
21
20
  disabled: {
22
21
  type: Boolean,
23
- default: defprops.sticky.disabled
22
+ default: () => uni.$u.props.sticky.disabled
24
23
  },
25
24
  // 吸顶区域的背景颜色
26
25
  bgColor: {
27
26
  type: String,
28
- default: defprops.sticky.bgColor
27
+ default: () => uni.$u.props.sticky.bgColor
29
28
  },
30
29
  // z-index值
31
30
  zIndex: {
32
31
  type: [String, Number],
33
- default: defprops.sticky.zIndex
32
+ default: () => uni.$u.props.sticky.zIndex
34
33
  },
35
34
  // 列表中的索引值
36
35
  index: {
37
36
  type: [String, Number],
38
- default: defprops.sticky.index
37
+ default: () => uni.$u.props.sticky.index
39
38
  }
40
39
  }
41
40
  }
@@ -198,7 +198,12 @@
198
198
  // #endif
199
199
  }
200
200
  },
201
+ // #ifdef VUE2
201
202
  beforeDestroy() {
203
+ // #endif
204
+ // #ifdef VUE3
205
+ beforeUnmount() {
206
+ // #endif
202
207
  this.disconnectObserver('contentObserver')
203
208
  }
204
209
  }
@@ -1,50 +1,49 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // tab的数据
5
4
  list: {
6
5
  type: Array,
7
- default: defprops.subsection.list
6
+ default: () => uni.$u.props.subsection.list
8
7
  },
9
8
  // 当前活动的tab的index
10
9
  current: {
11
10
  type: [String, Number],
12
- default: defprops.subsection.current
11
+ default: () => uni.$u.props.subsection.current
13
12
  },
14
13
  // 激活的颜色
15
14
  activeColor: {
16
15
  type: String,
17
- default: defprops.subsection.activeColor
16
+ default: () => uni.$u.props.subsection.activeColor
18
17
  },
19
18
  // 未激活的颜色
20
19
  inactiveColor: {
21
20
  type: String,
22
- default: defprops.subsection.inactiveColor
21
+ default: () => uni.$u.props.subsection.inactiveColor
23
22
  },
24
23
  // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
25
24
  mode: {
26
25
  type: String,
27
- default: defprops.subsection.mode
26
+ default: () => uni.$u.props.subsection.mode
28
27
  },
29
28
  // 字体大小
30
29
  fontSize: {
31
30
  type: [String, Number],
32
- default: defprops.subsection.fontSize
31
+ default: () => uni.$u.props.subsection.fontSize
33
32
  },
34
33
  // 激活tab的字体是否加粗
35
34
  bold: {
36
35
  type: Boolean,
37
- default: defprops.subsection.bold
36
+ default: () => uni.$u.props.subsection.bold
38
37
  },
39
38
  // mode = button时,组件背景颜色
40
39
  bgColor: {
41
40
  type: String,
42
- default: defprops.subsection.bgColor
41
+ default: () => uni.$u.props.subsection.bgColor
43
42
  },
44
43
  // 从list元素对象中读取的键名
45
44
  keyName: {
46
45
  type: String,
47
- default: defprops.subsection.keyName
46
+ default: () => uni.$u.props.subsection.keyName
48
47
  }
49
48
  }
50
49
  }
@@ -6,7 +6,7 @@
6
6
  :style="[$u.addStyle(customStyle), wrapperStyle]"
7
7
  >
8
8
  <view
9
- class="u-subsection__bar"
9
+ class="u-subsection__bar cursor-pointer"
10
10
  ref="u-subsection__bar"
11
11
  :style="[barStyle]"
12
12
  :class="[
@@ -24,7 +24,7 @@
24
24
  ]"
25
25
  ></view>
26
26
  <view
27
- class="u-subsection__item"
27
+ class="u-subsection__item cursor-pointer"
28
28
  :class="[
29
29
  `u-subsection__item--${index}`,
30
30
  index < list.length - 1 &&
@@ -1,10 +1,9 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 是否自动关闭其他swipe按钮组
5
4
  autoClose: {
6
5
  type: Boolean,
7
- default: defprops.swipeAction.autoClose
6
+ default: () => uni.$u.props.swipeAction.autoClose
8
7
  }
9
8
  }
10
9
  }
@@ -167,7 +167,12 @@ export default {
167
167
  getContentRef() {
168
168
  return this.$refs['u-swipe-action-item__content'].ref
169
169
  },
170
+ // #ifdef VUE2
170
171
  beforeDestroy() {
172
+ // #endif
173
+ // #ifdef VUE3
174
+ beforeUnmount() {
175
+ // #endif
171
176
  this.unbindBindingX()
172
177
  }
173
178
  }
@@ -1,30 +1,29 @@
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: defprops.swipeActionItem.show
6
+ default: () => uni.$u.props.swipeActionItem.show
8
7
  },
9
8
  // 标识符,如果是v-for,可用index索引值
10
9
  name: {
11
10
  type: [String, Number],
12
- default: defprops.swipeActionItem.name
11
+ default: () => uni.$u.props.swipeActionItem.name
13
12
  },
14
13
  // 是否禁用
15
14
  disabled: {
16
15
  type: Boolean,
17
- default: defprops.swipeActionItem.disabled
16
+ default: () => uni.$u.props.swipeActionItem.disabled
18
17
  },
19
18
  // 是否自动关闭其他swipe按钮组
20
19
  autoClose: {
21
20
  type: Boolean,
22
- default: defprops.swipeActionItem.autoClose
21
+ default: () => uni.$u.props.swipeActionItem.autoClose
23
22
  },
24
23
  // 滑动距离阈值,只有大于此值,才被认为是要打开菜单
25
24
  threshold: {
26
25
  type: Number,
27
- default: defprops.swipeActionItem.threshold
26
+ default: () => uni.$u.props.swipeActionItem.threshold
28
27
  },
29
28
  // 右侧按钮内容
30
29
  options: {
@@ -36,7 +35,7 @@ export default {
36
35
  // 动画过渡时间,单位ms
37
36
  duration: {
38
37
  type: [String, Number],
39
- default: defprops.swipeActionItem.duration
38
+ default: () => uni.$u.props.swipeActionItem.duration
40
39
  }
41
40
  }
42
41
  }