@yeeyoon/library 3.6.5 → 3.6.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,6 @@
1
1
  .container {
2
- padding: 40px 125px;
2
+ padding: 32px 50px 24px;
3
3
  text-align: center;
4
- min-height: 440px;
5
4
  }
6
5
 
7
6
  .rocket {
@@ -23,15 +22,23 @@
23
22
  font-weight: 400;
24
23
  font-size: 14px;
25
24
  line-height: 21px;
26
- text-align: center;
25
+ text-align: left;
27
26
  color: #6e6b7b;
28
27
  }
29
28
 
30
29
  .footer {
31
- margin-top: 32px;
30
+ margin-top: 56px;
32
31
  font-weight: 400;
33
32
  font-size: 14px;
34
33
  line-height: 14px;
35
34
  text-align: center;
36
35
  color: #b9b9c3;
37
36
  }
37
+
38
+ .modal {
39
+ :global {
40
+ .ant-modal-content {
41
+ border-radius: 6px;
42
+ }
43
+ }
44
+ }
@@ -2,16 +2,7 @@ import React, { useState, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import _xorBy from 'lodash/xorBy';
4
4
  import ls from 'local-storage';
5
- import {
6
- Menu,
7
- Dropdown,
8
- Tooltip,
9
- Avatar,
10
- Drawer,
11
- Modal,
12
- Divider,
13
- Badge,
14
- } from 'antd';
5
+ import { Menu, Dropdown, Tooltip, Avatar, Drawer, Modal, Divider } from 'antd';
15
6
  import {
16
7
  UserOutlined,
17
8
  SettingOutlined,
@@ -28,6 +19,7 @@ import {
28
19
  IconMore,
29
20
  IconQunZuGuanLi,
30
21
  IconVersion,
22
+ IconNew,
31
23
  } from '../Icons/';
32
24
 
33
25
  import {
@@ -136,12 +128,9 @@ const Header = (props) => {
136
128
  useEffect(async () => {
137
129
  getUserInfo();
138
130
  const [hasNew, newData] = await getVersionData(productName);
139
-
140
131
  setHasNewVersion(hasNew);
141
132
  if (hasNew) {
142
133
  openVersionModal({
143
- centered: true,
144
- width: 510,
145
134
  data: newData,
146
135
  setHasNewVersion,
147
136
  toVersionCenter,
@@ -351,13 +340,15 @@ const Header = (props) => {
351
340
  className={styles['comp-header__icon']}
352
341
  onClick={() => toVersionCenter()}
353
342
  >
354
- <Badge
355
- className={styles['comp-header__badge']}
356
- count={hasNewVersion ? 'new' : null}
357
- >
358
- <IconVersion style={IconStyle} />
343
+ <IconVersion style={IconStyle} />
344
+ <div className={styles['comp-header__badge']}>
359
345
  版本中心
360
- </Badge>
346
+ {hasNewVersion && (
347
+ <div className={styles['comp-header__new']}>
348
+ <IconNew />
349
+ </div>
350
+ )}
351
+ </div>
361
352
  </span>
362
353
  )}
363
354
  {/* {systemUserInfo && (
@@ -60,13 +60,15 @@
60
60
  }
61
61
 
62
62
  &__badge {
63
- :global {
64
- .ant-badge-count {
65
- color: #ff4d4f;
66
- background: transparent;
67
- box-shadow: none;
68
- }
69
- }
63
+ position: relative;
64
+ }
65
+
66
+ &__new {
67
+ width: 21px;
68
+ height: 10.5px;
69
+ position: absolute;
70
+ right: -21px;
71
+ top: -6px;
70
72
  }
71
73
  }
72
74
  }
@@ -2,7 +2,7 @@
2
2
  * @Author: Erlin
3
3
  * @Date: 2022-06-24 11:33:21
4
4
  * @LastEditors: Erlin
5
- * @LastEditTime: 2022-06-24 13:37:54
5
+ * @LastEditTime: 2022-06-24 17:34:39
6
6
  * @Description:
7
7
  */
8
8
  import React from 'react';
@@ -11,18 +11,21 @@ import lodash from 'lodash';
11
11
  import ls from 'local-storage';
12
12
  import request from '.././../utils/request';
13
13
  import NewVersion from './components/NewVersion';
14
+ import styles from './components/NewVersion/styles.less';
14
15
 
15
16
  export const openVersionModal = async (props) => {
16
- const { width, data, setHasNewVersion, toVersionCenter, ...reset } = props;
17
+ const { data, setHasNewVersion, toVersionCenter, ...reset } = props;
17
18
  const modal = Modal.warning({
19
+ centered: true,
20
+ width: 400,
18
21
  title: null,
19
22
  icon: null,
20
23
  closable: true,
21
24
  keyboard: false,
22
25
  maskClosable: false,
23
- width: width,
24
26
  okButtonProps: { style: { display: 'none' } },
25
27
  bodyStyle: { padding: 0 },
28
+ className: styles.modal,
26
29
  content: (
27
30
  <NewVersion
28
31
  modal={modal}
@@ -44,7 +47,7 @@ export const getVersionData = async (productName) => {
44
47
  if (systems.indexOf(productName) > -1) {
45
48
  const oldData = ls.get('Yyun-Version');
46
49
  const res = await request(
47
- 'https://prod-yeeyoon-oss.oss-cn-zhangjiakou.aliyuncs.com/formily/bpm/officialweb/common/default/default/officialweb-officialweb@v0.0.1.json',
50
+ 'https://prod-yeeyoon-oss.oss-cn-zhangjiakou.aliyuncs.com/newbie/version-center.json',
48
51
  { prefix: '' }
49
52
  );
50
53
  const items = lodash.find(res, (item) => item.key == productName);
@@ -38,6 +38,22 @@ const IconQunZuGuanLi = (args) => {
38
38
  const IconVersion = (args) => {
39
39
  return <Icons type="icon-tag" {...args} />;
40
40
  };
41
+ const IconNew = () => {
42
+ return (
43
+ <svg
44
+ width="21"
45
+ height="11"
46
+ viewBox="0 0 21 11"
47
+ fill="none"
48
+ xmlns="http://www.w3.org/2000/svg"
49
+ >
50
+ <path
51
+ d="M19.0908 0.25H1.90908C0.859068 0.25 0 1.10914 0 2.15912V8.8409C0 9.89091 0.859068 10.75 1.90908 10.75H19.0908C20.1409 10.75 21 9.89091 21 8.8409V2.15912C21 1.10914 20.1409 0.25 19.0908 0.25ZM6.68181 7.40909C6.68181 7.60941 6.54817 7.79092 6.35726 7.85789C6.30969 7.87704 6.25243 7.88641 6.20453 7.88641C6.06152 7.88641 5.9182 7.80999 5.82271 7.68609L3.81817 5.03247V7.40913C3.81817 7.66705 3.60814 7.88645 3.34089 7.88645C3.07363 7.88645 2.86365 7.66705 2.86365 7.40913V3.61004C2.86365 3.40979 2.99729 3.22829 3.1882 3.16124C3.38882 3.09457 3.59881 3.16124 3.72275 3.33312C4.39094 4.21459 5.0591 5.09614 5.72729 5.97733V3.61004C5.72729 3.35249 5.93728 3.14217 6.20457 3.14217C6.47186 3.14217 6.68185 3.35249 6.68185 3.61004L6.68181 7.40909ZM10.0227 5.0228C10.29 5.0228 10.5 5.23275 10.5 5.50005C10.5 5.76734 10.29 5.97729 10.0227 5.97729H8.5909V6.93185H10.0227C10.29 6.93185 10.5 7.14187 10.5 7.40913C10.5 7.67642 10.29 7.88645 10.0227 7.88645H8.11362C7.84636 7.88645 7.63634 7.67642 7.63634 7.40913V3.59096C7.63634 3.32371 7.84633 3.11372 8.11362 3.11372H10.0227C10.29 3.11372 10.5 3.32367 10.5 3.59096C10.5 3.85825 10.29 4.06824 10.0227 4.06824H8.5909V5.02284L10.0227 5.0228ZM17.9836 3.7152C17.5126 4.96243 17.0417 6.20971 16.5709 7.45702C16.5379 7.54689 16.4781 7.62443 16.3996 7.67909C16.321 7.73374 16.2275 7.76286 16.1318 7.76247C15.9409 7.76247 15.7597 7.63823 15.6927 7.45702C15.3682 6.59796 15.0436 5.73882 14.7191 4.87945C14.3945 5.73885 14.07 6.59796 13.7455 7.45702C13.6118 7.81974 13.0009 7.81974 12.8673 7.45702C12.3965 6.20971 11.9256 4.96243 11.4545 3.7152C11.3688 3.47639 11.4833 3.2091 11.7315 3.11368C11.9797 3.01823 12.247 3.14213 12.3327 3.39031C12.6572 4.24971 12.9818 5.10881 13.3064 5.96792C13.6309 5.10873 13.9555 4.24953 14.28 3.39031C14.4136 3.0276 15.0245 3.0276 15.1581 3.39031C15.4827 4.24971 15.8073 5.10881 16.1318 5.96792C16.4563 5.10881 16.7809 4.24971 17.1054 3.39031C17.1915 3.14213 17.4681 3.0276 17.7069 3.11368C17.9551 3.19973 18.0791 3.46702 17.9836 3.7152Z"
52
+ fill="#EA5455"
53
+ />
54
+ </svg>
55
+ );
56
+ };
41
57
 
42
58
  export {
43
59
  IconBell,
@@ -49,4 +65,5 @@ export {
49
65
  IconTuijianchanpin,
50
66
  IconQunZuGuanLi,
51
67
  IconVersion,
68
+ IconNew,
52
69
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeeyoon/library",
3
- "version": "3.6.5",
3
+ "version": "3.6.6",
4
4
  "description": "宜云前端组件库和通用服务",
5
5
  "main": "index.js",
6
6
  "repository": {