uview-plus 3.2.23 → 3.3.0

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 (212) hide show
  1. package/changelog.md +27 -0
  2. package/components/u--form/u--form.vue +3 -3
  3. package/components/u--image/u--image.vue +3 -3
  4. package/components/u--input/u--input.vue +3 -3
  5. package/components/u--text/u--text.vue +4 -4
  6. package/components/u--textarea/u--textarea.vue +3 -3
  7. package/components/u-action-sheet/props.js +5 -3
  8. package/components/u-action-sheet/u-action-sheet.vue +6 -6
  9. package/components/u-album/props.js +4 -3
  10. package/components/u-album/u-album.vue +3 -3
  11. package/components/u-alert/props.js +4 -3
  12. package/components/u-alert/u-alert.vue +3 -3
  13. package/components/u-avatar/props.js +4 -3
  14. package/components/u-avatar/u-avatar.vue +3 -3
  15. package/components/u-avatar-group/props.js +4 -3
  16. package/components/u-avatar-group/u-avatar-group.vue +3 -3
  17. package/components/u-back-top/props.js +4 -3
  18. package/components/u-back-top/u-back-top.vue +3 -3
  19. package/components/u-badge/props.js +4 -3
  20. package/components/u-badge/u-badge.vue +3 -3
  21. package/components/u-button/props.js +4 -3
  22. package/components/u-button/u-button.vue +5 -5
  23. package/components/u-calendar/header.vue +2 -2
  24. package/components/u-calendar/month.vue +2 -2
  25. package/components/u-calendar/props.js +5 -3
  26. package/components/u-calendar/u-calendar.vue +3 -3
  27. package/components/u-car-keyboard/props.js +5 -3
  28. package/components/u-car-keyboard/u-car-keyboard.vue +3 -3
  29. package/components/u-cell/props.js +4 -3
  30. package/components/u-cell/u-cell.vue +5 -3
  31. package/components/u-cell-group/props.js +4 -3
  32. package/components/u-cell-group/u-cell-group.vue +3 -3
  33. package/components/u-checkbox/props.js +4 -3
  34. package/components/u-checkbox/u-checkbox.vue +13 -11
  35. package/components/u-checkbox-group/props.js +5 -4
  36. package/components/u-checkbox-group/u-checkbox-group.vue +3 -3
  37. package/components/u-circle-progress/props.js +4 -3
  38. package/components/u-circle-progress/u-circle-progress.vue +3 -3
  39. package/components/u-code/props.js +4 -3
  40. package/components/u-code/u-code.vue +3 -3
  41. package/components/u-code-input/props.js +4 -3
  42. package/components/u-code-input/u-code-input.vue +3 -3
  43. package/components/u-col/props.js +4 -3
  44. package/components/u-col/u-col.vue +3 -3
  45. package/components/u-collapse/props.js +4 -3
  46. package/components/u-collapse/u-collapse.vue +3 -3
  47. package/components/u-collapse-item/props.js +4 -3
  48. package/components/u-collapse-item/u-collapse-item.vue +3 -3
  49. package/components/u-column-notice/props.js +4 -3
  50. package/components/u-column-notice/u-column-notice.vue +3 -3
  51. package/components/u-count-down/props.js +4 -3
  52. package/components/u-count-down/u-count-down.vue +3 -3
  53. package/components/u-count-to/props.js +4 -3
  54. package/components/u-count-to/u-count-to.vue +3 -3
  55. package/components/u-datetime-picker/props.js +4 -3
  56. package/components/u-datetime-picker/u-datetime-picker.vue +9 -10
  57. package/components/u-divider/props.js +4 -3
  58. package/components/u-divider/u-divider.vue +3 -3
  59. package/components/u-dropdown/props.js +4 -3
  60. package/components/u-dropdown/u-dropdown.vue +3 -3
  61. package/components/u-dropdown-item/props.js +4 -3
  62. package/components/u-dropdown-item/u-dropdown-item.vue +3 -3
  63. package/components/u-empty/props.js +4 -3
  64. package/components/u-empty/u-empty.vue +3 -3
  65. package/components/u-form/props.js +4 -3
  66. package/components/u-form/u-form.vue +3 -3
  67. package/components/u-form-item/props.js +4 -3
  68. package/components/u-form-item/u-form-item.vue +4 -4
  69. package/components/u-gap/props.js +4 -3
  70. package/components/u-gap/u-gap.vue +3 -3
  71. package/components/u-grid/props.js +4 -3
  72. package/components/u-grid/u-grid.vue +3 -3
  73. package/components/u-grid-item/props.js +4 -3
  74. package/components/u-grid-item/u-grid-item.vue +3 -3
  75. package/components/u-icon/props.js +4 -3
  76. package/components/u-icon/u-icon.vue +3 -3
  77. package/components/u-image/props.js +4 -3
  78. package/components/u-image/u-image.vue +3 -3
  79. package/components/u-index-anchor/props.js +4 -3
  80. package/components/u-index-anchor/u-index-anchor.vue +3 -3
  81. package/components/u-index-item/props.js +5 -3
  82. package/components/u-index-item/u-index-item.vue +3 -3
  83. package/components/u-index-list/props.js +4 -3
  84. package/components/u-index-list/u-index-list.vue +3 -3
  85. package/components/u-input/props.js +5 -3
  86. package/components/u-input/u-input.vue +35 -50
  87. package/components/u-keyboard/props.js +4 -3
  88. package/components/u-keyboard/u-keyboard.vue +3 -3
  89. package/components/u-line/props.js +4 -3
  90. package/components/u-line/u-line.vue +3 -3
  91. package/components/u-line-progress/props.js +4 -3
  92. package/components/u-line-progress/u-line-progress.vue +3 -3
  93. package/components/u-link/props.js +4 -3
  94. package/components/u-link/u-link.vue +3 -3
  95. package/components/u-list/props.js +5 -4
  96. package/components/u-list/u-list.vue +3 -3
  97. package/components/u-list-item/props.js +4 -3
  98. package/components/u-list-item/u-list-item.vue +3 -3
  99. package/components/u-loading-icon/props.js +4 -3
  100. package/components/u-loading-icon/u-loading-icon.vue +3 -3
  101. package/components/u-loading-page/props.js +5 -3
  102. package/components/u-loading-page/u-loading-page.vue +3 -3
  103. package/components/u-loadmore/props.js +4 -3
  104. package/components/u-loadmore/u-loadmore.vue +3 -3
  105. package/components/u-modal/props.js +4 -3
  106. package/components/u-modal/u-modal.vue +4 -3
  107. package/components/u-navbar/props.js +5 -3
  108. package/components/u-navbar/u-navbar.vue +4 -4
  109. package/components/u-no-network/props.js +4 -3
  110. package/components/u-no-network/u-no-network.vue +3 -3
  111. package/components/u-notice-bar/props.js +4 -3
  112. package/components/u-notice-bar/u-notice-bar.vue +3 -3
  113. package/components/u-notify/props.js +4 -3
  114. package/components/u-notify/u-notify.vue +4 -4
  115. package/components/u-number-box/props.js +4 -3
  116. package/components/u-number-box/u-number-box.vue +3 -3
  117. package/components/u-number-keyboard/props.js +4 -3
  118. package/components/u-number-keyboard/u-number-keyboard.vue +3 -3
  119. package/components/u-overlay/props.js +4 -3
  120. package/components/u-overlay/u-overlay.vue +3 -3
  121. package/components/u-parse/props.js +3 -2
  122. package/components/u-picker/props.js +4 -3
  123. package/components/u-picker/u-picker.vue +3 -3
  124. package/components/u-picker-column/props.js +3 -2
  125. package/components/u-picker-column/u-picker-column.vue +3 -3
  126. package/components/u-popup/props.js +4 -3
  127. package/components/u-popup/u-popup.vue +4 -4
  128. package/components/u-radio/props.js +4 -3
  129. package/components/u-radio/u-radio.vue +3 -3
  130. package/components/u-radio-group/props.js +4 -3
  131. package/components/u-radio-group/u-radio-group.vue +3 -3
  132. package/components/u-rate/props.js +4 -3
  133. package/components/u-rate/u-rate.vue +3 -3
  134. package/components/u-read-more/props.js +4 -3
  135. package/components/u-read-more/u-read-more.vue +4 -3
  136. package/components/u-row/props.js +4 -3
  137. package/components/u-row/u-row.vue +3 -3
  138. package/components/u-row-notice/props.js +4 -3
  139. package/components/u-row-notice/u-row-notice.vue +4 -3
  140. package/components/u-safe-bottom/props.js +5 -4
  141. package/components/u-safe-bottom/u-safe-bottom.vue +3 -3
  142. package/components/u-scroll-list/props.js +4 -3
  143. package/components/u-scroll-list/u-scroll-list.vue +3 -3
  144. package/components/u-search/props.js +4 -3
  145. package/components/u-search/u-search.vue +3 -3
  146. package/components/u-skeleton/props.js +4 -3
  147. package/components/u-skeleton/u-skeleton.vue +3 -3
  148. package/components/u-slider/props.js +4 -3
  149. package/components/u-slider/u-slider.vue +3 -3
  150. package/components/u-status-bar/props.js +4 -3
  151. package/components/u-status-bar/u-status-bar.vue +3 -3
  152. package/components/u-steps/props.js +4 -3
  153. package/components/u-steps/u-steps.vue +3 -3
  154. package/components/u-steps-item/props.js +4 -3
  155. package/components/u-steps-item/u-steps-item.vue +3 -3
  156. package/components/u-sticky/props.js +4 -3
  157. package/components/u-sticky/u-sticky.vue +3 -3
  158. package/components/u-subsection/props.js +4 -3
  159. package/components/u-subsection/u-subsection.vue +3 -3
  160. package/components/u-swipe-action/props.js +4 -3
  161. package/components/u-swipe-action/u-swipe-action.vue +3 -3
  162. package/components/u-swipe-action-item/props.js +4 -3
  163. package/components/u-swipe-action-item/u-swipe-action-item.vue +5 -5
  164. package/components/u-swiper/props.js +4 -3
  165. package/components/u-swiper/u-swiper.vue +3 -3
  166. package/components/u-swiper-indicator/props.js +4 -3
  167. package/components/u-swiper-indicator/u-swiper-indicator.vue +3 -3
  168. package/components/u-switch/props.js +4 -3
  169. package/components/u-switch/u-switch.vue +3 -3
  170. package/components/u-tabbar/props.js +5 -3
  171. package/components/u-tabbar/u-tabbar.vue +3 -3
  172. package/components/u-tabbar-item/props.js +4 -3
  173. package/components/u-tabbar-item/u-tabbar-item.vue +7 -4
  174. package/components/u-table/props.js +3 -2
  175. package/components/u-table/u-table.vue +3 -3
  176. package/components/u-tabs/props.js +4 -3
  177. package/components/u-tabs/u-tabs.vue +6 -5
  178. package/components/u-tabs-item/props.js +3 -2
  179. package/components/u-tabs-item/u-tabs-item.vue +3 -3
  180. package/components/u-tag/props.js +4 -3
  181. package/components/u-tag/u-tag.vue +8 -4
  182. package/components/u-td/props.js +3 -2
  183. package/components/u-td/u-td.vue +3 -3
  184. package/components/u-text/props.js +4 -3
  185. package/components/u-text/u-text.vue +8 -8
  186. package/components/u-textarea/props.js +5 -3
  187. package/components/u-textarea/u-textarea.vue +3 -3
  188. package/components/u-toast/u-toast.vue +2 -2
  189. package/components/u-toolbar/props.js +4 -3
  190. package/components/u-toolbar/u-toolbar.vue +3 -3
  191. package/components/u-tooltip/props.js +4 -3
  192. package/components/u-tooltip/u-tooltip.vue +3 -3
  193. package/components/u-tr/props.js +3 -2
  194. package/components/u-tr/u-tr.vue +3 -3
  195. package/components/u-transition/props.js +4 -3
  196. package/components/u-transition/u-transition.vue +3 -3
  197. package/components/u-upload/mixin.js +3 -2
  198. package/components/u-upload/props.js +8 -3
  199. package/components/u-upload/u-upload.vue +6 -5
  200. package/components/u-upload/utils.js +55 -46
  201. package/index.js +2 -2
  202. package/libs/config/props/upload.js +1 -0
  203. package/libs/mixin/button.js +4 -2
  204. package/libs/mixin/mixin.js +9 -5
  205. package/libs/mixin/mpMixin.js +4 -2
  206. package/libs/mixin/mpShare.js +5 -2
  207. package/libs/mixin/openType.js +4 -2
  208. package/libs/mixin/style.js +5 -3
  209. package/libs/mixin/touch.js +4 -2
  210. package/libs/vue.js +3 -0
  211. package/package.json +1 -1
  212. package/types/comps/popup.d.ts +1 -1
@@ -64,9 +64,9 @@
64
64
  </template>
65
65
 
66
66
  <script>
67
- import props from './props';
68
- import mpMixin from '../../libs/mixin/mpMixin';
69
- import mixin from '../../libs/mixin/mixin';
67
+ import { props } from './props';
68
+ import { mpMixin } from '../../libs/mixin/mpMixin';
69
+ import { mixin } from '../../libs/mixin/mixin';
70
70
  import { addUnit, addStyle, deepMerge } from '../../libs/function/index';
71
71
  /**
72
72
  * Image 图片
@@ -1,5 +1,6 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+ export const props = defineMixin({
3
4
  props: {
4
5
  // 列表锚点文本内容
5
6
  text: {
@@ -27,4 +28,4 @@ export default {
27
28
  default: () => defProps.indexAnchor.height
28
29
  }
29
30
  }
30
- }
31
+ })
@@ -24,9 +24,9 @@
24
24
  </template>
25
25
 
26
26
  <script>
27
- import props from './props';
28
- import mpMixin from '../../libs/mixin/mpMixin';
29
- import mixin from '../../libs/mixin/mixin';
27
+ import { props } from './props';
28
+ import { mpMixin } from '../../libs/mixin/mpMixin';
29
+ import { mixin } from '../../libs/mixin/mixin';
30
30
  import { addUnit, $parent, error } from '../../libs/function/index';
31
31
  // #ifdef APP-NVUE
32
32
  const dom = uni.requireNativePlugin('dom')
@@ -1,6 +1,8 @@
1
- // import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+
4
+ export const props = defineMixin({
3
5
  props: {
4
6
 
5
7
  }
6
- }
8
+ })
@@ -15,9 +15,9 @@
15
15
  </template>
16
16
 
17
17
  <script>
18
- import props from './props';
19
- import mpMixin from '../../libs/mixin/mpMixin';
20
- import mixin from '../../libs/mixin/mixin';
18
+ import { props } from './props';
19
+ import { mpMixin } from '../../libs/mixin/mpMixin';
20
+ import { mixin } from '../../libs/mixin/mixin';
21
21
  import { sleep, error } from '../../libs/function/index';
22
22
  // #ifdef APP-NVUE
23
23
  // 由于weex为阿里的KPI业绩考核的产物,所以不支持百分比单位,这里需要通过dom查询组件的宽度
@@ -1,5 +1,6 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+ export const props = defineMixin({
3
4
  props: {
4
5
  // 右边锚点非激活的颜色
5
6
  inactiveColor: {
@@ -27,4 +28,4 @@ export default {
27
28
  default: () => defProps.indexList.customNavHeight
28
29
  }
29
30
  }
30
- }
31
+ })
@@ -100,9 +100,9 @@
100
100
  }
101
101
  return indexList;
102
102
  }
103
- import props from './props';
104
- import mpMixin from '../../libs/mixin/mpMixin';
105
- import mixin from '../../libs/mixin/mixin';
103
+ import { props } from './props';
104
+ import { mpMixin } from '../../libs/mixin/mpMixin';
105
+ import { mixin } from '../../libs/mixin/mixin';
106
106
  import { addUnit, sys, sleep, getPx } from '../../libs/function/index';
107
107
  // #ifdef APP-NVUE
108
108
  // 由于weex为阿里的KPI业绩考核的产物,所以不支持百分比单位,这里需要通过dom查询组件的宽度
@@ -1,5 +1,7 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+
4
+ export const props = defineMixin({
3
5
  props: {
4
6
  // #ifdef VUE3
5
7
  // 绑定的值
@@ -193,4 +195,4 @@ export default {
193
195
  default: true
194
196
  }
195
197
  }
196
- }
198
+ })
@@ -75,9 +75,10 @@
75
75
  </template>
76
76
 
77
77
  <script>
78
- import props from "./props.js";
79
- import mpMixin from '../../libs/mixin/mpMixin';
80
- import mixin from '../../libs/mixin/mixin';
78
+ import { props } from "./props.js";
79
+ import { mpMixin } from '../../libs/mixin/mpMixin';
80
+ import { mixin } from '../../libs/mixin/mixin';
81
+ import { debounce } from '../../libs/function/debounce';
81
82
  import { addStyle, addUnit, deepMerge, formValidate, $parent, sleep, os } from '../../libs/function/index';
82
83
  /**
83
84
  * Input 输入框
@@ -140,53 +141,36 @@ export default {
140
141
  innerFormatter: value => value
141
142
  };
142
143
  },
144
+ created() {
145
+ // 格式化过滤方法
146
+ if (this.formatter) {
147
+ this.innerFormatter = this.formatter;
148
+ }
149
+ },
143
150
  watch: {
144
- // #ifdef VUE3
145
151
  modelValue: {
146
152
  immediate: true,
147
153
  handler(newVal, oldVal) {
154
+ console.log(newVal, oldVal)
155
+ if (this.changeFromInner || this.innerValue === newVal) {
156
+ return;
157
+ }
148
158
  this.innerValue = newVal;
149
- /* #ifdef H5 */
150
159
  // 在H5中,外部value变化后,修改input中的值,不会触发@input事件,此时手动调用值变化方法
151
160
  if (
152
161
  this.firstChange === false &&
153
162
  this.changeFromInner === false
154
163
  ) {
155
- this.valueChange();
156
- } else {
157
- // 尝试调用up-form的验证方法
158
- if(!this.firstChange) formValidate(this, "change");
159
- }
160
- /* #endif */
161
- this.firstChange = false;
162
- // 重置changeFromInner的值为false,标识下一次引起默认为外部引起的
163
- this.changeFromInner = false;
164
- },
165
- },
166
- // #endif
167
- // #ifdef VUE2
168
- value: {
169
- immediate: true,
170
- handler(newVal, oldVal) {
171
- this.innerValue = newVal;
172
- /* #ifdef H5 */
173
- // 在H5中,外部value变化后,修改input中的值,不会触发@input事件,此时手动调用值变化方法
174
- if (
175
- this.firstChange === false &&
176
- this.changeFromInner === false
177
- ) {
178
- this.valueChange();
164
+ this.valueChange(this.innerValue);
179
165
  } else {
180
166
  // 尝试调用up-form的验证方法
181
167
  if(!this.firstChange) formValidate(this, "change");
182
168
  }
183
- /* #endif */
184
169
  this.firstChange = false;
185
170
  // 重置changeFromInner的值为false,标识下一次引起默认为外部引起的
186
171
  this.changeFromInner = false;
187
- },
188
- },
189
- // #endif
172
+ }
173
+ }
190
174
  },
191
175
  computed: {
192
176
  // 是否显示清除控件
@@ -248,14 +232,12 @@ export default {
248
232
  // 当键盘输入时,触发input事件
249
233
  onInput(e) {
250
234
  let { value = "" } = e.detail || {};
251
- // 格式化过滤方法
252
- const formatter = this.formatter || this.innerFormatter
253
- const formatValue = formatter(value)
254
235
  // 为了避免props的单向数据流特性,需要先将innerValue值设置为当前值,再在$nextTick中重新赋予设置后的值才有效
255
- this.innerValue = value
236
+ this.innerValue = value;
256
237
  this.$nextTick(() => {
238
+ let formatValue = this.innerFormatter(value);
257
239
  this.innerValue = formatValue;
258
- this.valueChange();
240
+ this.valueChange(formatValue);
259
241
  })
260
242
  },
261
243
  // 输入框失去焦点时触发
@@ -284,22 +266,25 @@ export default {
284
266
  this.$emit("keyboardheightchange", event);
285
267
  },
286
268
  // 内容发生变化,进行处理
287
- valueChange() {
269
+ valueChange(value, isOut = false) {
288
270
  if(this.clearInput) {
289
271
  this.innerValue = '';
290
272
  this.clearInput = false;
291
273
  }
292
- const value = this.innerValue;
293
274
  this.$nextTick(() => {
294
- // #ifdef VUE3
295
- this.$emit("update:modelValue", value);
296
- // #endif
297
- // #ifdef VUE2
298
- this.$emit("input", value);
299
- // #endif
300
- // 标识value值的变化是由内部引起的
301
- this.changeFromInner = true;
302
- this.$emit("change", value);
275
+ if (!isOut || this.clearInput) {
276
+ // 标识value值的变化是由内部引起的
277
+ this.changeFromInner = true;
278
+ this.$emit("change", value);
279
+
280
+ // #ifdef VUE3
281
+ this.$emit("update:modelValue", value);
282
+ // #endif
283
+ // #ifdef VUE2
284
+ this.$emit("input", value);
285
+ // #endif
286
+ }
287
+
303
288
  // 尝试调用u-form的验证方法
304
289
  formValidate(this, "change");
305
290
  });
@@ -309,7 +294,7 @@ export default {
309
294
  this.clearInput = true;
310
295
  this.innerValue = "";
311
296
  this.$nextTick(() => {
312
- this.valueChange();
297
+ this.valueChange("");
313
298
  this.$emit("clear");
314
299
  });
315
300
  },
@@ -1,5 +1,6 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+ export const props = defineMixin({
3
4
  props: {
4
5
  // 键盘的类型,number-数字键盘,card-身份证键盘,car-车牌号键盘
5
6
  mode: {
@@ -82,4 +83,4 @@ export default {
82
83
  default: () => defProps.keyboard.autoChange
83
84
  }
84
85
  }
85
- }
86
+ })
@@ -68,9 +68,9 @@
68
68
  </template>
69
69
 
70
70
  <script>
71
- import props from './props';
72
- import mpMixin from '../../libs/mixin/mpMixin';
73
- import mixin from '../../libs/mixin/mixin';
71
+ import { props } from './props';
72
+ import { mpMixin } from '../../libs/mixin/mpMixin';
73
+ import { mixin } from '../../libs/mixin/mixin';
74
74
 
75
75
  /**
76
76
  * keyboard 键盘
@@ -1,5 +1,6 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+ export const props = defineMixin({
3
4
  props: {
4
5
  color: {
5
6
  type: String,
@@ -31,4 +32,4 @@ export default {
31
32
  default: () => defProps.line.dashed
32
33
  }
33
34
  }
34
- }
35
+ })
@@ -8,9 +8,9 @@
8
8
  </template>
9
9
 
10
10
  <script>
11
- import props from './props';
12
- import mpMixin from '../../libs/mixin/mpMixin';
13
- import mixin from '../../libs/mixin/mixin';
11
+ import { props } from './props';
12
+ import { mpMixin } from '../../libs/mixin/mpMixin';
13
+ import { mixin } from '../../libs/mixin/mixin';
14
14
  import { addUnit, addStyle, deepMerge } from '../../libs/function/index';
15
15
  /**
16
16
  * line 线条
@@ -1,5 +1,6 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+ export const props = defineMixin({
3
4
  props: {
4
5
  // 激活部分的颜色
5
6
  activeColor: {
@@ -26,4 +27,4 @@ export default {
26
27
  default: () => defProps.lineProgress.height
27
28
  }
28
29
  }
29
- }
30
+ })
@@ -24,9 +24,9 @@
24
24
  </template>
25
25
 
26
26
  <script>
27
- import props from './props';
28
- import mpMixin from '../../libs/mixin/mpMixin';
29
- import mixin from '../../libs/mixin/mixin';
27
+ import { props } from './props';
28
+ import { mpMixin } from '../../libs/mixin/mpMixin';
29
+ import { mixin } from '../../libs/mixin/mixin';
30
30
  import { addUnit, addStyle, sleep, range } from '../../libs/function/index';
31
31
  // #ifdef APP-NVUE
32
32
  const dom = uni.requireNativePlugin('dom')
@@ -1,5 +1,6 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+ export const props = defineMixin({
3
4
  props: {
4
5
  // 文字颜色
5
6
  color: {
@@ -37,4 +38,4 @@ export default {
37
38
  default: () => defProps.link.text
38
39
  }
39
40
  }
40
- }
41
+ })
@@ -7,9 +7,9 @@
7
7
  </template>
8
8
 
9
9
  <script>
10
- import props from './props';
11
- import mpMixin from '../../libs/mixin/mpMixin';
12
- import mixin from '../../libs/mixin/mixin';
10
+ import { props } from './props';
11
+ import { mpMixin } from '../../libs/mixin/mpMixin';
12
+ import { mixin } from '../../libs/mixin/mixin';
13
13
  import { addStyle, addUnit, getPx, toast } from '../../libs/function/index';
14
14
  /**
15
15
  * link 超链接
@@ -1,5 +1,6 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+ export const props = defineMixin({
3
4
  props: {
4
5
  // 控制是否出现滚动条,仅nvue有效
5
6
  showScrollbar: {
@@ -95,6 +96,6 @@ export default {
95
96
  refresherTriggered: {
96
97
  type: Boolean,
97
98
  default: () => false
98
- },
99
+ }
99
100
  }
100
- }
101
+ })
@@ -47,9 +47,9 @@
47
47
  </template>
48
48
 
49
49
  <script>
50
- import props from './props';
51
- import mpMixin from '../../libs/mixin/mpMixin';
52
- import mixin from '../../libs/mixin/mixin';
50
+ import { props } from './props';
51
+ import { mpMixin } from '../../libs/mixin/mpMixin';
52
+ import { mixin } from '../../libs/mixin/mixin';
53
53
  import { addUnit, addStyle, deepMerge, sleep, sys } from '../../libs/function/index';
54
54
  // #ifdef APP-NVUE
55
55
  const dom = uni.requireNativePlugin('dom')
@@ -1,5 +1,6 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+ export const props = defineMixin({
3
4
  props: {
4
5
  // 用于滚动到指定item
5
6
  anchor: {
@@ -7,4 +8,4 @@ export default {
7
8
  default: () => defProps.listItem.anchor
8
9
  }
9
10
  }
10
- }
11
+ })
@@ -16,9 +16,9 @@
16
16
  </template>
17
17
 
18
18
  <script>
19
- import props from './props';
20
- import mpMixin from '../../libs/mixin/mpMixin';
21
- import mixin from '../../libs/mixin/mixin';
19
+ import { props } from './props';
20
+ import { mpMixin } from '../../libs/mixin/mpMixin';
21
+ import { mixin } from '../../libs/mixin/mixin';
22
22
  import { sys } from '../../libs/function/index';
23
23
  // #ifdef APP-NVUE
24
24
  const dom = uni.requireNativePlugin('dom')
@@ -1,5 +1,6 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+ export const props = defineMixin({
3
4
  props: {
4
5
  // 是否显示组件
5
6
  show: {
@@ -57,4 +58,4 @@ export default {
57
58
  default: () => defProps.loadingIcon.inactiveColor
58
59
  }
59
60
  }
60
- }
61
+ })
@@ -58,9 +58,9 @@
58
58
  </template>
59
59
 
60
60
  <script>
61
- import props from './props';
62
- import mpMixin from '../../libs/mixin/mpMixin';
63
- import mixin from '../../libs/mixin/mixin';
61
+ import { props } from './props';
62
+ import { mpMixin } from '../../libs/mixin/mpMixin';
63
+ import { mixin } from '../../libs/mixin/mixin';
64
64
  import { addUnit, addStyle } from '../../libs/function/index';
65
65
  import { colorGradient } from '../../libs/function/colorGradient';
66
66
  // #ifdef APP-NVUE
@@ -1,5 +1,7 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+
4
+ export const props = defineMixin({
3
5
  props: {
4
6
  // 提示内容
5
7
  loadingText: {
@@ -47,4 +49,4 @@ export default {
47
49
  default: () => defProps.loadingPage.loadingColor
48
50
  }
49
51
  }
50
- }
52
+ })
@@ -47,9 +47,9 @@
47
47
  </template>
48
48
 
49
49
  <script>
50
- import props from "./props.js";
51
- import mpMixin from '../../libs/mixin/mpMixin';
52
- import mixin from '../../libs/mixin/mixin';
50
+ import { props } from "./props";
51
+ import { mpMixin } from '../../libs/mixin/mpMixin';
52
+ import { mixin } from '../../libs/mixin/mixin';
53
53
  import { addUnit } from '../../libs/function/index';
54
54
  /**
55
55
  * loadingPage 加载动画
@@ -1,5 +1,6 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+ export const props = defineMixin({
3
4
  props: {
4
5
  // 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
5
6
  status: {
@@ -92,4 +93,4 @@ export default {
92
93
  default: () => defProps.loadmore.dashed
93
94
  }
94
95
  }
95
- }
96
+ })
@@ -52,9 +52,9 @@
52
52
  </template>
53
53
 
54
54
  <script>
55
- import props from './props';
56
- import mpMixin from '../../libs/mixin/mpMixin';
57
- import mixin from '../../libs/mixin/mixin';
55
+ import { props } from './props';
56
+ import { mpMixin } from '../../libs/mixin/mpMixin';
57
+ import { mixin } from '../../libs/mixin/mixin';
58
58
  import { addUnit, addStyle } from '../../libs/function/index';
59
59
  /**
60
60
  * loadmore 加载更多
@@ -1,5 +1,6 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+ export const props = defineMixin({
3
4
  props: {
4
5
  // 是否展示modal
5
6
  show: {
@@ -82,4 +83,4 @@ export default {
82
83
  default: () => defProps.modal.confirmButtonShape
83
84
  }
84
85
  }
85
- }
86
+ })
@@ -3,6 +3,7 @@
3
3
  mode="center"
4
4
  :zoom="zoom"
5
5
  :show="show"
6
+ :class="[customClass]"
6
7
  :customStyle="{
7
8
  borderRadius: '6px',
8
9
  overflow: 'hidden',
@@ -90,9 +91,9 @@
90
91
  </template>
91
92
 
92
93
  <script>
93
- import props from './props';
94
- import mpMixin from '../../libs/mixin/mpMixin';
95
- import mixin from '../../libs/mixin/mixin';
94
+ import { props } from './props';
95
+ import { mpMixin } from '../../libs/mixin/mpMixin';
96
+ import { mixin } from '../../libs/mixin/mixin';
96
97
  import { addUnit } from '../../libs/function/index';
97
98
  /**
98
99
  * Modal 模态框
@@ -1,5 +1,7 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+
4
+ export const props = defineMixin({
3
5
  props: {
4
6
  // 是否开启顶部安全区适配
5
7
  safeAreaInsetTop: {
@@ -82,4 +84,4 @@ export default {
82
84
  default: () => defProps.navbar.titleStyle
83
85
  }
84
86
  }
85
- }
87
+ })
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="u-navbar">
2
+ <view class="u-navbar" :class="[customClass]">
3
3
  <view
4
4
  class="u-navbar__placeholder"
5
5
  v-if="fixed && placeholder"
@@ -73,9 +73,9 @@
73
73
  </template>
74
74
 
75
75
  <script>
76
- import props from './props';
77
- import mpMixin from '../../libs/mixin/mpMixin';
78
- import mixin from '../../libs/mixin/mixin';
76
+ import { props } from './props';
77
+ import { mpMixin } from '../../libs/mixin/mpMixin';
78
+ import { mixin } from '../../libs/mixin/mixin';
79
79
  import { addUnit, addStyle, getPx, sys } from '../../libs/function/index';
80
80
  /**
81
81
  * Navbar 自定义导航栏
@@ -1,5 +1,6 @@
1
- import defProps from '../../libs/config/props.js';
2
- export default {
1
+ import { defineMixin } from '../../libs/vue'
2
+ import defProps from '../../libs/config/props.js'
3
+ export const props = defineMixin({
3
4
  props: {
4
5
  // 页面文字提示
5
6
  tips: {
@@ -17,4 +18,4 @@ export default {
17
18
  default: () => defProps.noNetwork.image
18
19
  }
19
20
  }
20
- }
21
+ })
@@ -43,9 +43,9 @@
43
43
  </template>
44
44
 
45
45
  <script>
46
- import props from './props';
47
- import mpMixin from '../../libs/mixin/mpMixin';
48
- import mixin from '../../libs/mixin/mixin';
46
+ import { props } from './props';
47
+ import { mpMixin } from '../../libs/mixin/mpMixin';
48
+ import { mixin } from '../../libs/mixin/mixin';
49
49
  import { toast } from '../../libs/function/index';
50
50
  /**
51
51
  * noNetwork 无网络提示