@yeeyoon/library 3.3.1 → 3.3.5
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.
@@ -18,11 +18,20 @@ const AvatarInfo = ({
|
|
18
18
|
style,
|
19
19
|
showInfo = true, // 是否展示信息卡片
|
20
20
|
size = 30,
|
21
|
+
mode,
|
22
|
+
blocked = false,
|
21
23
|
...rest
|
22
24
|
}) => {
|
23
|
-
const CustomAvatar =
|
24
|
-
|
25
|
-
{
|
25
|
+
const CustomAvatar =
|
26
|
+
mode === 'group' ? (
|
27
|
+
<div style={{ position: 'relative' }}>
|
28
|
+
<div
|
29
|
+
className={`${blocked ? styles.blocked : styles.unDisplay} ${
|
30
|
+
styles['user-avatar-blocked-scale']
|
31
|
+
}`}
|
32
|
+
>
|
33
|
+
已屏蔽
|
34
|
+
</div>
|
26
35
|
<Avatar
|
27
36
|
size={size}
|
28
37
|
shape={shape}
|
@@ -30,15 +39,35 @@ const AvatarInfo = ({
|
|
30
39
|
src={icon || defaultHeadUrl}
|
31
40
|
style={{ ...defaultUserStyle, ...style }}
|
32
41
|
/>
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
+
</div>
|
43
|
+
) : (
|
44
|
+
<span style={{ display: 'flex' }}>
|
45
|
+
{icon || name || id ? (
|
46
|
+
<div style={{ position: 'relative' }}>
|
47
|
+
<div
|
48
|
+
className={`${blocked ? styles.blocked : styles.unDisplay} ${
|
49
|
+
styles['user-avatar-blocked-scale']
|
50
|
+
}`}
|
51
|
+
>
|
52
|
+
已屏蔽
|
53
|
+
</div>
|
54
|
+
<Avatar
|
55
|
+
size={size}
|
56
|
+
shape={shape}
|
57
|
+
className={styles['user-avatar-scale']}
|
58
|
+
src={icon || defaultHeadUrl}
|
59
|
+
style={{ ...defaultUserStyle, ...style }}
|
60
|
+
/>
|
61
|
+
</div>
|
62
|
+
) : null}
|
63
|
+
{showName &&
|
64
|
+
(icon || name || id ? (
|
65
|
+
<span className={styles['user-avatar-name']}>{name || '-'}</span>
|
66
|
+
) : (
|
67
|
+
'-'
|
68
|
+
))}
|
69
|
+
</span>
|
70
|
+
);
|
42
71
|
|
43
72
|
return showInfo && id ? (
|
44
73
|
<Popover
|
@@ -76,7 +105,7 @@ const AvatarPackaged = ({ data, maxCount = 5, maxStyle, ...rest }) => {
|
|
76
105
|
}
|
77
106
|
>
|
78
107
|
{data.map((x, i) => (
|
79
|
-
<AvatarInfo key={i} {...rest} {...x} />
|
108
|
+
<AvatarInfo key={i} {...rest} {...x} mode="group" />
|
80
109
|
))}
|
81
110
|
</Avatar.Group>
|
82
111
|
) : data ? (
|
@@ -91,9 +120,11 @@ AvatarInfo.propTypes = {
|
|
91
120
|
showName: PropTypes.bool,
|
92
121
|
placement: PropTypes.string,
|
93
122
|
shape: PropTypes.string,
|
123
|
+
mode: PropTypes.string,
|
94
124
|
size: PropTypes.number,
|
95
125
|
style: PropTypes.object,
|
96
126
|
showInfo: PropTypes.bool,
|
127
|
+
blocked: PropTypes.bool,
|
97
128
|
};
|
98
129
|
|
99
130
|
AvatarPackaged.propTypes = {
|
@@ -12,9 +12,37 @@
|
|
12
12
|
}
|
13
13
|
:global {
|
14
14
|
.ant-list:not(.ant-list-lg):not(.ant-list-sm) .ant-list-item {
|
15
|
-
padding: 12px
|
15
|
+
padding: 12px 0 !important;
|
16
16
|
}
|
17
17
|
.ant-progress-text {
|
18
18
|
font-size: 0.7em;
|
19
19
|
}
|
20
20
|
}
|
21
|
+
.blocked {
|
22
|
+
position: absolute;
|
23
|
+
top: -14px;
|
24
|
+
left: -14px;
|
25
|
+
z-index: 2;
|
26
|
+
display: flex;
|
27
|
+
align-items: center;
|
28
|
+
justify-content: center;
|
29
|
+
width: 58px;
|
30
|
+
height: 58px;
|
31
|
+
color: #b4b7bd;
|
32
|
+
font-size: 16px;
|
33
|
+
background: rgba(0, 0, 0, 0.6);
|
34
|
+
border-radius: 12px;
|
35
|
+
transform: scale(0.5);
|
36
|
+
}
|
37
|
+
.unDisplay {
|
38
|
+
display: none;
|
39
|
+
}
|
40
|
+
|
41
|
+
.user-avatar-blocked-scale {
|
42
|
+
&:hover {
|
43
|
+
transform: scale(0.6);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
.user-avatar-blocked-scale:hover + .user-avatar-scale {
|
47
|
+
transform: scale(1.2);
|
48
|
+
}
|
@@ -12,7 +12,7 @@ function InfoCart(props) {
|
|
12
12
|
const { baseMsg, ...rest } = props;
|
13
13
|
const reg = /^(\d{3})\d*(\d{4})$/;
|
14
14
|
const [cardData, setCardData] = useState({});
|
15
|
-
const [chartData, setChartData] = useState(
|
15
|
+
const [chartData, setChartData] = useState([]);
|
16
16
|
const [projectData] = useState([
|
17
17
|
{
|
18
18
|
title: '贡献数据',
|