uview-plus 3.1.42 → 3.1.47

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 (142) hide show
  1. package/changelog.md +15 -0
  2. package/components/u-action-sheet/props.js +10 -11
  3. package/components/u-album/props.js +11 -12
  4. package/components/u-alert/props.js +8 -9
  5. package/components/u-avatar/props.js +14 -15
  6. package/components/u-avatar-group/props.js +9 -10
  7. package/components/u-back-top/props.js +10 -11
  8. package/components/u-badge/props.js +14 -15
  9. package/components/u-button/props.js +28 -29
  10. package/components/u-calendar/month.vue +1 -1
  11. package/components/u-calendar/props.js +27 -28
  12. package/components/u-car-keyboard/props.js +0 -1
  13. package/components/u-cell/props.js +17 -18
  14. package/components/u-cell/u-cell.vue +12 -7
  15. package/components/u-cell-group/props.js +2 -3
  16. package/components/u-checkbox/props.js +13 -14
  17. package/components/u-checkbox-group/props.js +16 -17
  18. package/components/u-circle-progress/props.js +1 -2
  19. package/components/u-code/props.js +6 -7
  20. package/components/u-code/u-code.vue +5 -0
  21. package/components/u-code-input/props.js +16 -17
  22. package/components/u-col/props.js +5 -6
  23. package/components/u-collapse/props.js +3 -4
  24. package/components/u-collapse-item/props.js +11 -12
  25. package/components/u-collapse-item/u-collapse-item.vue +6 -11
  26. package/components/u-column-notice/props.js +10 -11
  27. package/components/u-count-down/props.js +4 -5
  28. package/components/u-count-down/u-count-down.vue +5 -0
  29. package/components/u-count-to/props.js +11 -12
  30. package/components/u-datetime-picker/props.js +24 -25
  31. package/components/u-divider/props.js +8 -9
  32. package/components/u-dropdown/props.js +0 -1
  33. package/components/u-dropdown-item/props.js +0 -1
  34. package/components/u-empty/props.js +11 -12
  35. package/components/u-form/props.js +8 -9
  36. package/components/u-form/u-form.vue +1 -1
  37. package/components/u-form-item/props.js +13 -9
  38. package/components/u-form-item/u-form-item.vue +1 -0
  39. package/components/u-gap/props.js +4 -5
  40. package/components/u-grid/props.js +3 -4
  41. package/components/u-grid-item/props.js +2 -3
  42. package/components/u-grid-item/u-grid-item.vue +5 -0
  43. package/components/u-icon/props.js +17 -18
  44. package/components/u-icon/u-icon.vue +9 -6
  45. package/components/u-image/props.js +16 -17
  46. package/components/u-index-anchor/props.js +5 -6
  47. package/components/u-index-item/props.js +0 -1
  48. package/components/u-index-list/props.js +5 -6
  49. package/components/u-index-list/u-index-list.vue +2 -1
  50. package/components/u-input/props.js +35 -36
  51. package/components/u-input/u-input.vue +4 -4
  52. package/components/u-keyboard/props.js +16 -17
  53. package/components/u-line/props.js +6 -7
  54. package/components/u-line-progress/props.js +5 -6
  55. package/components/u-link/props.js +7 -8
  56. package/components/u-list/props.js +14 -15
  57. package/components/u-list-item/props.js +1 -2
  58. package/components/u-loading-icon/props.js +11 -12
  59. package/components/u-loading-page/props.js +9 -10
  60. package/components/u-loadmore/props.js +18 -19
  61. package/components/u-modal/props.js +16 -17
  62. package/components/u-navbar/props.js +16 -17
  63. package/components/u-no-network/props.js +3 -4
  64. package/components/u-notice-bar/props.js +13 -14
  65. package/components/u-notify/props.js +9 -10
  66. package/components/u-notify/u-notify.vue +5 -0
  67. package/components/u-number-box/props.js +22 -23
  68. package/components/u-number-keyboard/props.js +3 -4
  69. package/components/u-overlay/props.js +4 -5
  70. package/components/u-parse/props.js +8 -9
  71. package/components/u-parse/u-parse.vue +6 -1
  72. package/components/u-picker/props.js +16 -17
  73. package/components/u-picker-column/props.js +0 -1
  74. package/components/u-popup/props.js +15 -16
  75. package/components/u-radio/props.js +13 -14
  76. package/components/u-radio-group/props.js +17 -18
  77. package/components/u-rate/props.js +14 -15
  78. package/components/u-read-more/props.js +8 -9
  79. package/components/u-row/props.js +3 -4
  80. package/components/u-row-notice/props.js +7 -8
  81. package/components/u-row-notice/u-row-notice.vue +5 -0
  82. package/components/u-safe-bottom/props.js +0 -1
  83. package/components/u-scroll-list/props.js +6 -7
  84. package/components/u-search/props.js +24 -25
  85. package/components/u-skeleton/props.js +11 -12
  86. package/components/u-slider/props.js +11 -12
  87. package/components/u-status-bar/props.js +1 -2
  88. package/components/u-steps/props.js +7 -8
  89. package/components/u-steps-item/props.js +4 -5
  90. package/components/u-sticky/props.js +6 -7
  91. package/components/u-sticky/u-sticky.vue +5 -0
  92. package/components/u-subsection/props.js +9 -10
  93. package/components/u-swipe-action/props.js +1 -2
  94. package/components/u-swipe-action-item/nvue.js +5 -0
  95. package/components/u-swipe-action-item/other.js +2 -2
  96. package/components/u-swipe-action-item/props.js +6 -7
  97. package/components/u-swipe-action-item/u-swipe-action-item.vue +5 -12
  98. package/components/u-swiper/props.js +24 -25
  99. package/components/u-swiper-indicator/props.js +5 -6
  100. package/components/u-switch/props.js +11 -12
  101. package/components/u-tabbar/props.js +8 -9
  102. package/components/u-tabbar-item/props.js +6 -7
  103. package/components/u-table/props.js +0 -1
  104. package/components/u-tabs/props.js +12 -13
  105. package/components/u-tabs-item/props.js +0 -1
  106. package/components/u-tag/props.js +15 -16
  107. package/components/u-td/props.js +0 -1
  108. package/components/u-text/props.js +21 -22
  109. package/components/u-text/u-text.vue +2 -2
  110. package/components/u-textarea/props.js +23 -24
  111. package/components/u-toast/u-toast.vue +5 -0
  112. package/components/u-toolbar/props.js +6 -7
  113. package/components/u-tooltip/props.js +11 -12
  114. package/components/u-tr/props.js +0 -1
  115. package/components/u-transition/props.js +4 -5
  116. package/components/u-transition/transition.js +8 -9
  117. package/components/u-upload/props.js +22 -23
  118. package/libs/config/props/actionSheet.js +1 -1
  119. package/libs/config/props/album.js +1 -1
  120. package/libs/config/props/avatarGroup.js +1 -1
  121. package/libs/config/props/backtop.js +2 -2
  122. package/libs/config/props/badge.js +1 -1
  123. package/libs/config/props/calendar.js +3 -3
  124. package/libs/config/props/checkboxGroup.js +1 -1
  125. package/libs/config/props/datetimePicker.js +1 -1
  126. package/libs/config/props/form.js +3 -3
  127. package/libs/config/props/formItem.js +1 -0
  128. package/libs/config/props/indexList.js +1 -1
  129. package/libs/config/props/noticeBar.js +1 -1
  130. package/libs/config/props/picker.js +2 -2
  131. package/libs/config/props/popup.js +1 -1
  132. package/libs/config/props/search.js +2 -2
  133. package/libs/config/props/slider.js +1 -1
  134. package/libs/config/props/swiper.js +1 -1
  135. package/libs/config/props/tabs.js +7 -7
  136. package/libs/config/props/text.js +2 -2
  137. package/libs/config/props/toast.js +1 -1
  138. package/libs/config/props/tooltip.js +1 -1
  139. package/libs/config/props/upload.js +3 -3
  140. package/libs/css/components.scss +11 -1
  141. package/libs/css/flex.scss +41 -39
  142. package/package.json +1 -1
@@ -1,120 +1,119 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 输入框的内容
5
4
  value: {
6
5
  type: [String, Number],
7
- default: defprops.textarea.value
6
+ default: () => uni.$u.props.textarea.value
8
7
  },
9
8
  // 输入框的内容
10
9
  modelValue: {
11
10
  type: [String, Number],
12
- default: defprops.textarea.value
11
+ default: () => uni.$u.props.textarea.value
13
12
  },
14
13
  // 输入框为空时占位符
15
14
  placeholder: {
16
15
  type: [String, Number],
17
- default: defprops.textarea.placeholder
16
+ default: () => uni.$u.props.textarea.placeholder
18
17
  },
19
18
  // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
20
19
  placeholderClass: {
21
20
  type: String,
22
- default: defprops.input.placeholderClass
21
+ default: () => uni.$u.props.input.placeholderClass
23
22
  },
24
23
  // 指定placeholder的样式
25
24
  placeholderStyle: {
26
25
  type: [String, Object],
27
- default: defprops.input.placeholderStyle
26
+ default: () => uni.$u.props.input.placeholderStyle
28
27
  },
29
28
  // 输入框高度
30
29
  height: {
31
30
  type: [String, Number],
32
- default: defprops.textarea.height
31
+ default: () => uni.$u.props.textarea.height
33
32
  },
34
33
  // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
35
34
  confirmType: {
36
35
  type: String,
37
- default: defprops.textarea.confirmType
36
+ default: () => uni.$u.props.textarea.confirmType
38
37
  },
39
38
  // 是否禁用
40
39
  disabled: {
41
40
  type: Boolean,
42
- default: defprops.textarea.disabled
41
+ default: () => uni.$u.props.textarea.disabled
43
42
  },
44
43
  // 是否显示统计字数
45
44
  count: {
46
45
  type: Boolean,
47
- default: defprops.textarea.count
46
+ default: () => uni.$u.props.textarea.count
48
47
  },
49
48
  // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
50
49
  focus: {
51
50
  type: Boolean,
52
- default: defprops.textarea.focus
51
+ default: () => uni.$u.props.textarea.focus
53
52
  },
54
53
  // 是否自动增加高度
55
54
  autoHeight: {
56
55
  type: Boolean,
57
- default: defprops.textarea.autoHeight
56
+ default: () => uni.$u.props.textarea.autoHeight
58
57
  },
59
58
  // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
60
59
  fixed: {
61
60
  type: Boolean,
62
- default: defprops.textarea.fixed
61
+ default: () => uni.$u.props.textarea.fixed
63
62
  },
64
63
  // 指定光标与键盘的距离
65
64
  cursorSpacing: {
66
65
  type: Number,
67
- default: defprops.textarea.cursorSpacing
66
+ default: () => uni.$u.props.textarea.cursorSpacing
68
67
  },
69
68
  // 指定focus时的光标位置
70
69
  cursor: {
71
70
  type: [String, Number],
72
- default: defprops.textarea.cursor
71
+ default: () => uni.$u.props.textarea.cursor
73
72
  },
74
73
  // 是否显示键盘上方带有”完成“按钮那一栏,
75
74
  showConfirmBar: {
76
75
  type: Boolean,
77
- default: defprops.textarea.showConfirmBar
76
+ default: () => uni.$u.props.textarea.showConfirmBar
78
77
  },
79
78
  // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
80
79
  selectionStart: {
81
80
  type: Number,
82
- default: defprops.textarea.selectionStart
81
+ default: () => uni.$u.props.textarea.selectionStart
83
82
  },
84
83
  // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
85
84
  selectionEnd: {
86
85
  type: Number,
87
- default: defprops.textarea.selectionEnd
86
+ default: () => uni.$u.props.textarea.selectionEnd
88
87
  },
89
88
  // 键盘弹起时,是否自动上推页面
90
89
  adjustPosition: {
91
90
  type: Boolean,
92
- default: defprops.textarea.adjustPosition
91
+ default: () => uni.$u.props.textarea.adjustPosition
93
92
  },
94
93
  // 是否去掉 iOS 下的默认内边距,只微信小程序有效
95
94
  disableDefaultPadding: {
96
95
  type: Boolean,
97
- default: defprops.textarea.disableDefaultPadding
96
+ default: () => uni.$u.props.textarea.disableDefaultPadding
98
97
  },
99
98
  // focus时,点击页面的时候不收起键盘,只微信小程序有效
100
99
  holdKeyboard: {
101
100
  type: Boolean,
102
- default: defprops.textarea.holdKeyboard
101
+ default: () => uni.$u.props.textarea.holdKeyboard
103
102
  },
104
103
  // 最大输入长度,设置为 -1 的时候不限制最大长度
105
104
  maxlength: {
106
105
  type: [String, Number],
107
- default: defprops.textarea.maxlength
106
+ default: () => uni.$u.props.textarea.maxlength
108
107
  },
109
108
  // 边框类型,surround-四周边框,bottom-底部边框
110
109
  border: {
111
110
  type: String,
112
- default: defprops.textarea.border
111
+ default: () => uni.$u.props.textarea.border
113
112
  },
114
113
  // 用于处理或者过滤输入框内容的方法
115
114
  formatter: {
116
115
  type: [Function, null],
117
- default: defprops.textarea.formatter
116
+ default: () => uni.$u.props.textarea.formatter
118
117
  },
119
118
  // 是否忽略组件内对文本合成系统事件的处理
120
119
  ignoreCompositionEvent: {
@@ -175,7 +175,12 @@
175
175
  this.timer = null
176
176
  }
177
177
  },
178
+ // #ifdef VUE2
178
179
  beforeDestroy() {
180
+ // #endif
181
+ // #ifdef VUE3
182
+ beforeUnmount() {
183
+ // #endif
179
184
  this.clearTimer()
180
185
  }
181
186
  }
@@ -1,35 +1,34 @@
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.toolbar.show
6
+ default: () => uni.$u.props.toolbar.show
8
7
  },
9
8
  // 取消按钮的文字
10
9
  cancelText: {
11
10
  type: String,
12
- default: defprops.toolbar.cancelText
11
+ default: () => uni.$u.props.toolbar.cancelText
13
12
  },
14
13
  // 确认按钮的文字
15
14
  confirmText: {
16
15
  type: String,
17
- default: defprops.toolbar.confirmText
16
+ default: () => uni.$u.props.toolbar.confirmText
18
17
  },
19
18
  // 取消按钮的颜色
20
19
  cancelColor: {
21
20
  type: String,
22
- default: defprops.toolbar.cancelColor
21
+ default: () => uni.$u.props.toolbar.cancelColor
23
22
  },
24
23
  // 确认按钮的颜色
25
24
  confirmColor: {
26
25
  type: String,
27
- default: defprops.toolbar.confirmColor
26
+ default: () => uni.$u.props.toolbar.confirmColor
28
27
  },
29
28
  // 标题文字
30
29
  title: {
31
30
  type: String,
32
- default: defprops.toolbar.title
31
+ default: () => uni.$u.props.toolbar.title
33
32
  }
34
33
  }
35
34
  }
@@ -1,60 +1,59 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 需要显示的提示文字
5
4
  text: {
6
5
  type: [String, Number],
7
- default: defprops.tooltip.text
6
+ default: () => uni.$u.props.tooltip.text
8
7
  },
9
8
  // 点击复制按钮时,复制的文本,为空则使用text值
10
9
  copyText: {
11
10
  type: [String, Number],
12
- default: defprops.tooltip.copyText
11
+ default: () => uni.$u.props.tooltip.copyText
13
12
  },
14
13
  // 文本大小
15
14
  size: {
16
15
  type: [String, Number],
17
- default: defprops.tooltip.size
16
+ default: () => uni.$u.props.tooltip.size
18
17
  },
19
18
  // 字体颜色
20
19
  color: {
21
20
  type: String,
22
- default: defprops.tooltip.color
21
+ default: () => uni.$u.props.tooltip.color
23
22
  },
24
23
  // 弹出提示框时,文本的背景色
25
24
  bgColor: {
26
25
  type: String,
27
- default: defprops.tooltip.bgColor
26
+ default: () => uni.$u.props.tooltip.bgColor
28
27
  },
29
28
  // 弹出提示的方向,top-上方,bottom-下方
30
29
  direction: {
31
30
  type: String,
32
- default: defprops.tooltip.direction
31
+ default: () => uni.$u.props.tooltip.direction
33
32
  },
34
33
  // 弹出提示的z-index,nvue无效
35
34
  zIndex: {
36
35
  type: [String, Number],
37
- default: defprops.tooltip.zIndex
36
+ default: () => uni.$u.props.tooltip.zIndex
38
37
  },
39
38
  // 是否显示复制按钮
40
39
  showCopy: {
41
40
  type: Boolean,
42
- default: defprops.tooltip.showCopy
41
+ default: () => uni.$u.props.tooltip.showCopy
43
42
  },
44
43
  // 扩展的按钮组
45
44
  buttons: {
46
45
  type: Array,
47
- default: defprops.tooltip.buttons
46
+ default: () => uni.$u.props.tooltip.buttons
48
47
  },
49
48
  // 是否显示透明遮罩以防止触摸穿透
50
49
  overlay: {
51
50
  type: Boolean,
52
- default: defprops.tooltip.overlay
51
+ default: () => uni.$u.props.tooltip.overlay
53
52
  },
54
53
  // 是否显示复制成功或者失败的toast
55
54
  showToast: {
56
55
  type: Boolean,
57
- default: defprops.tooltip.showToast
56
+ default: () => uni.$u.props.tooltip.showToast
58
57
  }
59
58
  }
60
59
  }
@@ -1,4 +1,3 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
 
@@ -1,25 +1,24 @@
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.transition.show
6
+ default: () => uni.$u.props.transition.show
8
7
  },
9
8
  // 使用的动画模式
10
9
  mode: {
11
10
  type: String,
12
- default: defprops.transition.mode
11
+ default: () => uni.$u.props.transition.mode
13
12
  },
14
13
  // 动画的执行时间,单位ms
15
14
  duration: {
16
15
  type: [String, Number],
17
- default: defprops.transition.duration
16
+ default: () => uni.$u.props.transition.duration
18
17
  },
19
18
  // 使用的动画过渡函数
20
19
  timingFunction: {
21
20
  type: String,
22
- default: defprops.transition.timingFunction
21
+ default: () => uni.$u.props.transition.timingFunction
23
22
  }
24
23
  }
25
24
  }
@@ -1,8 +1,8 @@
1
1
  // 定义一个一定时间后自动成功的promise,让调用nextTick方法处,进入下一个then方法
2
2
  const waitTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 50))
3
3
  // nvue动画模块实现细节抽离在外部文件
4
- // #ifdef APP-NVUE
5
- import animationMap from './nvue-ani-map.js'
4
+ // #ifdef APP-NVUE
5
+ import animationMap from './nvue-ani-map.js'
6
6
  // #endif
7
7
 
8
8
  // #ifndef APP-NVUE
@@ -20,8 +20,8 @@ const getClassNames = (name) => ({
20
20
  // https://weex.apache.org/zh/docs/modules/animation.html#transition
21
21
  const animation = uni.requireNativePlugin('animation')
22
22
  const getStyle = (name) => animationMap[name]
23
- // #endif
24
-
23
+ // #endif
24
+
25
25
  import { nextTick } from 'vue'
26
26
 
27
27
  export default {
@@ -41,11 +41,10 @@ export default {
41
41
  this.inited = true
42
42
  this.display = true
43
43
  this.classes = classNames.enter
44
- await nextTick();
44
+ await nextTick();
45
45
  {
46
- // #ifdef H5
46
+ // https://github.com/umicro/uView2.0/issues/545
47
47
  await uni.$u.sleep(20)
48
- // #endif
49
48
  // 标识动画尚未结束
50
49
  this.$emit('enter')
51
50
  this.transitionEnded = false
@@ -66,7 +65,7 @@ export default {
66
65
  // 获得类名
67
66
  this.classes = classNames.leave
68
67
 
69
- await nextTick();
68
+ await nextTick();
70
69
  {
71
70
  // 动画正在离场的状态
72
71
  this.transitionEnded = false
@@ -94,7 +93,7 @@ export default {
94
93
  opacity: 0
95
94
  }
96
95
  // 等待弹窗内容渲染完成
97
- await nextTick();
96
+ await nextTick();
98
97
  {
99
98
  // 合并样式
100
99
  this.viewStyle = currentStyle.enter
@@ -1,45 +1,44 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 接受的文件类型, 可选值为all media image file video
5
4
  accept: {
6
5
  type: String,
7
- default: defprops.upload.accept
6
+ default: () => uni.$u.props.upload.accept
8
7
  },
9
8
  // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
10
9
  capture: {
11
10
  type: [String, Array],
12
- default: defprops.upload.capture
11
+ default: () => uni.$u.props.upload.capture
13
12
  },
14
13
  // 当accept为video时生效,是否压缩视频,默认为true
15
14
  compressed: {
16
15
  type: Boolean,
17
- default: defprops.upload.compressed
16
+ default: () => uni.$u.props.upload.compressed
18
17
  },
19
18
  // 当accept为video时生效,可选值为back或front
20
19
  camera: {
21
20
  type: String,
22
- default: defprops.upload.camera
21
+ default: () => uni.$u.props.upload.camera
23
22
  },
24
23
  // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
25
24
  maxDuration: {
26
25
  type: Number,
27
- default: defprops.upload.maxDuration
26
+ default: () => uni.$u.props.upload.maxDuration
28
27
  },
29
28
  // 上传区域的图标,只能内置图标
30
29
  uploadIcon: {
31
30
  type: String,
32
- default: defprops.upload.uploadIcon
31
+ default: () => uni.$u.props.upload.uploadIcon
33
32
  },
34
33
  // 上传区域的图标的颜色,默认
35
34
  uploadIconColor: {
36
35
  type: String,
37
- default: defprops.upload.uploadIconColor
36
+ default: () => uni.$u.props.upload.uploadIconColor
38
37
  },
39
38
  // 是否开启文件读取前事件
40
39
  useBeforeRead: {
41
40
  type: Boolean,
42
- default: defprops.upload.useBeforeRead
41
+ default: () => uni.$u.props.upload.useBeforeRead
43
42
  },
44
43
  // 读取后的处理函数
45
44
  afterRead: {
@@ -54,72 +53,72 @@ export default {
54
53
  // 是否显示组件自带的图片预览功能
55
54
  previewFullImage: {
56
55
  type: Boolean,
57
- default: defprops.upload.previewFullImage
56
+ default: () => uni.$u.props.upload.previewFullImage
58
57
  },
59
58
  // 最大上传数量
60
59
  maxCount: {
61
60
  type: [String, Number],
62
- default: defprops.upload.maxCount
61
+ default: () => uni.$u.props.upload.maxCount
63
62
  },
64
63
  // 是否启用
65
64
  disabled: {
66
65
  type: Boolean,
67
- default: defprops.upload.disabled
66
+ default: () => uni.$u.props.upload.disabled
68
67
  },
69
68
  // 预览上传的图片时的裁剪模式,和image组件mode属性一致
70
69
  imageMode: {
71
70
  type: String,
72
- default: defprops.upload.imageMode
71
+ default: () => uni.$u.props.upload.imageMode
73
72
  },
74
73
  // 标识符,可以在回调函数的第二项参数中获取
75
74
  name: {
76
75
  type: String,
77
- default: defprops.upload.name
76
+ default: () => uni.$u.props.upload.name
78
77
  },
79
78
  // 所选的图片的尺寸, 可选值为original compressed
80
79
  sizeType: {
81
80
  type: Array,
82
- default: defprops.upload.sizeType
81
+ default: () => uni.$u.props.upload.sizeType
83
82
  },
84
83
  // 是否开启图片多选,部分安卓机型不支持
85
84
  multiple: {
86
85
  type: Boolean,
87
- default: defprops.upload.multiple
86
+ default: () => uni.$u.props.upload.multiple
88
87
  },
89
88
  // 是否展示删除按钮
90
89
  deletable: {
91
90
  type: Boolean,
92
- default: defprops.upload.deletable
91
+ default: () => uni.$u.props.upload.deletable
93
92
  },
94
93
  // 文件大小限制,单位为byte
95
94
  maxSize: {
96
95
  type: [String, Number],
97
- default: defprops.upload.maxSize
96
+ default: () => uni.$u.props.upload.maxSize
98
97
  },
99
98
  // 显示已上传的文件列表
100
99
  fileList: {
101
100
  type: Array,
102
- default: defprops.upload.fileList
101
+ default: () => uni.$u.props.upload.fileList
103
102
  },
104
103
  // 上传区域的提示文字
105
104
  uploadText: {
106
105
  type: String,
107
- default: defprops.upload.uploadText
106
+ default: () => uni.$u.props.upload.uploadText
108
107
  },
109
108
  // 内部预览图片区域和选择图片按钮的区域宽度
110
109
  width: {
111
110
  type: [String, Number],
112
- default: defprops.upload.width
111
+ default: () => uni.$u.props.upload.width
113
112
  },
114
113
  // 内部预览图片区域和选择图片按钮的区域高度
115
114
  height: {
116
115
  type: [String, Number],
117
- default: defprops.upload.height
116
+ default: () => uni.$u.props.upload.height
118
117
  },
119
118
  // 是否在上传完成后展示预览图
120
119
  previewImage: {
121
120
  type: Boolean,
122
- default: defprops.upload.previewImage
121
+ default: () => uni.$u.props.upload.previewImage
123
122
  }
124
123
  }
125
124
  }
@@ -13,7 +13,7 @@ export default {
13
13
  show: false,
14
14
  title: '',
15
15
  description: '',
16
- actions: () => [],
16
+ actions: [],
17
17
  index: '',
18
18
  cancelText: '',
19
19
  closeOnClickAction: true,
@@ -10,7 +10,7 @@
10
10
  export default {
11
11
  // album 组件
12
12
  album: {
13
- urls: () => [],
13
+ urls: [],
14
14
  keyName: '',
15
15
  singleSize: 180,
16
16
  multipleSize: 70,
@@ -10,7 +10,7 @@
10
10
  export default {
11
11
  // avatarGroup 组件
12
12
  avatarGroup: {
13
- urls: () => [],
13
+ urls: [],
14
14
  maxCount: 5,
15
15
  shape: 'circle',
16
16
  mode: 'scaleToFill',
@@ -19,9 +19,9 @@ export default {
19
19
  bottom: 100,
20
20
  right: 20,
21
21
  zIndex: 9,
22
- iconStyle: () => ({
22
+ iconStyle: {
23
23
  color: '#909399',
24
24
  fontSize: '19px'
25
- })
25
+ }
26
26
  }
27
27
  }
@@ -20,7 +20,7 @@ export default {
20
20
  color: null,
21
21
  shape: 'circle',
22
22
  numberType: 'overflow',
23
- offset: () => [],
23
+ offset: [],
24
24
  inverted: false,
25
25
  absolute: false
26
26
  }
@@ -16,7 +16,7 @@ export default {
16
16
  mode: 'single',
17
17
  startText: '开始',
18
18
  endText: '结束',
19
- customList: () => [],
19
+ customList: [],
20
20
  color: '#3c9cff',
21
21
  minDate: 0,
22
22
  maxDate: 0,
@@ -35,8 +35,8 @@ export default {
35
35
  maxRange: Number.MAX_SAFE_INTEGER, // Infinity
36
36
  rangePrompt: '',
37
37
  showRangePrompt: true,
38
- allowSameDay: false,
39
- round: 0,
38
+ allowSameDay: false,
39
+ round: 0,
40
40
  monthNum: 3
41
41
  }
42
42
  }
@@ -11,7 +11,7 @@ export default {
11
11
  // checkbox-group组件
12
12
  checkboxGroup: {
13
13
  name: '',
14
- value: () => [],
14
+ value: [],
15
15
  shape: 'square',
16
16
  disabled: false,
17
17
  activeColor: '#2979ff',
@@ -32,6 +32,6 @@ export default {
32
32
  confirmColor: '#3c9cff',
33
33
  visibleItemCount: 5,
34
34
  closeOnClickOverlay: false,
35
- defaultIndex: () => []
35
+ defaultIndex: []
36
36
  }
37
37
  }
@@ -10,13 +10,13 @@
10
10
  export default {
11
11
  // form 组件
12
12
  form: {
13
- model: () => ({}),
14
- rules: () => ({}),
13
+ model: {},
14
+ rules: {},
15
15
  errorType: 'message',
16
16
  borderBottom: true,
17
17
  labelPosition: 'left',
18
18
  labelWidth: 45,
19
19
  labelAlign: 'left',
20
- labelStyle: () => ({})
20
+ labelStyle: {}
21
21
  }
22
22
  }
@@ -12,6 +12,7 @@ export default {
12
12
  formItem: {
13
13
  label: '',
14
14
  prop: '',
15
+ rule: '',
15
16
  borderBottom: '',
16
17
  labelWidth: '',
17
18
  rightIcon: '',
@@ -12,7 +12,7 @@ export default {
12
12
  indexList: {
13
13
  inactiveColor: '#606266',
14
14
  activeColor: '#5677fc',
15
- indexList: () => [],
15
+ indexList: [],
16
16
  sticky: true,
17
17
  customNavHeight: 0
18
18
  }
@@ -10,7 +10,7 @@
10
10
  export default {
11
11
  // noticeBar
12
12
  noticeBar: {
13
- text: () => [],
13
+ text: [],
14
14
  direction: 'row',
15
15
  step: false,
16
16
  icon: 'volume',
@@ -14,7 +14,7 @@ export default {
14
14
  popupMode: 'bottom',
15
15
  showToolbar: true,
16
16
  title: '',
17
- columns: () => [],
17
+ columns: [],
18
18
  loading: false,
19
19
  itemHeight: 44,
20
20
  cancelText: '取消',
@@ -24,7 +24,7 @@ export default {
24
24
  visibleItemCount: 5,
25
25
  keyName: 'text',
26
26
  closeOnClickOverlay: false,
27
- defaultIndex: () => [],
27
+ defaultIndex: [],
28
28
  immediateChange: false
29
29
  }
30
30
  }