uview-plus 3.0.17 → 3.1.3

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 (203) hide show
  1. package/changelog.md +8 -0
  2. package/components/u--form/u--form.vue +4 -2
  3. package/components/u--image/u--image.vue +4 -2
  4. package/components/u--input/u--input.vue +5 -3
  5. package/components/u--text/u--text.vue +4 -2
  6. package/components/u--textarea/u--textarea.vue +4 -2
  7. package/components/u-action-sheet/props.js +11 -10
  8. package/components/u-action-sheet/u-action-sheet.vue +3 -1
  9. package/components/u-album/props.js +12 -11
  10. package/components/u-album/u-album.vue +4 -2
  11. package/components/u-alert/props.js +9 -8
  12. package/components/u-alert/u-alert.vue +3 -1
  13. package/components/u-avatar/props.js +15 -14
  14. package/components/u-avatar/u-avatar.vue +3 -1
  15. package/components/u-avatar-group/props.js +10 -9
  16. package/components/u-avatar-group/u-avatar-group.vue +3 -1
  17. package/components/u-back-top/props.js +11 -10
  18. package/components/u-back-top/u-back-top.vue +2 -0
  19. package/components/u-badge/props.js +15 -14
  20. package/components/u-badge/u-badge.vue +3 -1
  21. package/components/u-button/props.js +29 -28
  22. package/components/u-button/u-button.vue +4 -2
  23. package/components/u-calendar/month.vue +5 -2
  24. package/components/u-calendar/props.js +28 -27
  25. package/components/u-calendar/u-calendar.vue +3 -1
  26. package/components/u-calendar/util.js +1 -0
  27. package/components/u-car-keyboard/props.js +1 -0
  28. package/components/u-car-keyboard/u-car-keyboard.vue +4 -2
  29. package/components/u-cell/props.js +18 -17
  30. package/components/u-cell/u-cell.vue +3 -1
  31. package/components/u-cell-group/props.js +3 -2
  32. package/components/u-cell-group/u-cell-group.vue +3 -1
  33. package/components/u-checkbox/props.js +14 -13
  34. package/components/u-checkbox/u-checkbox.vue +3 -1
  35. package/components/u-checkbox-group/props.js +16 -15
  36. package/components/u-checkbox-group/u-checkbox-group.vue +3 -1
  37. package/components/u-circle-progress/props.js +2 -1
  38. package/components/u-circle-progress/u-circle-progress.vue +3 -1
  39. package/components/u-code/props.js +7 -6
  40. package/components/u-code/u-code.vue +3 -1
  41. package/components/u-code-input/props.js +16 -15
  42. package/components/u-code-input/u-code-input.vue +3 -1
  43. package/components/u-col/props.js +6 -5
  44. package/components/u-col/u-col.vue +3 -1
  45. package/components/u-collapse/props.js +4 -3
  46. package/components/u-collapse/u-collapse.vue +3 -1
  47. package/components/u-collapse-item/props.js +12 -11
  48. package/components/u-collapse-item/u-collapse-item.vue +20 -18
  49. package/components/u-column-notice/props.js +11 -10
  50. package/components/u-column-notice/u-column-notice.vue +3 -1
  51. package/components/u-count-down/props.js +5 -4
  52. package/components/u-count-down/u-count-down.vue +5 -3
  53. package/components/u-count-to/props.js +12 -11
  54. package/components/u-count-to/u-count-to.vue +3 -1
  55. package/components/u-datetime-picker/props.js +24 -23
  56. package/components/u-datetime-picker/u-datetime-picker.vue +3 -1
  57. package/components/u-divider/props.js +9 -8
  58. package/components/u-divider/u-divider.vue +3 -1
  59. package/components/u-dropdown/props.js +5 -4
  60. package/components/u-dropdown/u-dropdown.vue +4 -2
  61. package/components/u-dropdown-item/props.js +2 -1
  62. package/components/u-dropdown-item/u-dropdown-item.vue +4 -2
  63. package/components/u-empty/props.js +12 -11
  64. package/components/u-empty/u-empty.vue +3 -2
  65. package/components/u-form/props.js +9 -8
  66. package/components/u-form/u-form.vue +13 -11
  67. package/components/u-form-item/props.js +9 -8
  68. package/components/u-form-item/u-form-item.vue +3 -1
  69. package/components/u-gap/props.js +5 -4
  70. package/components/u-gap/u-gap.vue +3 -1
  71. package/components/u-grid/props.js +4 -3
  72. package/components/u-grid/u-grid.vue +3 -1
  73. package/components/u-grid-item/props.js +3 -2
  74. package/components/u-grid-item/u-grid-item.vue +3 -1
  75. package/components/u-icon/props.js +18 -17
  76. package/components/u-icon/u-icon.vue +4 -2
  77. package/components/u-image/props.js +18 -17
  78. package/components/u-image/u-image.vue +3 -1
  79. package/components/u-index-anchor/props.js +6 -5
  80. package/components/u-index-anchor/u-index-anchor.vue +3 -1
  81. package/components/u-index-item/props.js +1 -0
  82. package/components/u-index-item/u-index-item.vue +3 -1
  83. package/components/u-index-list/props.js +6 -5
  84. package/components/u-index-list/u-index-list.vue +3 -1
  85. package/components/u-input/props.js +36 -35
  86. package/components/u-input/u-input.vue +3 -1
  87. package/components/u-keyboard/props.js +17 -16
  88. package/components/u-keyboard/u-keyboard.vue +3 -1
  89. package/components/u-line/props.js +7 -6
  90. package/components/u-line/u-line.vue +3 -1
  91. package/components/u-line-progress/props.js +6 -5
  92. package/components/u-line-progress/u-line-progress.vue +3 -1
  93. package/components/u-link/props.js +8 -7
  94. package/components/u-link/u-link.vue +3 -1
  95. package/components/u-list/props.js +15 -14
  96. package/components/u-list/u-list.vue +3 -1
  97. package/components/u-list-item/props.js +2 -1
  98. package/components/u-list-item/u-list-item.vue +3 -1
  99. package/components/u-loading-icon/props.js +13 -12
  100. package/components/u-loading-icon/u-loading-icon.vue +4 -2
  101. package/components/u-loading-page/props.js +10 -9
  102. package/components/u-loading-page/u-loading-page.vue +3 -1
  103. package/components/u-loadmore/props.js +19 -18
  104. package/components/u-loadmore/u-loadmore.vue +3 -1
  105. package/components/u-modal/props.js +17 -16
  106. package/components/u-modal/u-modal.vue +4 -2
  107. package/components/u-navbar/props.js +34 -33
  108. package/components/u-navbar/u-navbar.vue +3 -1
  109. package/components/u-no-network/props.js +4 -3
  110. package/components/u-no-network/u-no-network.vue +3 -1
  111. package/components/u-notice-bar/props.js +14 -13
  112. package/components/u-notice-bar/u-notice-bar.vue +3 -1
  113. package/components/u-notify/props.js +10 -9
  114. package/components/u-notify/u-notify.vue +3 -1
  115. package/components/u-number-box/props.js +23 -22
  116. package/components/u-number-box/u-number-box.vue +3 -1
  117. package/components/u-number-keyboard/props.js +4 -3
  118. package/components/u-number-keyboard/u-number-keyboard.vue +3 -1
  119. package/components/u-overlay/props.js +5 -4
  120. package/components/u-overlay/u-overlay.vue +3 -1
  121. package/components/u-parse/props.js +9 -8
  122. package/components/u-picker/props.js +16 -15
  123. package/components/u-picker/u-picker.vue +3 -1
  124. package/components/u-picker-column/props.js +1 -0
  125. package/components/u-picker-column/u-picker-column.vue +3 -1
  126. package/components/u-popup/props.js +16 -15
  127. package/components/u-popup/u-popup.vue +4 -2
  128. package/components/u-radio/props.js +13 -12
  129. package/components/u-radio/u-radio.vue +3 -1
  130. package/components/u-radio-group/props.js +18 -17
  131. package/components/u-radio-group/u-radio-group.vue +3 -1
  132. package/components/u-rate/props.js +15 -14
  133. package/components/u-rate/u-rate.vue +3 -1
  134. package/components/u-read-more/props.js +9 -8
  135. package/components/u-read-more/u-read-more.vue +3 -1
  136. package/components/u-row/props.js +4 -3
  137. package/components/u-row/u-row.vue +3 -1
  138. package/components/u-row-notice/props.js +8 -7
  139. package/components/u-row-notice/u-row-notice.vue +3 -1
  140. package/components/u-safe-bottom/props.js +1 -0
  141. package/components/u-safe-bottom/u-safe-bottom.vue +4 -2
  142. package/components/u-scroll-list/props.js +7 -6
  143. package/components/u-scroll-list/u-scroll-list.vue +3 -1
  144. package/components/u-search/props.js +25 -24
  145. package/components/u-search/u-search.vue +3 -1
  146. package/components/u-skeleton/props.js +12 -11
  147. package/components/u-skeleton/u-skeleton.vue +3 -1
  148. package/components/u-slider/props.js +11 -10
  149. package/components/u-slider/u-slider.vue +5 -3
  150. package/components/u-status-bar/props.js +2 -1
  151. package/components/u-status-bar/u-status-bar.vue +3 -1
  152. package/components/u-steps/props.js +9 -8
  153. package/components/u-steps/u-steps.vue +3 -1
  154. package/components/u-steps-item/props.js +5 -4
  155. package/components/u-steps-item/u-steps-item.vue +3 -1
  156. package/components/u-sticky/props.js +7 -6
  157. package/components/u-sticky/u-sticky.vue +4 -2
  158. package/components/u-subsection/props.js +10 -9
  159. package/components/u-subsection/u-subsection.vue +3 -1
  160. package/components/u-swipe-action/props.js +2 -1
  161. package/components/u-swipe-action/u-swipe-action.vue +3 -1
  162. package/components/u-swipe-action-item/props.js +7 -6
  163. package/components/u-swipe-action-item/u-swipe-action-item.vue +5 -3
  164. package/components/u-swiper/props.js +25 -24
  165. package/components/u-swiper/u-swiper.vue +3 -1
  166. package/components/u-swiper-indicator/props.js +6 -5
  167. package/components/u-swiper-indicator/u-swiper-indicator.vue +3 -1
  168. package/components/u-switch/props.js +12 -11
  169. package/components/u-switch/u-switch.vue +3 -1
  170. package/components/u-tabbar/props.js +9 -8
  171. package/components/u-tabbar/u-tabbar.vue +3 -1
  172. package/components/u-tabbar-item/props.js +7 -6
  173. package/components/u-tabbar-item/u-tabbar-item.vue +3 -1
  174. package/components/u-table/props.js +1 -0
  175. package/components/u-table/u-table.vue +3 -1
  176. package/components/u-tabs/props.js +13 -12
  177. package/components/u-tabs/u-tabs.vue +3 -1
  178. package/components/u-tabs-item/props.js +1 -0
  179. package/components/u-tabs-item/u-tabs-item.vue +3 -1
  180. package/components/u-tag/props.js +16 -15
  181. package/components/u-tag/u-tag.vue +5 -3
  182. package/components/u-td/props.js +1 -0
  183. package/components/u-td/u-td.vue +3 -1
  184. package/components/u-text/props.js +22 -21
  185. package/components/u-text/u-text.vue +4 -2
  186. package/components/u-textarea/props.js +24 -23
  187. package/components/u-textarea/u-textarea.vue +3 -1
  188. package/components/u-toast/u-toast.vue +3 -1
  189. package/components/u-toolbar/props.js +7 -6
  190. package/components/u-toolbar/u-toolbar.vue +3 -1
  191. package/components/u-tooltip/props.js +12 -11
  192. package/components/u-tooltip/u-tooltip.vue +3 -1
  193. package/components/u-tr/props.js +1 -0
  194. package/components/u-tr/u-tr.vue +3 -1
  195. package/components/u-transition/{nvue.ani-map.js → nvue-ani-map.js} +0 -0
  196. package/components/u-transition/props.js +5 -4
  197. package/components/u-transition/transition.js +3 -1
  198. package/components/u-transition/u-transition.vue +3 -1
  199. package/components/u-upload/props.js +23 -22
  200. package/components/u-upload/u-upload.vue +4 -2
  201. package/index.js +1 -0
  202. package/libs/config/config.js +2 -2
  203. package/package.json +1 -1
@@ -40,6 +40,8 @@
40
40
 
41
41
  <script>
42
42
  import props from './props.js';
43
+ import mpMixin from '../../libs/mixin/mpMixin.js';
44
+ import mixin from '../../libs/mixin/mixin.js';
43
45
 
44
46
  /**
45
47
  * keyboard 键盘组件
@@ -53,7 +55,7 @@
53
55
  * @example
54
56
  */
55
57
  export default {
56
- mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
58
+ mixins: [mpMixin, mixin, props],
57
59
  data() {
58
60
  return {
59
61
  backspace: 'backspace', // 退格键内容
@@ -1,24 +1,25 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // 是否显示遮罩
4
5
  show: {
5
6
  type: Boolean,
6
- default: uni.$u.props.overlay.show
7
+ default: defprops.overlay.show
7
8
  },
8
9
  // 层级z-index
9
10
  zIndex: {
10
11
  type: [String, Number],
11
- default: uni.$u.props.overlay.zIndex
12
+ default: defprops.overlay.zIndex
12
13
  },
13
14
  // 遮罩的过渡时间,单位为ms
14
15
  duration: {
15
16
  type: [String, Number],
16
- default: uni.$u.props.overlay.duration
17
+ default: defprops.overlay.duration
17
18
  },
18
19
  // 不透明度值,当做rgba的第四个参数
19
20
  opacity: {
20
21
  type: [String, Number],
21
- default: uni.$u.props.overlay.opacity
22
+ default: defprops.overlay.opacity
22
23
  }
23
24
  }
24
25
  }
@@ -12,6 +12,8 @@
12
12
 
13
13
  <script>
14
14
  import props from './props.js';
15
+ import mpMixin from '../../libs/mixin/mpMixin.js';
16
+ import mixin from '../../libs/mixin/mixin.js';
15
17
 
16
18
  /**
17
19
  * overlay 遮罩
@@ -27,7 +29,7 @@
27
29
  */
28
30
  export default {
29
31
  name: "u-overlay",
30
- mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
32
+ mixins: [mpMixin, mixin,props],
31
33
  computed: {
32
34
  overlayStyle() {
33
35
  const style = {
@@ -1,3 +1,4 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // #ifdef APP-PLUS-NVUE
@@ -6,38 +7,38 @@ export default {
6
7
  content: String,
7
8
  copyLink: {
8
9
  type: Boolean,
9
- default: uni.$u.props.parse.copyLink
10
+ default: defprops.parse.copyLink
10
11
  },
11
12
  domain: String,
12
13
  errorImg: {
13
14
  type: String,
14
- default: uni.$u.props.parse.errorImg
15
+ default: defprops.parse.errorImg
15
16
  },
16
17
  lazyLoad: {
17
18
  type: Boolean,
18
- default: uni.$u.props.parse.lazyLoad
19
+ default: defprops.parse.lazyLoad
19
20
  },
20
21
  loadingImg: {
21
22
  type: String,
22
- default: uni.$u.props.parse.loadingImg
23
+ default: defprops.parse.loadingImg
23
24
  },
24
25
  pauseVideo: {
25
26
  type: Boolean,
26
- default: uni.$u.props.parse.pauseVideo
27
+ default: defprops.parse.pauseVideo
27
28
  },
28
29
  previewImg: {
29
30
  type: Boolean,
30
- default: uni.$u.props.parse.previewImg
31
+ default: defprops.parse.previewImg
31
32
  },
32
33
  scrollTable: Boolean,
33
34
  selectable: Boolean,
34
35
  setTitle: {
35
36
  type: Boolean,
36
- default: uni.$u.props.parse.setTitle
37
+ default: defprops.parse.setTitle
37
38
  },
38
39
  showImgMenu: {
39
40
  type: Boolean,
40
- default: uni.$u.props.parse.showImgMenu
41
+ default: defprops.parse.showImgMenu
41
42
  },
42
43
  tagStyle: Object,
43
44
  useAnchor: null
@@ -1,79 +1,80 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // 是否展示picker弹窗
4
5
  show: {
5
6
  type: Boolean,
6
- default: uni.$u.props.picker.show
7
+ default: defprops.picker.show
7
8
  },
8
9
  // 是否展示顶部的操作栏
9
10
  showToolbar: {
10
11
  type: Boolean,
11
- default: uni.$u.props.picker.showToolbar
12
+ default: defprops.picker.showToolbar
12
13
  },
13
14
  // 顶部标题
14
15
  title: {
15
16
  type: String,
16
- default: uni.$u.props.picker.title
17
+ default: defprops.picker.title
17
18
  },
18
19
  // 对象数组,设置每一列的数据
19
20
  columns: {
20
21
  type: Array,
21
- default: uni.$u.props.picker.columns
22
+ default: defprops.picker.columns
22
23
  },
23
24
  // 是否显示加载中状态
24
25
  loading: {
25
26
  type: Boolean,
26
- default: uni.$u.props.picker.loading
27
+ default: defprops.picker.loading
27
28
  },
28
29
  // 各列中,单个选项的高度
29
30
  itemHeight: {
30
31
  type: [String, Number],
31
- default: uni.$u.props.picker.itemHeight
32
+ default: defprops.picker.itemHeight
32
33
  },
33
34
  // 取消按钮的文字
34
35
  cancelText: {
35
36
  type: String,
36
- default: uni.$u.props.picker.cancelText
37
+ default: defprops.picker.cancelText
37
38
  },
38
39
  // 确认按钮的文字
39
40
  confirmText: {
40
41
  type: String,
41
- default: uni.$u.props.picker.confirmText
42
+ default: defprops.picker.confirmText
42
43
  },
43
44
  // 取消按钮的颜色
44
45
  cancelColor: {
45
46
  type: String,
46
- default: uni.$u.props.picker.cancelColor
47
+ default: defprops.picker.cancelColor
47
48
  },
48
49
  // 确认按钮的颜色
49
50
  confirmColor: {
50
51
  type: String,
51
- default: uni.$u.props.picker.confirmColor
52
+ default: defprops.picker.confirmColor
52
53
  },
53
54
  // 每列中可见选项的数量
54
55
  visibleItemCount: {
55
56
  type: [String, Number],
56
- default: uni.$u.props.picker.visibleItemCount
57
+ default: defprops.picker.visibleItemCount
57
58
  },
58
59
  // 选项对象中,需要展示的属性键名
59
60
  keyName: {
60
61
  type: String,
61
- default: uni.$u.props.picker.keyName
62
+ default: defprops.picker.keyName
62
63
  },
63
64
  // 是否允许点击遮罩关闭选择器
64
65
  closeOnClickOverlay: {
65
66
  type: Boolean,
66
- default: uni.$u.props.picker.closeOnClickOverlay
67
+ default: defprops.picker.closeOnClickOverlay
67
68
  },
68
69
  // 各列的默认索引
69
70
  defaultIndex: {
70
71
  type: Array,
71
- default: uni.$u.props.picker.defaultIndex
72
+ default: defprops.picker.defaultIndex
72
73
  },
73
74
  // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
74
75
  immediateChange: {
75
76
  type: Boolean,
76
- default: uni.$u.props.picker.immediateChange
77
+ default: defprops.picker.immediateChange
77
78
  }
78
79
  }
79
80
  }
@@ -77,9 +77,11 @@
77
77
  * @event {Function} confirm 点击确定按钮,返回当前选择的值
78
78
  */
79
79
  import props from './props.js';
80
+ import mpMixin from '../../libs/mixin/mpMixin.js';
81
+ import mixin from '../../libs/mixin/mixin.js';
80
82
  export default {
81
83
  name: 'u-picker',
82
- mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
84
+ mixins: [mpMixin, mixin, props],
83
85
  data() {
84
86
  return {
85
87
  // 上一次选择的列索引
@@ -1,3 +1,4 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
 
@@ -8,6 +8,8 @@
8
8
 
9
9
  <script>
10
10
  import props from './props.js';
11
+ import mpMixin from '../../libs/mixin/mpMixin.js';
12
+ import mixin from '../../libs/mixin/mixin.js';
11
13
  /**
12
14
  * PickerColumn
13
15
  * @description
@@ -18,7 +20,7 @@
18
20
  */
19
21
  export default {
20
22
  name: 'u-picker-column',
21
- mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
23
+ mixins: [mpMixin, mixin, props],
22
24
  }
23
25
  </script>
24
26
 
@@ -1,79 +1,80 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // 是否展示弹窗
4
5
  show: {
5
6
  type: Boolean,
6
- default: uni.$u.props.popup.show
7
+ default: defprops.popup.show
7
8
  },
8
9
  // 是否显示遮罩
9
10
  overlay: {
10
11
  type: Boolean,
11
- default: uni.$u.props.popup.overlay
12
+ default: defprops.popup.overlay
12
13
  },
13
14
  // 弹出的方向,可选值为 top bottom right left center
14
15
  mode: {
15
16
  type: String,
16
- default: uni.$u.props.popup.mode
17
+ default: defprops.popup.mode
17
18
  },
18
19
  // 动画时长,单位ms
19
20
  duration: {
20
21
  type: [String, Number],
21
- default: uni.$u.props.popup.duration
22
+ default: defprops.popup.duration
22
23
  },
23
24
  // 是否显示关闭图标
24
25
  closeable: {
25
26
  type: Boolean,
26
- default: uni.$u.props.popup.closeable
27
+ default: defprops.popup.closeable
27
28
  },
28
29
  // 自定义遮罩的样式
29
30
  overlayStyle: {
30
31
  type: [Object, String],
31
- default: uni.$u.props.popup.overlayStyle
32
+ default: defprops.popup.overlayStyle
32
33
  },
33
34
  // 点击遮罩是否关闭弹窗
34
35
  closeOnClickOverlay: {
35
36
  type: Boolean,
36
- default: uni.$u.props.popup.closeOnClickOverlay
37
+ default: defprops.popup.closeOnClickOverlay
37
38
  },
38
39
  // 层级
39
40
  zIndex: {
40
41
  type: [String, Number],
41
- default: uni.$u.props.popup.zIndex
42
+ default: defprops.popup.zIndex
42
43
  },
43
44
  // 是否为iPhoneX留出底部安全距离
44
45
  safeAreaInsetBottom: {
45
46
  type: Boolean,
46
- default: uni.$u.props.popup.safeAreaInsetBottom
47
+ default: defprops.popup.safeAreaInsetBottom
47
48
  },
48
49
  // 是否留出顶部安全距离(状态栏高度)
49
50
  safeAreaInsetTop: {
50
51
  type: Boolean,
51
- default: uni.$u.props.popup.safeAreaInsetTop
52
+ default: defprops.popup.safeAreaInsetTop
52
53
  },
53
54
  // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
54
55
  closeIconPos: {
55
56
  type: String,
56
- default: uni.$u.props.popup.closeIconPos
57
+ default: defprops.popup.closeIconPos
57
58
  },
58
59
  // 是否显示圆角
59
60
  round: {
60
61
  type: [Boolean, String, Number],
61
- default: uni.$u.props.popup.round
62
+ default: defprops.popup.round
62
63
  },
63
64
  // mode=center,也即中部弹出时,是否使用缩放模式
64
65
  zoom: {
65
66
  type: Boolean,
66
- default: uni.$u.props.popup.zoom
67
+ default: defprops.popup.zoom
67
68
  },
68
69
  // 弹窗背景色,设置为transparent可去除白色背景
69
70
  bgColor: {
70
71
  type: String,
71
- default: uni.$u.props.popup.bgColor
72
+ default: defprops.popup.bgColor
72
73
  },
73
74
  // 遮罩的透明度,0-1之间
74
75
  overlayOpacity: {
75
76
  type: [Number, String],
76
- default: uni.$u.props.popup.overlayOpacity
77
+ default: defprops.popup.overlayOpacity
77
78
  }
78
79
  }
79
80
  }
@@ -45,7 +45,9 @@
45
45
  </template>
46
46
 
47
47
  <script>
48
- import props from './props.js';
48
+ import props from './props.js';
49
+ import mpMixin from '../../libs/mixin/mpMixin.js';
50
+ import mixin from '../../libs/mixin/mixin.js';
49
51
 
50
52
  /**
51
53
  * popup 弹窗
@@ -73,7 +75,7 @@
73
75
  */
74
76
  export default {
75
77
  name: 'u-popup',
76
- mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
78
+ mixins: [mpMixin, mixin, props],
77
79
  data() {
78
80
  return {
79
81
  overlayDuration: this.duration + 50
@@ -1,64 +1,65 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // radio的名称
4
5
  name: {
5
6
  type: [String, Number, Boolean],
6
- default: uni.$u.props.radio.name
7
+ default: defprops.radio.name
7
8
  },
8
9
  // 形状,square为方形,circle为圆型
9
10
  shape: {
10
11
  type: String,
11
- default: uni.$u.props.radio.shape
12
+ default: defprops.radio.shape
12
13
  },
13
14
  // 是否禁用
14
15
  disabled: {
15
16
  type: [String, Boolean],
16
- default: uni.$u.props.radio.disabled
17
+ default: defprops.radio.disabled
17
18
  },
18
19
  // 是否禁止点击提示语选中单选框
19
20
  labelDisabled: {
20
21
  type: [String, Boolean],
21
- default: uni.$u.props.radio.labelDisabled
22
+ default: defprops.radio.labelDisabled
22
23
  },
23
24
  // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
24
25
  activeColor: {
25
26
  type: String,
26
- default: uni.$u.props.radio.activeColor
27
+ default: defprops.radio.activeColor
27
28
  },
28
29
  // 未选中的颜色
29
30
  inactiveColor: {
30
31
  type: String,
31
- default: uni.$u.props.radio.inactiveColor
32
+ default: defprops.radio.inactiveColor
32
33
  },
33
34
  // 图标的大小,单位px
34
35
  iconSize: {
35
36
  type: [String, Number],
36
- default: uni.$u.props.radio.iconSize
37
+ default: defprops.radio.iconSize
37
38
  },
38
39
  // label的字体大小,px单位
39
40
  labelSize: {
40
41
  type: [String, Number],
41
- default: uni.$u.props.radio.labelSize
42
+ default: defprops.radio.labelSize
42
43
  },
43
44
  // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
44
45
  label: {
45
46
  type: [String, Number],
46
- default: uni.$u.props.radio.label
47
+ default: defprops.radio.label
47
48
  },
48
49
  // 整体的大小
49
50
  size: {
50
51
  type: [String, Number],
51
- default: uni.$u.props.radio.size
52
+ default: defprops.radio.size
52
53
  },
53
54
  // 图标颜色
54
55
  color: {
55
56
  type: String,
56
- default: uni.$u.props.radio.color
57
+ default: defprops.radio.color
57
58
  },
58
59
  // label的颜色
59
60
  labelColor: {
60
61
  type: String,
61
- default: uni.$u.props.radio.labelColor
62
+ default: defprops.radio.labelColor
62
63
  }
63
64
  }
64
65
  }
@@ -34,6 +34,8 @@
34
34
 
35
35
  <script>
36
36
  import props from './props.js';
37
+ import mpMixin from '../../libs/mixin/mpMixin.js';
38
+ import mixin from '../../libs/mixin/mixin.js';
37
39
  /**
38
40
  * radio 单选框
39
41
  * @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配u-radio-group使用
@@ -58,7 +60,7 @@
58
60
  export default {
59
61
  name: "u-radio",
60
62
 
61
- mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
63
+ mixins: [mpMixin, mixin,props],
62
64
  data() {
63
65
  return {
64
66
  checked: false,
@@ -1,93 +1,94 @@
1
+ import defprops from '../../libs/config/props';
1
2
  export default {
2
3
  props: {
3
4
  // #ifdef VUE3
4
5
  // 绑定的值
5
6
  modelValue: {
6
7
  type: [String, Number, Boolean],
7
- default: uni.$u.props.radioGroup.value
8
+ default: defprops.radioGroup.value
8
9
  },
9
10
  // #endif
10
11
  // #ifdef VUE2
11
12
  // 绑定的值
12
13
  value: {
13
14
  type: [String, Number, Boolean],
14
- default: uni.$u.props.radioGroup.value
15
+ default: defprops.radioGroup.value
15
16
  },
16
17
  // #endif
17
18
  // 是否禁用全部radio
18
19
  disabled: {
19
20
  type: Boolean,
20
- default: uni.$u.props.radioGroup.disabled
21
+ default: defprops.radioGroup.disabled
21
22
  },
22
23
  // 形状,circle-圆形,square-方形
23
24
  shape: {
24
25
  type: String,
25
- default: uni.$u.props.radioGroup.shape
26
+ default: defprops.radioGroup.shape
26
27
  },
27
28
  // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
28
29
  activeColor: {
29
30
  type: String,
30
- default: uni.$u.props.radioGroup.activeColor
31
+ default: defprops.radioGroup.activeColor
31
32
  },
32
33
  // 未选中的颜色
33
34
  inactiveColor: {
34
35
  type: String,
35
- default: uni.$u.props.radioGroup.inactiveColor
36
+ default: defprops.radioGroup.inactiveColor
36
37
  },
37
38
  // 标识符
38
39
  name: {
39
40
  type: String,
40
- default: uni.$u.props.radioGroup.name
41
+ default: defprops.radioGroup.name
41
42
  },
42
43
  // 整个组件的尺寸,默认px
43
44
  size: {
44
45
  type: [String, Number],
45
- default: uni.$u.props.radioGroup.size
46
+ default: defprops.radioGroup.size
46
47
  },
47
48
  // 布局方式,row-横向,column-纵向
48
49
  placement: {
49
50
  type: String,
50
- default: uni.$u.props.radioGroup.placement
51
+ default: defprops.radioGroup.placement
51
52
  },
52
53
  // label的文本
53
54
  label: {
54
55
  type: [String],
55
- default: uni.$u.props.radioGroup.label
56
+ default: defprops.radioGroup.label
56
57
  },
57
58
  // label的颜色 (默认 '#303133' )
58
59
  labelColor: {
59
60
  type: [String],
60
- default: uni.$u.props.radioGroup.labelColor
61
+ default: defprops.radioGroup.labelColor
61
62
  },
62
63
  // label的字体大小,px单位
63
64
  labelSize: {
64
65
  type: [String, Number],
65
- default: uni.$u.props.radioGroup.labelSize
66
+ default: defprops.radioGroup.labelSize
66
67
  },
67
68
  // 是否禁止点击文本操作checkbox(默认 false )
68
69
  labelDisabled: {
69
70
  type: Boolean,
70
- default: uni.$u.props.radioGroup.labelDisabled
71
+ default: defprops.radioGroup.labelDisabled
71
72
  },
72
73
  // 图标颜色
73
74
  iconColor: {
74
75
  type: String,
75
- default: uni.$u.props.radioGroup.iconColor
76
+ default: defprops.radioGroup.iconColor
76
77
  },
77
78
  // 图标的大小,单位px
78
79
  iconSize: {
79
80
  type: [String, Number],
80
- default: uni.$u.props.radioGroup.iconSize
81
+ default: defprops.radioGroup.iconSize
81
82
  },
82
83
  // 竖向配列时,是否显示下划线
83
84
  borderBottom: {
84
85
  type: Boolean,
85
- default: uni.$u.props.radioGroup.borderBottom
86
+ default: defprops.radioGroup.borderBottom
86
87
  },
87
88
  // 图标与文字的对齐方式
88
89
  iconPlacement: {
89
90
  type: String,
90
- default: uni.$u.props.radio.iconPlacement
91
+ default: defprops.radio.iconPlacement
91
92
  }
92
93
  }
93
94
  }
@@ -9,6 +9,8 @@
9
9
 
10
10
  <script>
11
11
  import props from './props.js';
12
+ import mpMixin from '../../libs/mixin/mpMixin.js';
13
+ import mixin from '../../libs/mixin/mixin.js';
12
14
 
13
15
  /**
14
16
  * radioRroup 单选框父组件
@@ -36,7 +38,7 @@
36
38
  */
37
39
  export default {
38
40
  name: 'u-radio-group',
39
- mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
41
+ mixins: [mpMixin, mixin, props],
40
42
  computed: {
41
43
  // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
42
44
  // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)