@yeeyoon/library 2.1.7 → 2.2.1

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.
@@ -1 +1 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1631872777872" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3042" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M621.4144 214.528a351.9488 351.9488 0 0 0-288.7168-98.304h-0.256C170.752 135.7824 40.96 268.8 22.272 433.5616l49.5616 5.7856L0 628.5312l49.408-7.8848c43.0592 101.0176 130.3552 177.92 236.2368 206.1824 23.6032 8.0384 48.8448 12.288 74.6496 12.288h421.632c135.1168 0 244.5312-112.7424 242.0224-251.1872v-0.1024a240.2304 240.2304 0 0 0-45.5168-136.704 236.6976 236.6976 0 0 0-39.4752-43.52 248.6784 248.6784 0 0 0-163.4816-61.3376v49.4592l-96.8192-176.128-21.1968 36.2496a384.1024 384.1024 0 0 0-35.6864-41.0112l-0.2048-0.1536-0.1536-0.2048zM152.576 604.0064l43.9808-7.0144-124.7744-157.696 49.6128 5.8368C134.7584 327.168 228.352 231.3216 344.064 217.2416a253.2864 253.2864 0 0 1 208.0256 70.4512c19.456 19.456 35.9424 41.3696 48.5376 65.28l-23.7568 40.6016 198.6048 3.072V448c37.2736 0 72.192 13.824 98.7136 37.0688l0.256 0.256 0.3072 0.2048c8.4992 7.2704 16.1792 15.7184 22.8864 25.2416l0.2048 0.256 0.1536 0.256c6.6048 9.1136 11.776 18.1248 15.36 27.136l0.2048 0.4096 0.1536 0.4096c6.4 15.1552 10.0864 32.1024 10.4448 50.6368 1.4848 81.2544-62.72 147.5072-142.2336 147.5072H360.2944c-15.4624 0-30.464-2.6112-44.2368-7.424l-1.8432-0.6656-1.8944-0.512a258.3552 258.3552 0 0 1-159.6928-124.7232z" fill="#3ED09C" p-id="3043"></path></svg>
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1632654024999" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3310" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M621.4144 214.528a351.9488 351.9488 0 0 0-288.7168-98.304h-0.256C170.752 135.7824 40.96 268.8 22.272 433.5616l49.5616 5.7856L0 628.5312l49.408-7.8848c43.0592 101.0176 130.3552 177.92 236.2368 206.1824 23.6032 8.0384 48.8448 12.288 74.6496 12.288h421.632c135.1168 0 244.5312-112.7424 242.0224-251.1872v-0.1024a240.2304 240.2304 0 0 0-45.5168-136.704 236.6976 236.6976 0 0 0-39.4752-43.52 248.6784 248.6784 0 0 0-163.4816-61.3376v49.4592l-96.8192-176.128-21.1968 36.2496a384.1024 384.1024 0 0 0-35.6864-41.0112l-0.2048-0.1536-0.1536-0.2048zM152.576 604.0064l43.9808-7.0144-124.7744-157.696 49.6128 5.8368C134.7584 327.168 228.352 231.3216 344.064 217.2416a253.2864 253.2864 0 0 1 208.0256 70.4512c19.456 19.456 35.9424 41.3696 48.5376 65.28l-23.7568 40.6016 198.6048 3.072V448c37.2736 0 72.192 13.824 98.7136 37.0688l0.256 0.256 0.3072 0.2048c8.4992 7.2704 16.1792 15.7184 22.8864 25.2416l0.2048 0.256 0.1536 0.256c6.6048 9.1136 11.776 18.1248 15.36 27.136l0.2048 0.4096 0.1536 0.4096c6.4 15.1552 10.0864 32.1024 10.4448 50.6368 1.4848 81.2544-62.72 147.5072-142.2336 147.5072H360.2944c-15.4624 0-30.464-2.6112-44.2368-7.424l-1.8432-0.6656-1.8944-0.512a258.3552 258.3552 0 0 1-159.6928-124.7232z" fill="#02B6CE" p-id="3311"></path></svg>
@@ -8,31 +8,43 @@ import ls from 'local-storage';
8
8
  const PlatformModal = (props) => {
9
9
  const { platforms, redirectUrl, tenantId } = props;
10
10
  const enterProductDetail = (plat) => {
11
+ let _link = document.createElement('a');
12
+ let link = document.body.appendChild(_link);
13
+ link.setAttribute('target', '_blank');
11
14
  if (plat.code == '20210811003') {
12
- window.open(
15
+ link.setAttribute(
16
+ 'href',
13
17
  `${plat.forwardDomainName}?token=${ls.get(
14
18
  'X-Auth-Token'
15
19
  )}&userId=${ls.get('X-Auth-Id')}&tenantId=${tenantId}`
16
20
  );
21
+ link.click();
17
22
  } else {
18
23
  getSystemToken(plat);
19
24
  }
20
25
  };
21
26
  const getSystemToken = async (plat) => {
27
+ let _link = document.createElement('a');
28
+ let link = document.body.appendChild(_link);
29
+ link.setAttribute('target', '_blank');
22
30
  const resp = await fetchSystemToken({ platformId: plat.id });
23
31
  const { success, data } = resp;
24
32
  if (success) {
25
33
  const { token, ...rest } = data;
26
34
  if (redirectUrl) {
27
- window.open(
35
+ link.setAttribute(
36
+ 'href',
28
37
  `${redirectUrl}?token=${token}&userId=${rest.userId}&tenantId=${tenantId}`
29
38
  );
39
+ link.click();
30
40
  } else if (plat.forwardDomainName) {
31
- window.open(
41
+ link.setAttribute(
42
+ 'href',
32
43
  `${plat.forwardDomainName}?token=${token}&userInfo=${JSON.stringify(
33
44
  rest
34
45
  )}&tenantId=${tenantId}`
35
46
  );
47
+ link.click();
36
48
  } else {
37
49
  message.error('该系统尚未开发,敬请期待');
38
50
  return;
@@ -16,12 +16,17 @@ const ProductListMenu = (props) => {
16
16
  const [platModal, setPlatModal] = useState(false);
17
17
  const [platforms, setPlatforms] = useState([]);
18
18
  const enterDetail = (item) => {
19
+ let _link = document.createElement('a');
20
+ let link = document.body.appendChild(_link);
21
+ link.setAttribute('target', '_blank');
19
22
  if (item.code == 200000729) {
20
- window.open(
23
+ link.setAttribute(
24
+ 'href',
21
25
  `${getCollabRedirectUrl()}?token=${ls.get(
22
26
  'X-Auth-Token'
23
27
  )}&tenantId=${tenantId}`
24
28
  );
29
+ link.click();
25
30
  } else if (item.platforms?.length > 1) {
26
31
  setPlatModal(true);
27
32
  setPlatforms(item.platforms);
@@ -32,11 +37,18 @@ const ProductListMenu = (props) => {
32
37
  const getSystemToken = async (item) => {
33
38
  const resp = await fetchSystemToken({ platformId: item.id });
34
39
  const { success, data } = resp;
40
+ let _link = document.createElement('a');
41
+ let link = document.body.appendChild(_link);
42
+ link.setAttribute('target', '_blank');
35
43
  if (success) {
36
44
  const { token, ...rest } = data;
37
- window.open(
38
- `${item.forwardDomainName}?token=${token}&userInfo=${rest}&tenantId=${tenantId}`
45
+ link.setAttribute(
46
+ 'href',
47
+ `${item.forwardDomainName}?token=${token}&userInfo=${JSON.stringify(
48
+ rest
49
+ )}&tenantId=${tenantId}`
39
50
  );
51
+ link.click();
40
52
  }
41
53
  };
42
54
  return (
@@ -1,14 +1,14 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import _xorBy from 'lodash/xorBy';
4
- import { Menu, Dropdown, Tooltip, Avatar, Drawer, Modal } from 'antd';
4
+ import { Menu, Dropdown, Tooltip, Avatar, Drawer, Modal, Divider } from 'antd';
5
5
  import {
6
6
  BarsOutlined,
7
7
  FundProjectionScreenOutlined,
8
8
  UserOutlined,
9
9
  SettingOutlined,
10
10
  PoweroffOutlined,
11
- AppstoreOutlined,
11
+ MenuOutlined,
12
12
  } from '@ant-design/icons';
13
13
  import Notification from '../Notification/recent';
14
14
  import ProductListMenu from './components/ProductListMenu/';
@@ -189,8 +189,8 @@ const Header = (props) => {
189
189
  <div className={styles['comp-header']}>
190
190
  <div className={styles['comp-header__left-content']}>
191
191
  <Tooltip title="更多产品">
192
- <AppstoreOutlined
193
- style={{ fontSize: '28px', cursor: 'pointer' }}
192
+ <MenuOutlined
193
+ style={{ fontSize: '20px', cursor: 'pointer' }}
194
194
  onClick={() => {
195
195
  setProductListMenuDrawerShow(true);
196
196
  }}
@@ -208,13 +208,13 @@ const Header = (props) => {
208
208
  >
209
209
  <img
210
210
  src={getSysBrandConfig().logo}
211
- style={{ height: productName !== 'profile' ? '40px' : '32px' }}
211
+ style={{ height: productName !== 'profile' ? '34px' : '27px' }}
212
212
  />
213
213
  {productName !== 'profile' && (
214
214
  <span
215
215
  style={{
216
216
  color: 'rgba(0, 0, 0, .85)',
217
- fontSize: '24px',
217
+ fontSize: '22px',
218
218
  marginLeft: '5px',
219
219
  }}
220
220
  >
@@ -224,7 +224,19 @@ const Header = (props) => {
224
224
  </span>
225
225
  </div>
226
226
  <div className={styles['comp-header__right-content']}>
227
- <Tooltip title="任务中心" className={styles['comp-header__icon']}>
227
+ {/* <Tooltip title="工作台" className={styles['comp-header__icon']}> */}
228
+ <span className={styles['comp-header__icon']}>
229
+ <FundProjectionScreenOutlined
230
+ style={{ fontSize: '20px', color: 'rgba(0, 0, 0, .85)' }}
231
+ onClick={() => {
232
+ window.location.href = `${HOST_PROFILE_DASH_BOARD}?token=${token}`;
233
+ }}
234
+ />
235
+ &nbsp;工作台
236
+ </span>
237
+ {/* </Tooltip> */}
238
+ {/* <Tooltip title="任务中心" className={styles['comp-header__icon']}> */}
239
+ <span className={styles['comp-header__icon']}>
228
240
  <BarsOutlined
229
241
  style={{ fontSize: '20px', color: 'rgba(0, 0, 0, .85)' }}
230
242
  onClick={() => {
@@ -232,10 +244,11 @@ const Header = (props) => {
232
244
  setPlatformsModalShow(true);
233
245
  }}
234
246
  />
235
- </Tooltip>
247
+ &nbsp;任务中心
248
+ </span>
249
+ {/* </Tooltip> */}
236
250
  {systemUserInfo && (
237
251
  <Notification
238
- showLabel={false}
239
252
  customStyles={{
240
253
  icon: { height: '62px', display: 'flex' },
241
254
  list: { top: '44px' },
@@ -243,14 +256,7 @@ const Header = (props) => {
243
256
  userInfo={systemUserInfo}
244
257
  />
245
258
  )}
246
- <Tooltip title="控制台" className={styles['comp-header__icon']}>
247
- <FundProjectionScreenOutlined
248
- style={{ fontSize: '20px', color: 'rgba(0, 0, 0, .85)' }}
249
- onClick={() => {
250
- window.location.href = `${HOST_PROFILE_DASH_BOARD}?token=${token}`;
251
- }}
252
- />
253
- </Tooltip>
259
+ <Divider type="vertical" />
254
260
  {userInfo && (
255
261
  <>
256
262
  <span className={styles['comp-header__user-name']}>
@@ -22,6 +22,8 @@
22
22
  &__icon {
23
23
  margin-right: 20px;
24
24
  cursor: pointer;
25
+ display: flex;
26
+ align-items: center;
25
27
  }
26
28
  &__user-name {
27
29
  margin: 0 10px;
@@ -41,5 +43,12 @@
41
43
  color: #3ed09c;
42
44
  }
43
45
  }
46
+ :global {
47
+ .ant-divider-vertical {
48
+ border-color: rgba(0, 0, 0, .85);
49
+ height: 1em;
50
+ margin: 0 10px 0 0;
51
+ }
52
+ }
44
53
  }
45
54
  }
@@ -10,9 +10,8 @@
10
10
  align-items: center;
11
11
  }
12
12
  &__title {
13
- margin: 3px 0 0 5px;
14
- color: rgba(0, 0, 0, 0.65);
15
- font-size: 12px;
13
+ margin-left: 3px;
14
+ color: rgba(0, 0, 0, 0.85);
16
15
  }
17
16
  &__list-container {
18
17
  position: absolute;
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import moment from 'moment';
4
4
  import qs from 'qs';
5
5
 
6
- import { Badge, Button, Tooltip, notification } from 'antd';
6
+ import { Badge, Button, notification } from 'antd';
7
7
  import { BellOutlined } from '@ant-design/icons';
8
8
  import ProList from '@ant-design/pro-list';
9
9
 
@@ -119,18 +119,18 @@ const RecentNotification = (props) => {
119
119
  setMsgListShow(false);
120
120
  }}
121
121
  >
122
- <Tooltip title="消息中心">
123
- <div className={styles['notification-container__badge']}>
124
- <Badge count={messageCount}>
125
- <BellOutlined style={{ fontSize: '20px' }} />
126
- </Badge>
127
- {showLabel && (
128
- <span className={styles['notification-container__title']}>
129
- 消息中心
130
- </span>
131
- )}
132
- </div>
133
- </Tooltip>
122
+ {/* <Tooltip title="消息中心"> */}
123
+ <div className={styles['notification-container__badge']}>
124
+ <Badge count={messageCount}>
125
+ <BellOutlined style={{ fontSize: '20px' }} />
126
+ </Badge>
127
+ {showLabel && (
128
+ <span className={styles['notification-container__title']}>
129
+ 消息中心
130
+ </span>
131
+ )}
132
+ </div>
133
+ {/* </Tooltip> */}
134
134
  {msgListShow && (
135
135
  <div
136
136
  className={styles['notification-container__list-container']}
@@ -23,7 +23,7 @@ body {
23
23
  background-color: fade(@primary-color, 65%);
24
24
  }
25
25
  &.gradient {
26
- background: linear-gradient(45deg, #7367f0 0%, #9e95f5 100%);
26
+ background: linear-gradient(45deg, @primary-color 0%, @primary-color-gradient 100%);
27
27
  border: none;
28
28
  }
29
29
  }
@@ -687,7 +687,7 @@ body {
687
687
  }
688
688
  .ant-menu-item-selected {
689
689
  color: @white;
690
- background: linear-gradient(46.62deg, #7367f0 0%, #9e95f5 93.64%);
690
+ background: linear-gradient(46.62deg, @primary-color 0%, @primary-color-gradient 93.64%);
691
691
  &:hover {
692
692
  color: @white !important;
693
693
  }
@@ -2,6 +2,7 @@ const theme = {
2
2
  // Colors
3
3
  'primary-color': '#7367F0',
4
4
  'primary-color-active': '#5E50EE',
5
+ 'primary-color-gradient': '#9E95F5',
5
6
  'default-color': '#82868B',
6
7
  'default-color-active': '#75797E',
7
8
  'success-color': '#28C76F',
@@ -110,7 +111,8 @@ const theme = {
110
111
  // Tab
111
112
  'tabs-horizontal-margin': '0',
112
113
  'tabs-horizontal-padding': '9px 16px',
113
- 'tabs-ink-bar-color': 'linear-gradient(90deg, #7367F0 0%, #B0A9FF 100%)',
114
+ 'tabs-ink-bar-color':
115
+ 'linear-gradient(90deg, @primary-color 0%, @primary-color-gradient 100%)',
114
116
  'tabs-hover-color': '@font-color',
115
117
  'tabs-active-color': '@primary-color',
116
118
  'tabs-card-gutter': '0',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeeyoon/library",
3
- "version": "2.1.7",
3
+ "version": "2.2.1",
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 * {
@@ -5,16 +5,18 @@ import TenantSelector from '../../lib/components/TenantSelector/';
5
5
  // eslint-disable-next-line react/display-name
6
6
  export default function () {
7
7
  return (
8
- // <Header
9
- // productName="collab"
10
- // tenantId="053a033a063711ecb0c00c42a1ff8370"
11
- // token="YTI4ZjUwN2FjYjY0NGQ2NWE0NDZhMzdkN2M2NzRhMWY1NjE2MzI0NjQ5MzQzNjg="
12
- // avatar="https://demo-yeeyoon-fm.oss-cn-zhangjiakou.aliyuncs.com/userCenter/userAvatar/user_avatar2.png"
13
- // userName="王甍"
14
- // />
15
- <TenantSelector
16
- tenantId="14bfb5d71d1011eca9820c42a1f6bf88"
17
- tenantIdChangeCb={(id) => console.log(id)}
18
- />
8
+ <>
9
+ <Header
10
+ productName="profile"
11
+ tenantId="053a033a063711ecb0c00c42a1ff8370"
12
+ token="ZmI1YzU4NzEyOTdlNDM2MTg2YjI0N2IyZGQzOGI3NDg1NDE2MzI2MjU4NjMzNzY="
13
+ avatar="https://demo-yeeyoon-fm.oss-cn-zhangjiakou.aliyuncs.com/userCenter/userAvatar/user_avatar2.png"
14
+ userName="王甍"
15
+ />
16
+ {/* <TenantSelector
17
+ tenantId="14bfb5d71d1011eca9820c42a1f6bf88"
18
+ tenantIdChangeCb={(id) => console.log(id)}
19
+ /> */}
20
+ </>
19
21
  );
20
22
  }