@yeeyoon/library 3.3.3 → 3.3.7

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.
@@ -19,27 +19,46 @@ const AvatarInfo = ({
19
19
  showInfo = true, // 是否展示信息卡片
20
20
  size = 30,
21
21
  mode,
22
+ blocked = false,
22
23
  ...rest
23
24
  }) => {
24
25
  const CustomAvatar =
25
26
  mode === 'group' ? (
26
- <Avatar
27
- size={size}
28
- shape={shape}
29
- className={styles['user-avatar-scale']}
30
- src={icon || defaultHeadUrl}
31
- style={{ ...defaultUserStyle, ...style }}
32
- />
27
+ <div className={styles['user-avatar-box']}>
28
+ <div
29
+ className={`${blocked ? styles.blocked : styles.unDisplay} ${
30
+ styles['user-avatar-blocked-scale']
31
+ }`}
32
+ >
33
+ 已屏蔽
34
+ </div>
35
+ <Avatar
36
+ size={size}
37
+ shape={shape}
38
+ className={styles['user-avatar-scale']}
39
+ src={icon || defaultHeadUrl}
40
+ style={{ ...defaultUserStyle, ...style }}
41
+ />
42
+ </div>
33
43
  ) : (
34
- <span>
44
+ <span style={{ display: 'flex', alignItems: 'center' }}>
35
45
  {icon || name || id ? (
36
- <Avatar
37
- size={size}
38
- shape={shape}
39
- className={styles['user-avatar-scale']}
40
- src={icon || defaultHeadUrl}
41
- style={{ ...defaultUserStyle, ...style }}
42
- />
46
+ <div className={styles['user-avatar-box']}>
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>
43
62
  ) : null}
44
63
  {showName &&
45
64
  (icon || name || id ? (
@@ -105,6 +124,7 @@ AvatarInfo.propTypes = {
105
124
  size: PropTypes.number,
106
125
  style: PropTypes.object,
107
126
  showInfo: PropTypes.bool,
127
+ blocked: PropTypes.bool,
108
128
  };
109
129
 
110
130
  AvatarPackaged.propTypes = {
@@ -1,3 +1,7 @@
1
+ .user-avatar-box {
2
+ position: relative;
3
+ display: inline-block;
4
+ }
1
5
  .user-avatar-scale {
2
6
  &:hover {
3
7
  transform: scale(1.2);
@@ -6,15 +10,44 @@
6
10
  .user-avatar-name {
7
11
  color: #6e6b7b;
8
12
  margin-left: 7px;
13
+ vertical-align: middle;
9
14
  &:hover {
10
15
  color: @primary-color;
11
16
  }
12
17
  }
13
18
  :global {
14
19
  .ant-list:not(.ant-list-lg):not(.ant-list-sm) .ant-list-item {
15
- padding: 12px 0px !important;
20
+ padding: 12px 0 !important;
16
21
  }
17
22
  .ant-progress-text {
18
23
  font-size: 0.7em;
19
24
  }
20
25
  }
26
+ .blocked {
27
+ position: absolute;
28
+ top: -14px;
29
+ left: -14px;
30
+ z-index: 2;
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ width: 58px;
35
+ height: 58px;
36
+ color: #b4b7bd;
37
+ font-size: 16px;
38
+ background: rgba(0, 0, 0, 0.6);
39
+ border-radius: 12px;
40
+ transform: scale(0.5);
41
+ }
42
+ .unDisplay {
43
+ display: none;
44
+ }
45
+
46
+ .user-avatar-blocked-scale {
47
+ &:hover {
48
+ transform: scale(0.6);
49
+ }
50
+ }
51
+ .user-avatar-blocked-scale:hover + .user-avatar-scale {
52
+ transform: scale(1.2);
53
+ }
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeeyoon/library",
3
- "version": "3.3.3",
3
+ "version": "3.3.7",
4
4
  "description": "宜云前端组件库和通用服务",
5
5
  "main": "index.js",
6
6
  "repository": {
package/src/global.css CHANGED
@@ -4,7 +4,7 @@ html, body, #root {
4
4
 
5
5
  body {
6
6
  margin: 0;
7
- /* background-color: #000 !important; */
7
+ background-color: #000 !important;
8
8
  }
9
9
 
10
10
  body * {
@@ -1,17 +1,14 @@
1
- import React from 'react';
1
+ import React, { useState, useEffect } from 'react';
2
2
  import Header from '../../lib/components/Header/';
3
- import TenantSelector from '../../lib/components/TenantSelector';
4
3
 
5
4
  // eslint-disable-next-line react/display-name
6
5
  export default function () {
7
- return (
8
- <>
9
- <Header productName="bpm" slot={<div>nasa</div>} />
10
- <TenantSelector
11
- tenantId="b7b0e19414927b878814094f33b43543"
12
- appId="bbe5c8f0063711ecb0c00c42a1ff8370"
13
- tenantIdChangeCb={() => {}}
14
- />
15
- </>
16
- );
6
+ const [tenantId, setTenantId] = useState('');
7
+ useEffect(() => {
8
+ setTimeout(() => {
9
+ setTenantId('053a033a063711ecb0c00c42a1ff8370');
10
+ // setTenantId('f12a71b6063611ecb0c00c42a1ff8370');
11
+ }, 3000);
12
+ }, []);
13
+ return <Header productName="bpm" tenantId={tenantId} />;
17
14
  }