@yeeyoon/library 3.3.0 → 3.3.4
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>
|
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: '贡献数据',
|
package/lib/utils/utils.js
CHANGED
@@ -81,9 +81,9 @@ export function mergeTableColumnCommonConfig(config) {
|
|
81
81
|
render: (_, record) => {
|
82
82
|
const key = item.dataIndex;
|
83
83
|
let data;
|
84
|
-
if (key === 'creator') {
|
84
|
+
if (key === 'creator.name') {
|
85
85
|
data = record.creator;
|
86
|
-
} else if (key === 'updater') {
|
86
|
+
} else if (key === 'updater.name') {
|
87
87
|
data = record.updater;
|
88
88
|
}
|
89
89
|
return <UserAvatar data={data} showName={true} />;
|
package/package.json
CHANGED
package/src/global.css
CHANGED
package/src/pages/index.js
CHANGED
@@ -1,14 +1,17 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import Header from '../../lib/components/Header/';
|
3
|
+
import TenantSelector from '../../lib/components/TenantSelector';
|
3
4
|
|
4
5
|
// eslint-disable-next-line react/display-name
|
5
6
|
export default function () {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
7
|
+
return (
|
8
|
+
<>
|
9
|
+
<Header productName="bpm" slot={<div>nasa</div>} />
|
10
|
+
<TenantSelector
|
11
|
+
tenantId="b7b0e19414927b878814094f33b43543"
|
12
|
+
appId="bbe5c8f0063711ecb0c00c42a1ff8370"
|
13
|
+
tenantIdChangeCb={() => {}}
|
14
|
+
/>
|
15
|
+
</>
|
16
|
+
);
|
14
17
|
}
|