im-ui-mobile 0.1.35 → 0.1.37
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.
|
@@ -56,18 +56,14 @@
|
|
|
56
56
|
<view v-if="showStatus && status" class="im-avatar__status" :class="`im-avatar__status--${status}`" />
|
|
57
57
|
|
|
58
58
|
<!-- 角标 -->
|
|
59
|
-
<im-badge v-if="badge" :value="badgeText" :dot="badgeDot" :class="[`im-avatar__badge`
|
|
59
|
+
<im-badge v-if="badge" :value="badgeText" :dot="badgeDot" :class="[`im-avatar__badge`
|
|
60
|
+
// #ifdef MP-WEIXIN
|
|
61
|
+
, `im-avatar__badge--${size}`
|
|
62
|
+
// #endif
|
|
63
|
+
]" :size="badgeSize" />
|
|
60
64
|
|
|
61
65
|
<!-- 加载状态 -->
|
|
62
|
-
<
|
|
63
|
-
<im-loading v-if="loading" :size="32" text="" :mask="true" :class="[
|
|
64
|
-
{
|
|
65
|
-
'im-avatar__loading--square': shape === 'square',
|
|
66
|
-
'im-avatar__loading--rounded': shape === 'rounded',
|
|
67
|
-
'im-avatar__loading--circle': shape === 'circle'
|
|
68
|
-
}
|
|
69
|
-
]" />
|
|
70
|
-
</view>
|
|
66
|
+
<im-loading v-if="loading" class="im-avatar__loading" :size="32" text="" :mask="true" />
|
|
71
67
|
</view>
|
|
72
68
|
</template>
|
|
73
69
|
|
|
@@ -202,25 +198,6 @@ const textStyle = computed(() => {
|
|
|
202
198
|
return style
|
|
203
199
|
})
|
|
204
200
|
|
|
205
|
-
// const iconStyle = computed(() => {
|
|
206
|
-
// const style: Record<string, string> = {
|
|
207
|
-
// color: props.iconColor
|
|
208
|
-
// }
|
|
209
|
-
|
|
210
|
-
// if (props.iconSize) {
|
|
211
|
-
// style.fontSize = `${props.iconSize}rpx`
|
|
212
|
-
// }
|
|
213
|
-
|
|
214
|
-
// return style
|
|
215
|
-
// })
|
|
216
|
-
|
|
217
|
-
// const badgeClass = computed(() => {
|
|
218
|
-
// if (props.badgeColor) {
|
|
219
|
-
// return ''
|
|
220
|
-
// }
|
|
221
|
-
// return 'im-avatar__badge--default'
|
|
222
|
-
// })
|
|
223
|
-
|
|
224
201
|
const badgeSize = computed(() => {
|
|
225
202
|
switch (props.size) {
|
|
226
203
|
case 'mini':
|
|
@@ -487,6 +464,10 @@ const handleImageError = (error: any) => {
|
|
|
487
464
|
&__badge {
|
|
488
465
|
|
|
489
466
|
// 尺寸
|
|
467
|
+
|
|
468
|
+
// #ifdef MP-WEIXIN
|
|
469
|
+
&--mini,
|
|
470
|
+
// #endif
|
|
490
471
|
.im-avatar--mini & {
|
|
491
472
|
top: -30rpx;
|
|
492
473
|
right: -6rpx;
|
|
@@ -516,32 +497,48 @@ const handleImageError = (error: any) => {
|
|
|
516
497
|
top: -88rpx;
|
|
517
498
|
right: -30rpx;
|
|
518
499
|
}
|
|
500
|
+
|
|
501
|
+
// #ifdef MP-WEIXIN
|
|
502
|
+
|
|
503
|
+
// #endif
|
|
519
504
|
}
|
|
520
505
|
|
|
521
506
|
// 加载状态
|
|
522
507
|
&__loading {
|
|
523
|
-
position: absolute;
|
|
524
|
-
top: 0;
|
|
525
|
-
left: 0;
|
|
526
|
-
width: 100%;
|
|
527
|
-
height: 100%;
|
|
528
|
-
display: flex;
|
|
529
|
-
align-items: center;
|
|
530
|
-
justify-content: center;
|
|
531
|
-
z-index: 2;
|
|
508
|
+
// position: absolute;
|
|
509
|
+
// top: 0;
|
|
510
|
+
// left: 0;
|
|
511
|
+
// width: 100%;
|
|
512
|
+
// height: 100%;
|
|
513
|
+
// display: flex;
|
|
514
|
+
// align-items: center;
|
|
515
|
+
// justify-content: center;
|
|
516
|
+
// z-index: 2;
|
|
532
517
|
|
|
533
518
|
// 形状
|
|
534
|
-
|
|
519
|
+
.im-avatar--circle & {
|
|
535
520
|
border-radius: 50%;
|
|
536
521
|
}
|
|
537
522
|
|
|
538
|
-
&--
|
|
523
|
+
// &--circle {
|
|
524
|
+
// border-radius: 50%;
|
|
525
|
+
// }
|
|
526
|
+
|
|
527
|
+
.im-avatar--square & {
|
|
539
528
|
border-radius: 8rpx;
|
|
540
529
|
}
|
|
541
530
|
|
|
542
|
-
&--
|
|
531
|
+
// &--square {
|
|
532
|
+
// border-radius: 8rpx;
|
|
533
|
+
// }
|
|
534
|
+
|
|
535
|
+
.im-avatar--rounded & {
|
|
543
536
|
border-radius: 20%;
|
|
544
537
|
}
|
|
538
|
+
|
|
539
|
+
// &--rounded {
|
|
540
|
+
// border-radius: 20%;
|
|
541
|
+
// }
|
|
545
542
|
}
|
|
546
543
|
}
|
|
547
544
|
|