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
@@ -7,156 +7,155 @@
7
7
  * @lastTime : 2021-08-16 10:04:24
8
8
  * @FilePath : /u-view2.0/uview-ui/components/u-button/props.js
9
9
  */
10
- import defprops from '../../libs/config/props';
11
10
  export default {
12
11
  props: {
13
12
  // 是否细边框
14
13
  hairline: {
15
14
  type: Boolean,
16
- default: defprops.button.hairline
15
+ default: () => uni.$u.props.button.hairline
17
16
  },
18
17
  // 按钮的预置样式,info,primary,error,warning,success
19
18
  type: {
20
19
  type: String,
21
- default: defprops.button.type
20
+ default: () => uni.$u.props.button.type
22
21
  },
23
22
  // 按钮尺寸,large,normal,small,mini
24
23
  size: {
25
24
  type: String,
26
- default: defprops.button.size
25
+ default: () => uni.$u.props.button.size
27
26
  },
28
27
  // 按钮形状,circle(两边为半圆),square(带圆角)
29
28
  shape: {
30
29
  type: String,
31
- default: defprops.button.shape
30
+ default: () => uni.$u.props.button.shape
32
31
  },
33
32
  // 按钮是否镂空
34
33
  plain: {
35
34
  type: Boolean,
36
- default: defprops.button.plain
35
+ default: () => uni.$u.props.button.plain
37
36
  },
38
37
  // 是否禁止状态
39
38
  disabled: {
40
39
  type: Boolean,
41
- default: defprops.button.disabled
40
+ default: () => uni.$u.props.button.disabled
42
41
  },
43
42
  // 是否加载中
44
43
  loading: {
45
44
  type: Boolean,
46
- default: defprops.button.loading
45
+ default: () => uni.$u.props.button.loading
47
46
  },
48
47
  // 加载中提示文字
49
48
  loadingText: {
50
49
  type: [String, Number],
51
- default: defprops.button.loadingText
50
+ default: () => uni.$u.props.button.loadingText
52
51
  },
53
52
  // 加载状态图标类型
54
53
  loadingMode: {
55
54
  type: String,
56
- default: defprops.button.loadingMode
55
+ default: () => uni.$u.props.button.loadingMode
57
56
  },
58
57
  // 加载图标大小
59
58
  loadingSize: {
60
59
  type: [String, Number],
61
- default: defprops.button.loadingSize
60
+ default: () => uni.$u.props.button.loadingSize
62
61
  },
63
62
  // 开放能力,具体请看uniapp稳定关于button组件部分说明
64
63
  // https://uniapp.dcloud.io/component/button
65
64
  openType: {
66
65
  type: String,
67
- default: defprops.button.openType
66
+ default: () => uni.$u.props.button.openType
68
67
  },
69
68
  // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
70
69
  // 取值为submit(提交表单),reset(重置表单)
71
70
  formType: {
72
71
  type: String,
73
- default: defprops.button.formType
72
+ default: () => uni.$u.props.button.formType
74
73
  },
75
74
  // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
76
75
  // 只微信小程序、QQ小程序有效
77
76
  appParameter: {
78
77
  type: String,
79
- default: defprops.button.appParameter
78
+ default: () => uni.$u.props.button.appParameter
80
79
  },
81
80
  // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
82
81
  hoverStopPropagation: {
83
82
  type: Boolean,
84
- default: defprops.button.hoverStopPropagation
83
+ default: () => uni.$u.props.button.hoverStopPropagation
85
84
  },
86
85
  // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
87
86
  lang: {
88
87
  type: String,
89
- default: defprops.button.lang
88
+ default: () => uni.$u.props.button.lang
90
89
  },
91
90
  // 会话来源,open-type="contact"时有效。只微信小程序有效
92
91
  sessionFrom: {
93
92
  type: String,
94
- default: defprops.button.sessionFrom
93
+ default: () => uni.$u.props.button.sessionFrom
95
94
  },
96
95
  // 会话内消息卡片标题,open-type="contact"时有效
97
96
  // 默认当前标题,只微信小程序有效
98
97
  sendMessageTitle: {
99
98
  type: String,
100
- default: defprops.button.sendMessageTitle
99
+ default: () => uni.$u.props.button.sendMessageTitle
101
100
  },
102
101
  // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
103
102
  // 默认当前分享路径,只微信小程序有效
104
103
  sendMessagePath: {
105
104
  type: String,
106
- default: defprops.button.sendMessagePath
105
+ default: () => uni.$u.props.button.sendMessagePath
107
106
  },
108
107
  // 会话内消息卡片图片,open-type="contact"时有效
109
108
  // 默认当前页面截图,只微信小程序有效
110
109
  sendMessageImg: {
111
110
  type: String,
112
- default: defprops.button.sendMessageImg
111
+ default: () => uni.$u.props.button.sendMessageImg
113
112
  },
114
113
  // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
115
114
  // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
116
115
  showMessageCard: {
117
116
  type: Boolean,
118
- default: defprops.button.showMessageCard
117
+ default: () => uni.$u.props.button.showMessageCard
119
118
  },
120
119
  // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
121
120
  dataName: {
122
121
  type: String,
123
- default: defprops.button.dataName
122
+ default: () => uni.$u.props.button.dataName
124
123
  },
125
124
  // 节流,一定时间内只能触发一次
126
125
  throttleTime: {
127
126
  type: [String, Number],
128
- default: defprops.button.throttleTime
127
+ default: () => uni.$u.props.button.throttleTime
129
128
  },
130
129
  // 按住后多久出现点击态,单位毫秒
131
130
  hoverStartTime: {
132
131
  type: [String, Number],
133
- default: defprops.button.hoverStartTime
132
+ default: () => uni.$u.props.button.hoverStartTime
134
133
  },
135
134
  // 手指松开后点击态保留时间,单位毫秒
136
135
  hoverStayTime: {
137
136
  type: [String, Number],
138
- default: defprops.button.hoverStayTime
137
+ default: () => uni.$u.props.button.hoverStayTime
139
138
  },
140
139
  // 按钮文字,之所以通过props传入,是因为slot传入的话
141
140
  // nvue中无法控制文字的样式
142
141
  text: {
143
142
  type: [String, Number],
144
- default: defprops.button.text
143
+ default: () => uni.$u.props.button.text
145
144
  },
146
145
  // 按钮图标
147
146
  icon: {
148
147
  type: String,
149
- default: defprops.button.icon
148
+ default: () => uni.$u.props.button.icon
150
149
  },
151
150
  // 按钮图标
152
151
  iconColor: {
153
152
  type: String,
154
- default: defprops.button.icon
153
+ default: () => uni.$u.props.button.icon
155
154
  },
156
155
  // 按钮颜色,支持传入linear-gradient渐变色
157
156
  color: {
158
157
  type: String,
159
- default: defprops.button.color
158
+ default: () => uni.$u.props.button.color
160
159
  }
161
160
  }
162
161
  }
@@ -108,7 +108,7 @@
108
108
  <!-- #endif -->
109
109
  </template>
110
110
 
111
- <script>
111
+ <script lang="ts">
112
112
  import button from "../../libs/mixin/button.js";
113
113
  import openType from "../../libs/mixin/openType.js";
114
114
  import mpMixin from '../../libs/mixin/mpMixin.js';
@@ -275,19 +275,19 @@ export default {
275
275
  }
276
276
  },
277
277
  // 下面为对接uniapp官方按钮开放能力事件回调的对接
278
- getphonenumber(res) {
278
+ getphonenumber(res: any) {
279
279
  this.$emit("getphonenumber", res);
280
280
  },
281
- getuserinfo(res) {
281
+ getuserinfo(res: any) {
282
282
  this.$emit("getuserinfo", res);
283
283
  },
284
- error(res) {
284
+ error(res: any) {
285
285
  this.$emit("error", res);
286
286
  },
287
- opensetting(res) {
287
+ opensetting(res: any) {
288
288
  this.$emit("opensetting", res);
289
289
  },
290
- launchapp(res) {
290
+ launchapp(res: any) {
291
291
  this.$emit("launchapp", res);
292
292
  },
293
293
  },
@@ -14,13 +14,14 @@ $u-button-plain-u-button-success-color:$u-success;
14
14
  $u-button-plain-u-button-error-color:$u-error;
15
15
  $u-button-plain-u-button-warning-color:$u-error;
16
16
 
17
- .u-button {
18
- width: 100%;
19
-
20
- &__text {
21
- white-space: nowrap;
22
- line-height: 1;
23
- }
17
+ .u-button {
18
+ width: 100%;
19
+ white-space: nowrap;
20
+
21
+ &__text {
22
+ white-space: nowrap;
23
+ line-height: 1;
24
+ }
24
25
 
25
26
  &:before {
26
27
  position: absolute;
@@ -103,7 +103,7 @@
103
103
  // 是否为只读状态,只读状态下禁止选择日期
104
104
  readonly: {
105
105
  type: Boolean,
106
- default: defprops.calendar.readonly
106
+ default: () => uni.$u.props.calendar.readonly
107
107
  },
108
108
  // 日期区间最多可选天数,默认无限制,mode = range时有效
109
109
  maxRange: {
@@ -1,140 +1,139 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 日历顶部标题
5
4
  title: {
6
5
  type: String,
7
- default: defprops.calendar.title
6
+ default: () => uni.$u.props.calendar.title
8
7
  },
9
8
  // 是否显示标题
10
9
  showTitle: {
11
10
  type: Boolean,
12
- default: defprops.calendar.showTitle
11
+ default: () => uni.$u.props.calendar.showTitle
13
12
  },
14
13
  // 是否显示副标题
15
14
  showSubtitle: {
16
15
  type: Boolean,
17
- default: defprops.calendar.showSubtitle
16
+ default: () => uni.$u.props.calendar.showSubtitle
18
17
  },
19
18
  // 日期类型选择,single-选择单个日期,multiple-可以选择多个日期,range-选择日期范围
20
19
  mode: {
21
20
  type: String,
22
- default: defprops.calendar.mode
21
+ default: () => uni.$u.props.calendar.mode
23
22
  },
24
23
  // mode=range时,第一个日期底部的提示文字
25
24
  startText: {
26
25
  type: String,
27
- default: defprops.calendar.startText
26
+ default: () => uni.$u.props.calendar.startText
28
27
  },
29
28
  // mode=range时,最后一个日期底部的提示文字
30
29
  endText: {
31
30
  type: String,
32
- default: defprops.calendar.endText
31
+ default: () => uni.$u.props.calendar.endText
33
32
  },
34
33
  // 自定义列表
35
34
  customList: {
36
35
  type: Array,
37
- default: defprops.calendar.customList
36
+ default: () => uni.$u.props.calendar.customList
38
37
  },
39
38
  // 主题色,对底部按钮和选中日期有效
40
39
  color: {
41
40
  type: String,
42
- default: defprops.calendar.color
41
+ default: () => uni.$u.props.calendar.color
43
42
  },
44
43
  // 最小的可选日期
45
44
  minDate: {
46
45
  type: [String, Number],
47
- default: defprops.calendar.minDate
46
+ default: () => uni.$u.props.calendar.minDate
48
47
  },
49
48
  // 最大可选日期
50
49
  maxDate: {
51
50
  type: [String, Number],
52
- default: defprops.calendar.maxDate
51
+ default: () => uni.$u.props.calendar.maxDate
53
52
  },
54
53
  // 默认选中的日期,mode为multiple或range是必须为数组格式
55
54
  defaultDate: {
56
55
  type: [Array, String, Date, null],
57
- default: defprops.calendar.defaultDate
56
+ default: () => uni.$u.props.calendar.defaultDate
58
57
  },
59
58
  // mode=multiple时,最多可选多少个日期
60
59
  maxCount: {
61
60
  type: [String, Number],
62
- default: defprops.calendar.maxCount
61
+ default: () => uni.$u.props.calendar.maxCount
63
62
  },
64
63
  // 日期行高
65
64
  rowHeight: {
66
65
  type: [String, Number],
67
- default: defprops.calendar.rowHeight
66
+ default: () => uni.$u.props.calendar.rowHeight
68
67
  },
69
68
  // 日期格式化函数
70
69
  formatter: {
71
70
  type: [Function, null],
72
- default: defprops.calendar.formatter
71
+ default: () => uni.$u.props.calendar.formatter
73
72
  },
74
73
  // 是否显示农历
75
74
  showLunar: {
76
75
  type: Boolean,
77
- default: defprops.calendar.showLunar
76
+ default: () => uni.$u.props.calendar.showLunar
78
77
  },
79
78
  // 是否显示月份背景色
80
79
  showMark: {
81
80
  type: Boolean,
82
- default: defprops.calendar.showMark
81
+ default: () => uni.$u.props.calendar.showMark
83
82
  },
84
83
  // 确定按钮的文字
85
84
  confirmText: {
86
85
  type: String,
87
- default: defprops.calendar.confirmText
86
+ default: () => uni.$u.props.calendar.confirmText
88
87
  },
89
88
  // 确认按钮处于禁用状态时的文字
90
89
  confirmDisabledText: {
91
90
  type: String,
92
- default: defprops.calendar.confirmDisabledText
91
+ default: () => uni.$u.props.calendar.confirmDisabledText
93
92
  },
94
93
  // 是否显示日历弹窗
95
94
  show: {
96
95
  type: Boolean,
97
- default: defprops.calendar.show
96
+ default: () => uni.$u.props.calendar.show
98
97
  },
99
98
  // 是否允许点击遮罩关闭日历
100
99
  closeOnClickOverlay: {
101
100
  type: Boolean,
102
- default: defprops.calendar.closeOnClickOverlay
101
+ default: () => uni.$u.props.calendar.closeOnClickOverlay
103
102
  },
104
103
  // 是否为只读状态,只读状态下禁止选择日期
105
104
  readonly: {
106
105
  type: Boolean,
107
- default: defprops.calendar.readonly
106
+ default: () => uni.$u.props.calendar.readonly
108
107
  },
109
108
  // 是否展示确认按钮
110
109
  showConfirm: {
111
110
  type: Boolean,
112
- default: defprops.calendar.showConfirm
111
+ default: () => uni.$u.props.calendar.showConfirm
113
112
  },
114
113
  // 日期区间最多可选天数,默认无限制,mode = range时有效
115
114
  maxRange: {
116
115
  type: [Number, String],
117
- default: defprops.calendar.maxRange
116
+ default: () => uni.$u.props.calendar.maxRange
118
117
  },
119
118
  // 范围选择超过最多可选天数时的提示文案,mode = range时有效
120
119
  rangePrompt: {
121
120
  type: String,
122
- default: defprops.calendar.rangePrompt
121
+ default: () => uni.$u.props.calendar.rangePrompt
123
122
  },
124
123
  // 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效
125
124
  showRangePrompt: {
126
125
  type: Boolean,
127
- default: defprops.calendar.showRangePrompt
126
+ default: () => uni.$u.props.calendar.showRangePrompt
128
127
  },
129
128
  // 是否允许日期范围的起止时间为同一天,mode = range时有效
130
129
  allowSameDay: {
131
130
  type: Boolean,
132
- default: defprops.calendar.allowSameDay
131
+ default: () => uni.$u.props.calendar.allowSameDay
133
132
  },
134
133
  // 圆角值
135
134
  round: {
136
135
  type: [Boolean, String, Number],
137
- default: defprops.calendar.round
136
+ default: () => uni.$u.props.calendar.round
138
137
  },
139
138
  // 最多展示月份数量
140
139
  monthNum: {
@@ -1,4 +1,3 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 是否打乱键盘按键的顺序
@@ -74,7 +74,7 @@
74
74
  /**
75
75
  * keyboard 键盘组件
76
76
  * @description 此为uView自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3种模式,都有可以打乱按键顺序的选项。
77
- * @tutorial https://uiadmin.net/uview-plus/components/keyboard.html
77
+ * @tutorial https://uview-plus.jiangruyi.com/components/keyboard.html
78
78
  * @property {Boolean} random 是否打乱键盘的顺序
79
79
  * @event {Function} change 点击键盘触发
80
80
  * @event {Function} backspace 点击退格键触发
@@ -1,75 +1,74 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 标题
5
4
  title: {
6
5
  type: [String, Number],
7
- default: defprops.cell.title
6
+ default: () => uni.$u.props.cell.title
8
7
  },
9
8
  // 标题下方的描述信息
10
9
  label: {
11
10
  type: [String, Number],
12
- default: defprops.cell.label
11
+ default: () => uni.$u.props.cell.label
13
12
  },
14
13
  // 右侧的内容
15
14
  value: {
16
15
  type: [String, Number],
17
- default: defprops.cell.value
16
+ default: () => uni.$u.props.cell.value
18
17
  },
19
18
  // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
20
19
  icon: {
21
20
  type: String,
22
- default: defprops.cell.icon
21
+ default: () => uni.$u.props.cell.icon
23
22
  },
24
23
  // 是否禁用cell
25
24
  disabled: {
26
25
  type: Boolean,
27
- default: defprops.cell.disabled
26
+ default: () => uni.$u.props.cell.disabled
28
27
  },
29
28
  // 是否显示下边框
30
29
  border: {
31
30
  type: Boolean,
32
- default: defprops.cell.border
31
+ default: () => uni.$u.props.cell.border
33
32
  },
34
33
  // 内容是否垂直居中(主要是针对右侧的value部分)
35
34
  center: {
36
35
  type: Boolean,
37
- default: defprops.cell.center
36
+ default: () => uni.$u.props.cell.center
38
37
  },
39
38
  // 点击后跳转的URL地址
40
39
  url: {
41
40
  type: String,
42
- default: defprops.cell.url
41
+ default: () => uni.$u.props.cell.url
43
42
  },
44
43
  // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
45
44
  linkType: {
46
45
  type: String,
47
- default: defprops.cell.linkType
46
+ default: () => uni.$u.props.cell.linkType
48
47
  },
49
48
  // 是否开启点击反馈(表现为点击时加上灰色背景)
50
49
  clickable: {
51
50
  type: Boolean,
52
- default: defprops.cell.clickable
51
+ default: () => uni.$u.props.cell.clickable
53
52
  },
54
53
  // 是否展示右侧箭头并开启点击反馈
55
54
  isLink: {
56
55
  type: Boolean,
57
- default: defprops.cell.isLink
56
+ default: () => uni.$u.props.cell.isLink
58
57
  },
59
58
  // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
60
59
  required: {
61
60
  type: Boolean,
62
- default: defprops.cell.required
61
+ default: () => uni.$u.props.cell.required
63
62
  },
64
63
  // 右侧的图标箭头
65
64
  rightIcon: {
66
65
  type: String,
67
- default: defprops.cell.rightIcon
66
+ default: () => uni.$u.props.cell.rightIcon
68
67
  },
69
68
  // 右侧箭头的方向,可选值为:left,up,down
70
69
  arrowDirection: {
71
70
  type: String,
72
- default: defprops.cell.arrowDirection
71
+ default: () => uni.$u.props.cell.arrowDirection
73
72
  },
74
73
  // 左侧图标样式
75
74
  iconStyle: {
@@ -95,17 +94,17 @@ export default {
95
94
  // 单位元的大小,可选值为large
96
95
  size: {
97
96
  type: String,
98
- default: defprops.cell.size
97
+ default: () => uni.$u.props.cell.size
99
98
  },
100
99
  // 点击cell是否阻止事件传播
101
100
  stop: {
102
101
  type: Boolean,
103
- default: defprops.cell.stop
102
+ default: () => uni.$u.props.cell.stop
104
103
  },
105
104
  // 标识符,cell被点击时返回
106
105
  name: {
107
106
  type: [Number, String],
108
- default: defprops.cell.name
107
+ default: () => uni.$u.props.cell.name
109
108
  }
110
109
  }
111
110
  }
@@ -11,7 +11,9 @@
11
11
  :custom-style="iconStyle"
12
12
  :size="size === 'large' ? 22 : 18"></u-icon>
13
13
  </view>
14
- <view class="u-cell__title">
14
+ <view class="u-cell__title">
15
+ <slot name="title" v-if="$slots.title || !title">
16
+ </slot>
15
17
  <text v-else class="u-cell__title-text" :style="[titleTextStyle]"
16
18
  :class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__title-text--large']">{{ title }}</text>
17
19
  <slot name="label">
@@ -28,7 +30,14 @@
28
30
  <view class="u-cell__right-icon-wrap" v-if="$slots['right-icon'] || isLink"
29
31
  :class="[`u-cell__right-icon-wrap--${arrowDirection}`]">
30
32
  <slot name="right-icon">
31
- <u-icon v-if="rightIcon" :name="rightIcon" :custom-style="rightIconStyle" :color="disabled ? '#c8c9cc' : 'info'"
33
+ <u-icon v-if="rightIcon" :name="rightIcon" :custom-style="rightIconStyle" :color="disabled ? '#c8c9cc' : 'info'"
34
+ :size="size === 'large' ? 18 : 16"></u-icon>
35
+ </slot>
36
+ </view>
37
+ <view class="u-cell__right-icon-wrap" v-if="$slots['righticon']"
38
+ :class="[`u-cell__right-icon-wrap--${arrowDirection}`]">
39
+ <slot name="righticon">
40
+ </slot>
32
41
  </view>
33
42
  </view>
34
43
  <u-line v-if="border"></u-line>
@@ -39,10 +48,11 @@
39
48
  import props from './props.js';
40
49
  import mpMixin from '../../libs/mixin/mpMixin.js';
41
50
  import mixin from '../../libs/mixin/mixin.js';
51
+ import { addStyle } from '../../libs/function/index.js';
42
52
  /**
43
53
  * cell 单元格
44
54
  * @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。
45
- * @tutorial https://uiadmin.net/uview-plus/components/cell.html
55
+ * @tutorial https://uview-plus.jiangruyi.com/components/cell.html
46
56
  * @property {String | Number} title 标题
47
57
  * @property {String | Number} label 标题下方的描述信息
48
58
  * @property {String | Number} value 右侧的内容
@@ -77,7 +87,7 @@
77
87
  mixins: [mpMixin, mixin, props],
78
88
  computed: {
79
89
  titleTextStyle() {
80
- return uni.$u.addStyle(this.titleStyle)
90
+ return addStyle(this.titleStyle)
81
91
  }
82
92
  },
83
93
  emits: ['click'],
@@ -1,15 +1,14 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 分组标题
5
4
  title: {
6
5
  type: String,
7
- default: defprops.cellGroup.title
6
+ default: () => uni.$u.props.cellGroup.title
8
7
  },
9
8
  // 是否显示外边框
10
9
  border: {
11
10
  type: Boolean,
12
- default: defprops.cellGroup.border
11
+ default: () => uni.$u.props.cellGroup.border
13
12
  }
14
13
  }
15
14
  }
@@ -19,7 +19,7 @@
19
19
  /**
20
20
  * cellGroup 单元格
21
21
  * @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。
22
- * @tutorial https://uiadmin.net/uview-plus/components/cell.html
22
+ * @tutorial https://uview-plus.jiangruyi.com/components/cell.html
23
23
  *
24
24
  * @property {String} title 分组标题
25
25
  * @property {Boolean} border 是否显示外边框 (默认 true )