1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
| <template>
| <div :class="['friend-avatar-wrapper', { large: size === 'large' }]">
| <Avatar class="friend-avatar" :src="src" :imgClass="imgClass" :size="45" />
| <div class="friend-avatar-info">
| <div class="friend-avatar-name">
| {{ name }}
| </div>
| <div class="friend-avatar-company">{{ company }}</div>
| </div>
| </div>
| </template>
|
| <script setup lang="ts">
| import { Avatar } from '@12333/components';
|
| defineOptions({
| name: 'FriendAvatar',
| });
|
| type Props = {
| name?: string;
| company?: string;
| size?: 'normal' | 'large';
| imgClass?: string;
| src?: string;
| };
|
| const props = withDefaults(defineProps<Props>(), {});
| </script>
|
| <style lang="scss">
| @import '@/styles/common.scss';
|
| .friend-avatar-wrapper {
| display: flex;
|
| .friend-avatar {
| margin-right: 20px;
|
| /* .my-avatar {
| width: 90px;
| height: 90px;
| display: block;
|
| .nut-img {
| width: 90rpx;
| height: 90rpx;
| }
| } */
| }
|
| .friend-avatar-info {
| flex: 1;
| min-width: 0;
|
| .friend-avatar-name {
| @include ellipsis;
| line-height: 1;
| padding-top: 8px;
| font-size: 34px;
| color: #5b6998;
| margin-bottom: 16px;
| }
|
| .friend-avatar-company {
| @include ellipsis;
| line-height: 1;
| font-size: 26px;
| color: boleGetCssVar('text-color', 'regular');
| }
| }
|
| &.large {
| .friend-avatar {
| .my-avatar {
| width: 110px;
| height: 110px;
|
| .nut-img {
| width: 110rpx;
| height: 110rpx;
| }
| }
| }
|
| .friend-avatar-info {
| .friend-avatar-name {
| padding-top: 25px;
| margin-bottom: 14px;
| }
| }
| }
| }
| </style>
|
|