@10yun/cv-mobile-ui 0.5.62 → 0.5.63

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 (67) hide show
  1. package/package.json +1 -1
  2. package/plugins/uni-extend.js +10 -10
  3. package/ui-fireui/components/u-action-sheet/u-action-sheet.vue +46 -16
  4. package/ui-fireui/components/u-alert/u-alert.vue +11 -5
  5. package/ui-fireui/components/u-badge/u-badge.vue +52 -69
  6. package/ui-fireui/components/u-bottom-navigation/u-bottom-navigation.vue +28 -20
  7. package/ui-fireui/components/u-bottom-popup/u-bottom-popup.vue +40 -11
  8. package/ui-fireui/components/u-bubble-popup/u-bubble-popup.vue +3 -6
  9. package/ui-fireui/components/u-button/u-button.vue +262 -259
  10. package/ui-fireui/components/u-calendar/u-calendar.vue +227 -44
  11. package/ui-fireui/components/u-calendar/u-calendar2.js +562 -0
  12. package/ui-fireui/components/u-card/u-card.vue +50 -32
  13. package/ui-fireui/components/u-cascade-selection/u-cascade-selection.vue +197 -74
  14. package/ui-fireui/components/u-circular-progress/u-circular-progress.vue +324 -0
  15. package/ui-fireui/components/u-clipboard2/tui-clipboard.js +53 -0
  16. package/ui-fireui/components/u-collapse/u-collapse.vue +8 -8
  17. package/ui-fireui/components/u-config/index.js +129 -0
  18. package/ui-fireui/components/u-count-down/u-count-down.vue +124 -19
  19. package/ui-fireui/components/u-datetime/u-datetime.vue +416 -176
  20. package/ui-fireui/components/u-divider/u-divider.vue +3 -3
  21. package/ui-fireui/components/u-drawer/u-drawer.vue +55 -12
  22. package/ui-fireui/components/u-dropdown-list/u-dropdown-list.vue +103 -0
  23. package/ui-fireui/components/u-fab/u-fab.vue +344 -0
  24. package/ui-fireui/components/u-footer/u-footer.vue +148 -0
  25. package/ui-fireui/components/u-grid/u-grid.vue +2 -8
  26. package/ui-fireui/components/u-grid-item/u-grid-item.vue +22 -5
  27. package/ui-fireui/components/u-icon/u-icon-new.js +190 -0
  28. package/ui-fireui/components/u-icon/u-icon-new.vue +100 -0
  29. package/ui-fireui/components/u-image-cropper/u-image-cropper.vue +1144 -0
  30. package/ui-fireui/components/u-image-group/u-image-group.vue +164 -0
  31. package/ui-fireui/components/u-keyboard/u-keyboard.vue +3 -2
  32. package/ui-fireui/components/u-keyboard-input/u-keyboard-input.vue +1 -1
  33. package/ui-fireui/components/u-list-cell/u-list-cell.vue +82 -72
  34. package/ui-fireui/components/u-list-view/u-list-view.vue +33 -8
  35. package/ui-fireui/components/u-loading/u-loading.vue +107 -27
  36. package/ui-fireui/components/u-loadmore/u-loadmore.vue +21 -3
  37. package/ui-fireui/components/u-modal/u-modal.vue +140 -176
  38. package/ui-fireui/components/u-navigation-bar/u-navigation-bar.vue +121 -28
  39. package/ui-fireui/components/u-no-data/u-no-data.vue +58 -20
  40. package/ui-fireui/components/u-nomore/u-nomore.vue +5 -4
  41. package/ui-fireui/components/u-numberbox/u-numberbox.vue +88 -45
  42. package/ui-fireui/components/u-picture-cropper/u-picture-cropper.vue +94 -36
  43. package/ui-fireui/components/u-picture-cropper/u-picture-cropper.wxs +27 -17
  44. package/ui-fireui/components/u-rate/u-rate.vue +197 -0
  45. package/ui-fireui/components/u-round-progress/u-round-progress.vue +62 -42
  46. package/ui-fireui/components/u-scroll-top/u-scroll-top.vue +4 -3
  47. package/ui-fireui/components/u-section/u-section.vue +149 -0
  48. package/ui-fireui/components/u-skeleton/u-skeleton.vue +37 -6
  49. package/ui-fireui/components/u-steps/u-steps.vue +110 -27
  50. package/ui-fireui/components/u-sticky/u-sticky.vue +35 -21
  51. package/ui-fireui/components/u-sticky-wxs/u-sticky-wxs.vue +7 -4
  52. package/ui-fireui/components/u-sticky-wxs/u-sticky.wxs +39 -36
  53. package/ui-fireui/components/u-swipe-action/u-swipe-action.vue +76 -19
  54. package/ui-fireui/components/u-tabbar/u-tabbar.vue +71 -38
  55. package/ui-fireui/components/u-tabs/u-tabs.vue +133 -51
  56. package/ui-fireui/components/u-tag/u-tag.vue +109 -226
  57. package/ui-fireui/components/u-time-axis/u-time-axis.vue +1 -1
  58. package/ui-fireui/components/u-timeaxis-item/u-timeaxis-item.vue +1 -1
  59. package/ui-fireui/components/u-tips/u-tips.vue +35 -15
  60. package/ui-fireui/components/u-toast/u-toast.vue +9 -5
  61. package/ui-fireui/components/u-top-dropdown/u-top-dropdown.vue +8 -6
  62. package/ui-fireui/components/u-upload/u-upload-old.vue +462 -0
  63. package/ui-fireui/components/u-upload/u-upload.vue +648 -446
  64. package/ui-fireui/components/u-white-space/u-white-space.vue +68 -0
  65. package/ui-fireui/components/u-wing-blank/u-wing-blank.vue +100 -0
  66. package/uview-plus/libs/ctocode/index.js +1 -0
  67. package/uview-plus/libs/ctocode/richText.js +0 -1
@@ -1,13 +1,16 @@
1
1
  <template>
2
2
  <view class="up-loadmore">
3
- <view :class="['up-loading-' + index, index == 3 && type ? 'up-loading-' + type : '']"></view>
3
+ <view
4
+ :class="['up-loading-' + index, index == 3 && type ? 'up-loading-' + type : '']"
5
+ :style="{ borderLeftColor: getBorderColor }"
6
+ ></view>
4
7
  <view class="up-loadmore-tips">{{ text }}</view>
5
8
  </view>
6
9
  </template>
7
10
 
8
11
  <script>
9
12
  export default {
10
- name: 'fuiLoadmore',
13
+ name: 'tuiLoadmore',
11
14
  props: {
12
15
  //显示文本
13
16
  text: {
@@ -16,7 +19,7 @@ export default {
16
19
  },
17
20
  //loading 样式 :1,2,3
18
21
  index: {
19
- type: Number,
22
+ type: [Number, String],
20
23
  default: 1
21
24
  },
22
25
  //颜色设置,只有index=3时生效:primary,red,orange,green
@@ -24,6 +27,21 @@ export default {
24
27
  type: String,
25
28
  default: ''
26
29
  }
30
+ },
31
+ computed: {
32
+ getBorderColor() {
33
+ let color = 'transparent';
34
+ if (this.index == 3 && this.type) {
35
+ const global = uni && uni.$tui && uni.$tui.color;
36
+ color = {
37
+ primary: (global && global.primary) || '#5677fc',
38
+ red: (global && global.danger) || '#EB0909',
39
+ orange: (global && global.warning) || '#ff7900',
40
+ green: (global && global.success) || '#07c160'
41
+ }[this.type];
42
+ }
43
+ return color;
44
+ }
27
45
  }
28
46
  };
29
47
  </script>
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <view @touchmove.stop.prevent>
2
+ <view class="up-modal__container" :class="[show ? 'up-modal-show' : '']" :style="{ zIndex: zIndex }" @touchmove.stop.prevent>
3
3
  <view
4
4
  class="up-modal-box"
5
- :style="{ width: width, padding: padding, borderRadius: radius }"
5
+ :style="{ width: width, padding: padding, borderRadius: radius, backgroundColor: backgroundColor, zIndex: zIndex + 1 }"
6
6
  :class="[fadeIn || show ? 'up-modal-normal' : 'up-modal-scale', show ? 'up-modal-show' : '']"
7
7
  >
8
8
  <view v-if="!custom">
@@ -11,35 +11,46 @@
11
11
  {{ content }}
12
12
  </view>
13
13
  <view class="up-modalBtn-box" :class="[button.length != 2 ? 'up-flex-column' : '']">
14
- <block v-for="(item, index) in button" :key="index">
15
- <button
16
- class="up-modal-btn"
17
- :class="[
18
- 'up-' + (item.type || 'primary') + (item.plain ? '-outline' : ''),
19
- button.length != 2 ? 'up-btn-width' : '',
20
- button.length > 2 ? 'up-mbtm' : '',
21
- shape == 'circle' ? 'up-circle-btn' : ''
22
- ]"
23
- :hover-class="'up-' + (item.plain ? 'outline' : item.type || 'primary') + '-hover'"
24
- :data-index="index"
25
- @tap="handleClick"
26
- >
27
- {{ item.text || '确定' }}
28
- </button>
29
- </block>
14
+ <view
15
+ v-for="(item, index) in button"
16
+ :key="index"
17
+ class="up-modal-btn"
18
+ :class="[
19
+ button.length != 2 ? 'up-btn-width' : '',
20
+ button.length > 2 ? 'up-mbtm' : '',
21
+ shape == 'circle' ? 'up-circle-btn' : ''
22
+ ]"
23
+ :style="{ background: getColor(item.type, true, item.plain), color: getTextColor(item.type, item.plain) }"
24
+ @tap="handleClick(index)"
25
+ >
26
+ {{ item.text || '确定' }}
27
+ <view
28
+ class="up-modal__border"
29
+ :class="[shape == 'circle' ? 'up-circle-border' : '']"
30
+ :style="{ borderColor: getColor(item.type) }"
31
+ v-if="item.plain"
32
+ ></view>
33
+ </view>
30
34
  </view>
31
35
  </view>
32
36
  <view v-else>
33
37
  <slot></slot>
34
38
  </view>
35
39
  </view>
36
- <view class="up-modal-mask" :class="[show ? 'up-mask-show' : '']" @tap="handleClickCancel"></view>
40
+ <view
41
+ v-if="isMask"
42
+ class="up-modal-mask"
43
+ :class="[show ? 'up-mask-show' : '']"
44
+ :style="{ zIndex: maskZIndex, background: maskColor }"
45
+ @tap="handleClickCancel"
46
+ ></view>
37
47
  </view>
38
48
  </template>
39
49
 
40
50
  <script>
41
51
  export default {
42
- name: 'fuiModal',
52
+ name: 'tuiModal',
53
+ emits: ['click', 'cancel'],
43
54
  props: {
44
55
  //是否显示
45
56
  show: {
@@ -50,6 +61,10 @@ export default {
50
61
  type: String,
51
62
  default: '84%'
52
63
  },
64
+ backgroundColor: {
65
+ type: String,
66
+ default: '#fff'
67
+ },
53
68
  padding: {
54
69
  type: String,
55
70
  default: '40rpx 64rpx'
@@ -85,7 +100,7 @@ export default {
85
100
  },
86
101
  button: {
87
102
  type: Array,
88
- default: () => {
103
+ default: function () {
89
104
  return [
90
105
  {
91
106
  text: '取消',
@@ -105,6 +120,15 @@ export default {
105
120
  type: Boolean,
106
121
  default: true
107
122
  },
123
+ //是否显示mask
124
+ isMask: {
125
+ type: Boolean,
126
+ default: true
127
+ },
128
+ maskColor: {
129
+ type: String,
130
+ default: 'rgba(0, 0, 0, 0.6)'
131
+ },
108
132
  //淡入效果,自定义弹框插入input输入框时传true
109
133
  fadeIn: {
110
134
  type: Boolean,
@@ -114,17 +138,60 @@ export default {
114
138
  custom: {
115
139
  type: Boolean,
116
140
  default: false
141
+ },
142
+ //容器z-index
143
+ zIndex: {
144
+ type: Number,
145
+ default: 9997
146
+ },
147
+ //mask z-index
148
+ maskZIndex: {
149
+ type: Number,
150
+ default: 9990
117
151
  }
118
152
  },
119
153
  data() {
120
154
  return {};
121
155
  },
122
156
  methods: {
123
- handleClick(e) {
157
+ getColor(type, isBg, plain) {
158
+ const global = uni && uni.$tui && uni.$tui.color;
159
+ let color = {
160
+ primary: (global && global.primary) || '#5677fc',
161
+ green: (global && global.success) || '#07c160',
162
+ warning: (global && global.warning) || '#ff7900',
163
+ danger: (global && global.danger) || '#EB0909',
164
+ red: (global && global.danger) || '#EB0909',
165
+ pink: (global && global.pink) || '#f74d54',
166
+ white: isBg ? '#fff' : '#333',
167
+ gray: isBg ? '#ededed' : '#999'
168
+ }[type || 'primary'];
169
+ if (isBg && plain) {
170
+ color = 'transparent';
171
+ }
172
+ return color;
173
+ },
174
+ getTextColor(type, plain) {
175
+ const global = uni && uni.$tui && uni.$tui.color;
176
+ let color = {
177
+ primary: (global && global.primary) || '#5677fc',
178
+ green: (global && global.success) || '#07c160',
179
+ warning: (global && global.warning) || '#ff7900',
180
+ danger: (global && global.danger) || '#EB0909',
181
+ red: (global && global.danger) || '#EB0909',
182
+ pink: (global && global.pink) || '#f74d54',
183
+ white: '#333',
184
+ gray: '#999'
185
+ }[type || 'primary'];
186
+ if (!plain && type !== 'white' && type !== 'gray') {
187
+ color = '#fff';
188
+ }
189
+ return color;
190
+ },
191
+ handleClick(index) {
124
192
  if (!this.show) return;
125
- const dataset = e.currentTarget.dataset;
126
193
  this.$emit('click', {
127
- index: Number(dataset.index)
194
+ index: Number(index)
128
195
  });
129
196
  },
130
197
  handleClickCancel() {
@@ -136,25 +203,32 @@ export default {
136
203
  </script>
137
204
 
138
205
  <style scoped>
139
- .up-modal-box {
206
+ .up-modal__container {
207
+ width: 100%;
208
+ height: 100%;
140
209
  position: fixed;
141
- left: 50%;
142
- top: 50%;
143
- margin: auto;
144
- background-color: #fff;
145
- z-index: 9999998;
146
- transition: all 0.3s ease-in-out;
210
+ left: 0;
211
+ top: 0;
212
+ display: flex;
213
+ align-items: center;
214
+ justify-content: center;
215
+ visibility: hidden;
216
+ }
217
+
218
+ .up-modal-box {
219
+ position: relative;
147
220
  opacity: 0;
148
- box-sizing: border-box;
149
221
  visibility: hidden;
222
+ box-sizing: border-box;
223
+ transition: all 0.3s ease-in-out;
150
224
  }
151
225
 
152
226
  .up-modal-scale {
153
- transform: translate(-50%, -50%) scale(0);
227
+ transform: scale(0);
154
228
  }
155
229
 
156
230
  .up-modal-normal {
157
- transform: translate(-50%, -50%) scale(1);
231
+ transform: scale(1);
158
232
  }
159
233
 
160
234
  .up-modal-show {
@@ -168,8 +242,6 @@ export default {
168
242
  left: 0;
169
243
  right: 0;
170
244
  bottom: 0;
171
- background-color: rgba(0, 0, 0, 0.6);
172
- z-index: 9999996;
173
245
  transition: all 0.3s ease-in-out;
174
246
  opacity: 0;
175
247
  visibility: hidden;
@@ -225,168 +297,60 @@ export default {
225
297
  overflow: visible;
226
298
  margin-left: 0;
227
299
  margin-right: 0;
300
+ box-sizing: border-box;
301
+ display: flex;
302
+ align-items: center;
303
+ justify-content: center;
304
+ /* #ifdef H5 */
305
+ cursor: pointer;
306
+ /* #endif */
307
+ border-width: 0;
308
+ }
309
+
310
+ .up-modal-btn:active::after {
311
+ content: '';
312
+ position: absolute;
313
+ width: 100%;
314
+ height: 100%;
315
+ left: 0;
316
+ top: 0;
317
+ background-color: rgba(0, 0, 0, 0.15);
318
+ pointer-events: none;
228
319
  }
229
320
 
230
321
  .up-modal-btn::after {
231
- content: ' ';
322
+ border-radius: 10rpx;
323
+ }
324
+
325
+ .up-modal__border {
232
326
  position: absolute;
233
327
  width: 200%;
234
328
  height: 200%;
235
329
  -webkit-transform-origin: 0 0;
236
330
  transform-origin: 0 0;
237
- -webkit-transform: scale(0.5, 0.5);
238
- transform: scale(0.5, 0.5);
331
+ transform: scale(0.5, 0.5) translateZ(0);
332
+ border: 1px solid;
333
+ box-sizing: border-box;
239
334
  left: 0;
240
335
  top: 0;
336
+ z-index: 2;
241
337
  border-radius: 20rpx;
338
+ pointer-events: none;
242
339
  }
243
340
 
244
341
  .up-btn-width {
245
342
  width: 80% !important;
246
343
  }
247
344
 
248
- .up-primary {
249
- background: #5677fc;
250
- color: #fff;
251
- }
252
-
253
- .up-primary-hover {
254
- background: #4a67d6;
255
- color: #e5e5e5;
256
- }
257
-
258
- .up-primary-outline {
259
- color: #5677fc;
260
- background: transparent;
261
- }
262
-
263
- .up-primary-outline::after {
264
- border: 1px solid #5677fc;
265
- }
266
-
267
- .up-danger {
268
- background: #4fb49b;
269
- color: #fff;
270
- }
271
-
272
- .up-danger-hover {
273
- background: #d53912;
274
- color: #e5e5e5;
275
- }
276
-
277
- .up-danger-outline {
278
- color: #4fb49b;
279
- background: transparent;
280
- }
281
-
282
- .up-danger-outline::after {
283
- border: 1px solid #4fb49b;
284
- }
285
-
286
- .up-red {
287
- background: #4fb49b;
288
- color: #fff;
289
- }
290
-
291
- .up-red-hover {
292
- background: #4fb49b;
293
- color: #e5e5e5;
294
- }
295
-
296
- .up-red-outline {
297
- color: #4fb49b;
298
- background: transparent;
299
- }
300
-
301
- .up-red-outline::after {
302
- border: 1px solid #4fb49b;
303
- }
304
-
305
- .up-warning {
306
- background: #ff7900;
307
- color: #fff;
308
- }
309
-
310
- .up-warning-hover {
311
- background: #e56d00;
312
- color: #e5e5e5;
313
- }
314
-
315
- .up-warning-outline {
316
- color: #ff7900;
317
- background: transparent;
318
- }
319
-
320
- .up-warning-outline::after {
321
- border: 1px solid #ff7900;
322
- }
323
-
324
- .up-green {
325
- background: #19be6b;
326
- color: #fff;
327
- }
328
-
329
- .up-green-hover {
330
- background: #16ab60;
331
- color: #e5e5e5;
332
- }
333
-
334
- .up-green-outline {
335
- color: #19be6b;
336
- background: transparent;
337
- }
338
-
339
- .up-green-outline::after {
340
- border: 1px solid #19be6b;
341
- }
342
-
343
- .up-white {
344
- background: #fff;
345
- color: #333;
346
- }
347
-
348
- .up-white-hover {
349
- background: #f7f7f9;
350
- color: #666;
351
- }
352
-
353
- .up-white-outline {
354
- color: #333;
355
- background: transparent;
356
- }
357
-
358
- .up-white-outline::after {
359
- border: 1px solid #333;
360
- }
361
-
362
- .up-gray {
363
- background: #ededed;
364
- color: #999;
365
- }
366
-
367
- .up-gray-hover {
368
- background: #d5d5d5;
369
- color: #898989;
370
- }
371
-
372
- .up-gray-outline {
373
- color: #999;
374
- background: transparent;
375
- }
376
-
377
- .up-gray-outline::after {
378
- border: 1px solid #999;
379
- }
380
-
381
- .up-outline-hover {
382
- opacity: 0.6;
383
- }
384
-
385
345
  .up-circle-btn {
386
346
  border-radius: 40rpx !important;
387
347
  }
388
348
 
389
349
  .up-circle-btn::after {
350
+ border-radius: 40rpx !important;
351
+ }
352
+
353
+ .up-circle-border {
390
354
  border-radius: 80rpx !important;
391
355
  }
392
356
  </style>