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
@@ -0,0 +1,199 @@
1
+ <template>
2
+ <view class="u-qrcode">
3
+ <canvas class="u-qrcode__canvas" :canvas-id="cid" :style="{ width: size + unit, height: size + unit }" />
4
+ <image v-show="show" :src="result" :style="{ width: size + unit, height: size + unit }" />
5
+ </view>
6
+ </template>
7
+
8
+ <script>
9
+ import QRCode from "./qrcode.js"
10
+ let qrcode
11
+ export default {
12
+ name: "u-qrcode",
13
+ props: {
14
+ cid: {
15
+ type: String,
16
+ default: 'u-qrcode-canvas' + Math.random().toString()
17
+ },
18
+ size: {
19
+ type: Number,
20
+ default: 200
21
+ },
22
+ unit: {
23
+ type: String,
24
+ default: 'px'
25
+ },
26
+ show: {
27
+ type: Boolean,
28
+ default: true
29
+ },
30
+ val: {
31
+ type: String,
32
+ default: ''
33
+ },
34
+ background: {
35
+ type: String,
36
+ default: '#ffffff'
37
+ },
38
+ foreground: {
39
+ type: String,
40
+ default: '#000000'
41
+ },
42
+ pdground: {
43
+ type: String,
44
+ default: '#000000'
45
+ },
46
+ icon: {
47
+ type: String,
48
+ default: ''
49
+ },
50
+ iconSize: {
51
+ type: Number,
52
+ default: 40
53
+ },
54
+ lv: {
55
+ type: Number,
56
+ default: 3
57
+ },
58
+ onval: {
59
+ type: Boolean,
60
+ default: true
61
+ },
62
+ loadMake: {
63
+ type: Boolean,
64
+ default: true
65
+ },
66
+ usingComponents: {
67
+ type: Boolean,
68
+ default: true
69
+ },
70
+ showLoading: {
71
+ type: Boolean,
72
+ default: true
73
+ },
74
+ loadingText: {
75
+ type: String,
76
+ default: '二维码生成中'
77
+ },
78
+ },
79
+ data() {
80
+ return {
81
+ result: '',
82
+ }
83
+ },
84
+ methods: {
85
+ _makeCode() {
86
+ let that = this
87
+ if (!this._empty(this.val)) {
88
+ qrcode = new QRCode({
89
+ context: that, // 上下文环境
90
+ canvasId: that.cid, // canvas-id
91
+ usingComponents: that.usingComponents, // 是否是自定义组件
92
+ showLoading: that.showLoading, // 是否显示loading
93
+ loadingText: that.loadingText, // loading文字
94
+ text: that.val, // 生成内容
95
+ size: that.size, // 二维码大小
96
+ background: that.background, // 背景色
97
+ foreground: that.foreground, // 前景色
98
+ pdground: that.pdground, // 定位角点颜色
99
+ correctLevel: that.lv, // 容错级别
100
+ image: that.icon, // 二维码图标
101
+ imageSize: that.iconSize,// 二维码图标大小
102
+ cbResult: function (res) { // 生成二维码的回调
103
+ that._result(res)
104
+ },
105
+ });
106
+ } else {
107
+ uni.showToast({
108
+ title: '二维码内容不能为空',
109
+ icon: 'none',
110
+ duration: 2000
111
+ });
112
+ }
113
+ },
114
+ _clearCode() {
115
+ this._result('')
116
+ qrcode.clear()
117
+ },
118
+ _saveCode() {
119
+ let that = this;
120
+ if (this.result != "") {
121
+ uni.saveImageToPhotosAlbum({
122
+ filePath: that.result,
123
+ success: function () {
124
+ uni.showToast({
125
+ title: '二维码保存成功',
126
+ icon: 'success',
127
+ duration: 2000
128
+ });
129
+ }
130
+ });
131
+ }
132
+ },
133
+ _result(res) {
134
+ this.result = res;
135
+ this.$emit('result', res)
136
+ },
137
+ _empty(v) {
138
+ let tp = typeof v,
139
+ rt = false;
140
+ if (tp == "number" && String(v) == "") {
141
+ rt = true
142
+ } else if (tp == "undefined") {
143
+ rt = true
144
+ } else if (tp == "object") {
145
+ if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
146
+ } else if (tp == "string") {
147
+ if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
148
+ } else if (tp == "function") {
149
+ rt = false
150
+ }
151
+ return rt
152
+ }
153
+ },
154
+ watch: {
155
+ size: function (n, o) {
156
+ if (n != o && !this._empty(n)) {
157
+ this.cSize = n
158
+ if (!this._empty(this.val)) {
159
+ setTimeout(() => {
160
+ this._makeCode()
161
+ }, 100);
162
+ }
163
+ }
164
+ },
165
+ val: function (n, o) {
166
+ if (this.onval) {
167
+ if (n != o && !this._empty(n)) {
168
+ setTimeout(() => {
169
+ this._makeCode()
170
+ }, 0);
171
+ }
172
+ }
173
+ }
174
+ },
175
+ computed: {
176
+ },
177
+ mounted: function () {
178
+ if (this.loadMake) {
179
+ if (!this._empty(this.val)) {
180
+ setTimeout(() => {
181
+ this._makeCode()
182
+ }, 0);
183
+ }
184
+ }
185
+ },
186
+ }
187
+ </script>
188
+ <style lang="scss" scoped>
189
+ .u-qrcode {
190
+ position: relative;
191
+
192
+ &__canvas {
193
+ position: fixed;
194
+ top: -99999rpx;
195
+ left: -99999rpx;
196
+ z-index: -99999;
197
+ }
198
+ }
199
+ </style>
@@ -1,70 +1,69 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // radio的名称
5
4
  name: {
6
5
  type: [String, Number, Boolean],
7
- default: defprops.radio.name
6
+ default: () => uni.$u.props.radio.name
8
7
  },
9
8
  // 形状,square为方形,circle为圆型
10
9
  shape: {
11
10
  type: String,
12
- default: defprops.radio.shape
11
+ default: () => uni.$u.props.radio.shape
13
12
  },
14
13
  // 是否禁用
15
14
  disabled: {
16
15
  type: [String, Boolean],
17
- default: defprops.radio.disabled
16
+ default: () => uni.$u.props.radio.disabled
18
17
  },
19
18
  // 是否禁止点击提示语选中单选框
20
19
  labelDisabled: {
21
20
  type: [String, Boolean],
22
- default: defprops.radio.labelDisabled
21
+ default: () => uni.$u.props.radio.labelDisabled
23
22
  },
24
23
  // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
25
24
  activeColor: {
26
25
  type: String,
27
- default: defprops.radio.activeColor
26
+ default: () => uni.$u.props.radio.activeColor
28
27
  },
29
28
  // 未选中的颜色
30
29
  inactiveColor: {
31
30
  type: String,
32
- default: defprops.radio.inactiveColor
31
+ default: () => uni.$u.props.radio.inactiveColor
33
32
  },
34
33
  // 图标的大小,单位px
35
34
  iconSize: {
36
35
  type: [String, Number],
37
- default: defprops.radio.iconSize
36
+ default: () => uni.$u.props.radio.iconSize
38
37
  },
39
38
  // label的字体大小,px单位
40
39
  labelSize: {
41
40
  type: [String, Number],
42
- default: defprops.radio.labelSize
41
+ default: () => uni.$u.props.radio.labelSize
43
42
  },
44
43
  // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
45
44
  label: {
46
45
  type: [String, Number],
47
- default: defprops.radio.label
46
+ default: () => uni.$u.props.radio.label
48
47
  },
49
48
  // 整体的大小
50
49
  size: {
51
50
  type: [String, Number],
52
- default: defprops.radio.size
51
+ default: () => uni.$u.props.radio.size
53
52
  },
54
53
  // 图标颜色
55
54
  color: {
56
55
  type: String,
57
- default: defprops.radio.color
56
+ default: () => uni.$u.props.radio.color
58
57
  },
59
58
  // label的颜色
60
59
  labelColor: {
61
60
  type: String,
62
- default: defprops.radio.labelColor
61
+ default: () => uni.$u.props.radio.labelColor
63
62
  },
64
63
  // 图标颜色
65
64
  iconColor: {
66
65
  type: String,
67
- default: defprops.radio.iconColor
66
+ default: () => uni.$u.props.radio.iconColor
68
67
  }
69
68
  }
70
69
  }
@@ -1,94 +1,93 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // #ifdef VUE3
5
4
  // 绑定的值
6
5
  modelValue: {
7
6
  type: [String, Number, Boolean],
8
- default: defprops.radioGroup.value
7
+ default: () => uni.$u.props.radioGroup.value
9
8
  },
10
9
  // #endif
11
10
  // #ifdef VUE2
12
11
  // 绑定的值
13
12
  value: {
14
13
  type: [String, Number, Boolean],
15
- default: defprops.radioGroup.value
14
+ default: () => uni.$u.props.radioGroup.value
16
15
  },
17
16
  // #endif
18
17
  // 是否禁用全部radio
19
18
  disabled: {
20
19
  type: Boolean,
21
- default: defprops.radioGroup.disabled
20
+ default: () => uni.$u.props.radioGroup.disabled
22
21
  },
23
22
  // 形状,circle-圆形,square-方形
24
23
  shape: {
25
24
  type: String,
26
- default: defprops.radioGroup.shape
25
+ default: () => uni.$u.props.radioGroup.shape
27
26
  },
28
27
  // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
29
28
  activeColor: {
30
29
  type: String,
31
- default: defprops.radioGroup.activeColor
30
+ default: () => uni.$u.props.radioGroup.activeColor
32
31
  },
33
32
  // 未选中的颜色
34
33
  inactiveColor: {
35
34
  type: String,
36
- default: defprops.radioGroup.inactiveColor
35
+ default: () => uni.$u.props.radioGroup.inactiveColor
37
36
  },
38
37
  // 标识符
39
38
  name: {
40
39
  type: String,
41
- default: defprops.radioGroup.name
40
+ default: () => uni.$u.props.radioGroup.name
42
41
  },
43
42
  // 整个组件的尺寸,默认px
44
43
  size: {
45
44
  type: [String, Number],
46
- default: defprops.radioGroup.size
45
+ default: () => uni.$u.props.radioGroup.size
47
46
  },
48
47
  // 布局方式,row-横向,column-纵向
49
48
  placement: {
50
49
  type: String,
51
- default: defprops.radioGroup.placement
50
+ default: () => uni.$u.props.radioGroup.placement
52
51
  },
53
52
  // label的文本
54
53
  label: {
55
54
  type: [String],
56
- default: defprops.radioGroup.label
55
+ default: () => uni.$u.props.radioGroup.label
57
56
  },
58
57
  // label的颜色 (默认 '#303133' )
59
58
  labelColor: {
60
59
  type: [String],
61
- default: defprops.radioGroup.labelColor
60
+ default: () => uni.$u.props.radioGroup.labelColor
62
61
  },
63
62
  // label的字体大小,px单位
64
63
  labelSize: {
65
64
  type: [String, Number],
66
- default: defprops.radioGroup.labelSize
65
+ default: () => uni.$u.props.radioGroup.labelSize
67
66
  },
68
67
  // 是否禁止点击文本操作checkbox(默认 false )
69
68
  labelDisabled: {
70
69
  type: Boolean,
71
- default: defprops.radioGroup.labelDisabled
70
+ default: () => uni.$u.props.radioGroup.labelDisabled
72
71
  },
73
72
  // 图标颜色
74
73
  iconColor: {
75
74
  type: String,
76
- default: defprops.radioGroup.iconColor
75
+ default: () => uni.$u.props.radioGroup.iconColor
77
76
  },
78
77
  // 图标的大小,单位px
79
78
  iconSize: {
80
79
  type: [String, Number],
81
- default: defprops.radioGroup.iconSize
80
+ default: () => uni.$u.props.radioGroup.iconSize
82
81
  },
83
82
  // 竖向配列时,是否显示下划线
84
83
  borderBottom: {
85
84
  type: Boolean,
86
- default: defprops.radioGroup.borderBottom
85
+ default: () => uni.$u.props.radioGroup.borderBottom
87
86
  },
88
87
  // 图标与文字的对齐方式
89
88
  iconPlacement: {
90
89
  type: String,
91
- default: defprops.radio.iconPlacement
90
+ default: () => uni.$u.props.radio.iconPlacement
92
91
  }
93
92
  }
94
93
  }
@@ -1,79 +1,78 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // #ifdef VUE3
5
4
  // 用于v-model双向绑定选中的星星数量
6
5
  modelValue: {
7
6
  type: [String, Number],
8
- default: defprops.rate.value
7
+ default: () => uni.$u.props.rate.value
9
8
  },
10
9
  // #endif
11
10
  // #ifdef VUE2
12
11
  // 用于v-model双向绑定选中的星星数量
13
12
  value: {
14
13
  type: [String, Number],
15
- default: defprops.rate.value
14
+ default: () => uni.$u.props.rate.value
16
15
  },
17
16
  // #endif
18
17
  // 要显示的星星数量
19
18
  count: {
20
19
  type: [String, Number],
21
- default: defprops.rate.count
20
+ default: () => uni.$u.props.rate.count
22
21
  },
23
22
  // 是否不可选中
24
23
  disabled: {
25
24
  type: Boolean,
26
- default: defprops.rate.disabled
25
+ default: () => uni.$u.props.rate.disabled
27
26
  },
28
27
  // 是否只读
29
28
  readonly: {
30
29
  type: Boolean,
31
- default: defprops.rate.readonly
30
+ default: () => uni.$u.props.rate.readonly
32
31
  },
33
32
  // 星星的大小,单位px
34
33
  size: {
35
34
  type: [String, Number],
36
- default: defprops.rate.size
35
+ default: () => uni.$u.props.rate.size
37
36
  },
38
37
  // 未选中时的颜色
39
38
  inactiveColor: {
40
39
  type: String,
41
- default: defprops.rate.inactiveColor
40
+ default: () => uni.$u.props.rate.inactiveColor
42
41
  },
43
42
  // 选中的颜色
44
43
  activeColor: {
45
44
  type: String,
46
- default: defprops.rate.activeColor
45
+ default: () => uni.$u.props.rate.activeColor
47
46
  },
48
47
  // 星星之间的间距,单位px
49
48
  gutter: {
50
49
  type: [String, Number],
51
- default: defprops.rate.gutter
50
+ default: () => uni.$u.props.rate.gutter
52
51
  },
53
52
  // 最少能选择的星星个数
54
53
  minCount: {
55
54
  type: [String, Number],
56
- default: defprops.rate.minCount
55
+ default: () => uni.$u.props.rate.minCount
57
56
  },
58
57
  // 是否允许半星
59
58
  allowHalf: {
60
59
  type: Boolean,
61
- default: defprops.rate.allowHalf
60
+ default: () => uni.$u.props.rate.allowHalf
62
61
  },
63
62
  // 选中时的图标(星星)
64
63
  activeIcon: {
65
64
  type: String,
66
- default: defprops.rate.activeIcon
65
+ default: () => uni.$u.props.rate.activeIcon
67
66
  },
68
67
  // 未选中时的图标(星星)
69
68
  inactiveIcon: {
70
69
  type: String,
71
- default: defprops.rate.inactiveIcon
70
+ default: () => uni.$u.props.rate.inactiveIcon
72
71
  },
73
72
  // 是否可以通过滑动手势选择评分
74
73
  touchable: {
75
74
  type: Boolean,
76
- default: defprops.rate.touchable
75
+ default: () => uni.$u.props.rate.touchable
77
76
  }
78
77
  }
79
78
  }
@@ -1,35 +1,34 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 默认的显示占位高度
5
4
  showHeight: {
6
5
  type: [String, Number],
7
- default: defprops.readMore.showHeight
6
+ default: () => uni.$u.props.readMore.showHeight
8
7
  },
9
8
  // 展开后是否显示"收起"按钮
10
9
  toggle: {
11
10
  type: Boolean,
12
- default: defprops.readMore.toggle
11
+ default: () => uni.$u.props.readMore.toggle
13
12
  },
14
13
  // 关闭时的提示文字
15
14
  closeText: {
16
15
  type: String,
17
- default: defprops.readMore.closeText
16
+ default: () => uni.$u.props.readMore.closeText
18
17
  },
19
18
  // 展开时的提示文字
20
19
  openText: {
21
20
  type: String,
22
- default: defprops.readMore.openText
21
+ default: () => uni.$u.props.readMore.openText
23
22
  },
24
23
  // 提示的文字颜色
25
24
  color: {
26
25
  type: String,
27
- default: defprops.readMore.color
26
+ default: () => uni.$u.props.readMore.color
28
27
  },
29
28
  // 提示文字的大小
30
29
  fontSize: {
31
30
  type: [String, Number],
32
- default: defprops.readMore.fontSize
31
+ default: () => uni.$u.props.readMore.fontSize
33
32
  },
34
33
  // 是否显示阴影
35
34
  // 此参数不能写在props/readMore.js中进行默认配置,因为使用了条件编译,在外部js中
@@ -51,12 +50,12 @@ export default {
51
50
  // 段落首行缩进的字符个数
52
51
  textIndent: {
53
52
  type: String,
54
- default: defprops.readMore.textIndent
53
+ default: () => uni.$u.props.readMore.textIndent
55
54
  },
56
55
  // open和close事件时,将此参数返回在回调参数中
57
56
  name: {
58
57
  type: [String, Number],
59
- default: defprops.readMore.name
58
+ default: () => uni.$u.props.readMore.name
60
59
  }
61
60
  }
62
61
  }
@@ -1,20 +1,19 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 给col添加间距,左右边距各占一半
5
4
  gutter: {
6
5
  type: [String, Number],
7
- default: defprops.row.gutter
6
+ default: () => uni.$u.props.row.gutter
8
7
  },
9
8
  // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`)
10
9
  justify: {
11
10
  type: String,
12
- default: defprops.row.justify
11
+ default: () => uni.$u.props.row.justify
13
12
  },
14
13
  // 垂直对齐方式,可选值为top、center、bottom
15
14
  align: {
16
15
  type: String,
17
- default: defprops.row.align
16
+ default: () => uni.$u.props.row.align
18
17
  }
19
18
  }
20
19
  }
@@ -1,40 +1,39 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 显示的内容,字符串
5
4
  text: {
6
5
  type: String,
7
- default: defprops.rowNotice.text
6
+ default: () => uni.$u.props.rowNotice.text
8
7
  },
9
8
  // 是否显示左侧的音量图标
10
9
  icon: {
11
10
  type: String,
12
- default: defprops.rowNotice.icon
11
+ default: () => uni.$u.props.rowNotice.icon
13
12
  },
14
13
  // 通告模式,link-显示右箭头,closable-显示右侧关闭图标
15
14
  mode: {
16
15
  type: String,
17
- default: defprops.rowNotice.mode
16
+ default: () => uni.$u.props.rowNotice.mode
18
17
  },
19
18
  // 文字颜色,各图标也会使用文字颜色
20
19
  color: {
21
20
  type: String,
22
- default: defprops.rowNotice.color
21
+ default: () => uni.$u.props.rowNotice.color
23
22
  },
24
23
  // 背景颜色
25
24
  bgColor: {
26
25
  type: String,
27
- default: defprops.rowNotice.bgColor
26
+ default: () => uni.$u.props.rowNotice.bgColor
28
27
  },
29
28
  // 字体大小,单位px
30
29
  fontSize: {
31
30
  type: [String, Number],
32
- default: defprops.rowNotice.fontSize
31
+ default: () => uni.$u.props.rowNotice.fontSize
33
32
  },
34
33
  // 水平滚动时的滚动速度,即每秒滚动多少px(rpx),这有利于控制文字无论多少时,都能有一个恒定的速度
35
34
  speed: {
36
35
  type: [String, Number],
37
- default: defprops.rowNotice.speed
36
+ default: () => uni.$u.props.rowNotice.speed
38
37
  }
39
38
  }
40
39
  }
@@ -273,7 +273,12 @@
273
273
  }
274
274
  },
275
275
  // #ifdef APP-NVUE
276
+ // #ifdef VUE2
276
277
  beforeDestroy() {
278
+ // #endif
279
+ // #ifdef VUE3
280
+ beforeUnmount() {
281
+ // #endif
277
282
  this.stopAnimation = true
278
283
  },
279
284
  // #endif
@@ -1,4 +1,3 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
 
@@ -1,35 +1,34 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 指示器的整体宽度
5
4
  indicatorWidth: {
6
5
  type: [String, Number],
7
- default: defprops.scrollList.indicatorWidth
6
+ default: () => uni.$u.props.scrollList.indicatorWidth
8
7
  },
9
8
  // 滑块的宽度
10
9
  indicatorBarWidth: {
11
10
  type: [String, Number],
12
- default: defprops.scrollList.indicatorBarWidth
11
+ default: () => uni.$u.props.scrollList.indicatorBarWidth
13
12
  },
14
13
  // 是否显示面板指示器
15
14
  indicator: {
16
15
  type: Boolean,
17
- default: defprops.scrollList.indicator
16
+ default: () => uni.$u.props.scrollList.indicator
18
17
  },
19
18
  // 指示器非激活颜色
20
19
  indicatorColor: {
21
20
  type: String,
22
- default: defprops.scrollList.indicatorColor
21
+ default: () => uni.$u.props.scrollList.indicatorColor
23
22
  },
24
23
  // 指示器的激活颜色
25
24
  indicatorActiveColor: {
26
25
  type: String,
27
- default: defprops.scrollList.indicatorActiveColor
26
+ default: () => uni.$u.props.scrollList.indicatorActiveColor
28
27
  },
29
28
  // 指示器样式,可通过bottom,left,right进行定位
30
29
  indicatorStyle: {
31
30
  type: [String, Object],
32
- default: defprops.scrollList.indicatorStyle
31
+ default: () => uni.$u.props.scrollList.indicatorStyle
33
32
  }
34
33
  }
35
34
  }