@yeeyoon/library 2.2.1 → 2.2.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.
@@ -4,7 +4,7 @@ import { DefaultFooter } from '@ant-design/pro-layout';
4
4
  const CustomDefaultFooter = () => {
5
5
  return (
6
6
  <DefaultFooter
7
- copyright={`${new Date().getFullYear()} 宜云信息`}
7
+ copyright={`${new Date().getFullYear()} 津ICP备20000674号-1`}
8
8
  links={false}
9
9
  />
10
10
  );
@@ -3,17 +3,16 @@ import PropTypes from 'prop-types';
3
3
  import _xorBy from 'lodash/xorBy';
4
4
  import { Menu, Dropdown, Tooltip, Avatar, Drawer, Modal, Divider } from 'antd';
5
5
  import {
6
- BarsOutlined,
7
- FundProjectionScreenOutlined,
8
6
  UserOutlined,
9
7
  SettingOutlined,
10
8
  PoweroffOutlined,
11
- MenuOutlined,
12
9
  } from '@ant-design/icons';
13
10
  import Notification from '../Notification/recent';
14
11
  import ProductListMenu from './components/ProductListMenu/';
15
12
  import PlatformModal from './components/PlatformModal/';
16
13
 
14
+ import { IconTodo, IconConsole, IconMore } from '../Icons/';
15
+
17
16
  import {
18
17
  fetchSystemToken,
19
18
  fetchUserInfo,
@@ -40,6 +39,12 @@ let allProduct = [];
40
39
  let leftProduct = [];
41
40
 
42
41
  const CY_PLATFORM_ID = 'f12a71b6063611ecb0c00c42a1ff8370';
42
+ const IconStyle = {
43
+ fontSize: '20px',
44
+ color: 'rgba(0, 0, 0, .85)',
45
+ marginRight: '8px',
46
+ display: 'inline-block',
47
+ };
43
48
 
44
49
  const Header = (props) => {
45
50
  const {
@@ -189,8 +194,8 @@ const Header = (props) => {
189
194
  <div className={styles['comp-header']}>
190
195
  <div className={styles['comp-header__left-content']}>
191
196
  <Tooltip title="更多产品">
192
- <MenuOutlined
193
- style={{ fontSize: '20px', cursor: 'pointer' }}
197
+ <IconMore
198
+ style={{ fontSize: '22px', cursor: 'pointer' }}
194
199
  onClick={() => {
195
200
  setProductListMenuDrawerShow(true);
196
201
  }}
@@ -224,29 +229,25 @@ const Header = (props) => {
224
229
  </span>
225
230
  </div>
226
231
  <div className={styles['comp-header__right-content']}>
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;工作台
232
+ <span
233
+ className={styles['comp-header__icon']}
234
+ onClick={() => {
235
+ window.location.href = `${HOST_PROFILE_DASH_BOARD}?token=${token}`;
236
+ }}
237
+ >
238
+ <IconConsole style={IconStyle} />
239
+ 工作台
236
240
  </span>
237
- {/* </Tooltip> */}
238
- {/* <Tooltip title="任务中心" className={styles['comp-header__icon']}> */}
239
- <span className={styles['comp-header__icon']}>
240
- <BarsOutlined
241
- style={{ fontSize: '20px', color: 'rgba(0, 0, 0, .85)' }}
242
- onClick={() => {
243
- setRedirectUrl(HOST_PROFILE_TASK);
244
- setPlatformsModalShow(true);
245
- }}
246
- />
247
- &nbsp;任务中心
241
+ <span
242
+ className={styles['comp-header__icon']}
243
+ onClick={() => {
244
+ setRedirectUrl(HOST_PROFILE_TASK);
245
+ setPlatformsModalShow(true);
246
+ }}
247
+ >
248
+ <IconTodo style={IconStyle} />
249
+ 任务中心
248
250
  </span>
249
- {/* </Tooltip> */}
250
251
  {systemUserInfo && (
251
252
  <Notification
252
253
  customStyles={{
@@ -2,11 +2,12 @@
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: space-between;
5
- height: 62px;
5
+ height: 56px;
6
6
  padding: 0 18px;
7
- line-height: 62px;
7
+ line-height: 56px;
8
8
  background-color: #fff;
9
- border-radius: 5px;
9
+ border-radius: 6px;
10
+ box-shadow: 0px 4px 24px rgba(0, 0, 0, 0.12);
10
11
  &__logo {
11
12
  margin-left: 10px;
12
13
  cursor: pointer;
@@ -20,7 +21,7 @@
20
21
  }
21
22
 
22
23
  &__icon {
23
- margin-right: 20px;
24
+ margin-right: 30px;
24
25
  cursor: pointer;
25
26
  display: flex;
26
27
  align-items: center;
@@ -35,7 +36,7 @@
35
36
  }
36
37
  &__right-content {
37
38
  > div {
38
- margin-right: 20px;
39
+ margin-right: 18px;
39
40
  }
40
41
  a {
41
42
  color: rgba(0, 0, 0, .85);
@@ -47,7 +48,7 @@
47
48
  .ant-divider-vertical {
48
49
  border-color: rgba(0, 0, 0, .85);
49
50
  height: 1em;
50
- margin: 0 10px 0 0;
51
+ margin: 0 22px 0 12px;
51
52
  }
52
53
  }
53
54
  }
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { createFromIconfontCN } from '@ant-design/icons';
3
+
4
+ const Icons = createFromIconfontCN({
5
+ scriptUrl: '//at.alicdn.com/t/font_2716486_dpnjwgvqpfn.js',
6
+ });
7
+
8
+ const IconBell = (args) => {
9
+ return <Icons type="icon-bell" {...args} />;
10
+ };
11
+ const IconTodo = (args) => {
12
+ return <Icons type="icon-todo" {...args} />;
13
+ };
14
+ const IconConsole = (args) => {
15
+ return <Icons type="icon-console" {...args} />;
16
+ };
17
+ const IconMore = (args) => {
18
+ return <Icons type="icon-more" {...args} />;
19
+ };
20
+
21
+ export { IconBell, IconTodo, IconConsole, IconMore };
@@ -10,14 +10,16 @@ import Captcha from './Captcha';
10
10
  import styles from './universal.less';
11
11
 
12
12
  const Forget = (props) => {
13
- const { reqCb } = props;
13
+ const { reqCb, hideTitle = false } = props;
14
14
  const [step, setStep] = useState('captcha');
15
15
  const [mobile, setMobile] = useState('');
16
16
 
17
17
  return (
18
18
  <>
19
19
  <div className={styles['universal-login']}>
20
- <h1 className={styles['universal-login__title']}>重置密码</h1>
20
+ {!hideTitle && (
21
+ <h1 className={styles['universal-login__title']}>重置密码</h1>
22
+ )}
21
23
  <Card bordered={false} className={styles['universal-login__card']}>
22
24
  <ProForm
23
25
  submitter={false}
@@ -103,6 +105,7 @@ const Forget = (props) => {
103
105
 
104
106
  Forget.propTypes = {
105
107
  reqCb: PropTypes.func.required,
108
+ hideTitle: PropTypes.bool,
106
109
  };
107
110
 
108
111
  export default Forget;
@@ -10,7 +10,7 @@
10
10
  align-items: center;
11
11
  }
12
12
  &__title {
13
- margin-left: 3px;
13
+ margin-left: 10px;
14
14
  color: rgba(0, 0, 0, 0.85);
15
15
  }
16
16
  &__list-container {
@@ -4,12 +4,12 @@ import moment from 'moment';
4
4
  import qs from 'qs';
5
5
 
6
6
  import { Badge, Button, notification } from 'antd';
7
- import { BellOutlined } from '@ant-design/icons';
8
7
  import ProList from '@ant-design/pro-list';
9
8
 
10
9
  import { io } from 'socket.io-client';
11
10
  import { getWsApiHost, getEnvVar, getMessageCenterRedirectUrl } from './env';
12
11
  import { queryLatestMessageList } from './service';
12
+ import { IconBell } from '../Icons/';
13
13
 
14
14
  import styles from './index.less';
15
15
 
@@ -122,7 +122,7 @@ const RecentNotification = (props) => {
122
122
  {/* <Tooltip title="消息中心"> */}
123
123
  <div className={styles['notification-container__badge']}>
124
124
  <Badge count={messageCount}>
125
- <BellOutlined style={{ fontSize: '20px' }} />
125
+ <IconBell style={{ fontSize: '20px' }} />
126
126
  </Badge>
127
127
  {showLabel && (
128
128
  <span className={styles['notification-container__title']}>
@@ -25,8 +25,9 @@ const TenantSelector = (props) => {
25
25
 
26
26
  return (
27
27
  <Select
28
+ showSearch
29
+ optionFilterProp="children"
28
30
  bordered={false}
29
- // size="large"
30
31
  value={currentTenantId}
31
32
  style={{ width: '200px' }}
32
33
  onChange={(value) => {
@@ -1,8 +1,52 @@
1
1
  @import '~antd/lib/style/themes/default.less';
2
2
  @import '~antd/dist/antd.less';
3
3
 
4
+ :global {
5
+ .ant-pro-basicLayout {
6
+ .ant-layout-header {
7
+ &:first-child {
8
+ display: none;
9
+ }
10
+ left: 24px !important;
11
+ right: 24px !important;
12
+ width: auto !important;
13
+ }
14
+ .ant-layout-sider {
15
+ left: 24px !important;
16
+ top: 80px !important;
17
+ padding-top: 0 !important;
18
+ }
19
+ .ant-pro-basicLayout-content {
20
+ margin: 80px 24px 0 48px !important;
21
+ }
22
+ .ant-layout-footer {
23
+ background-color: @modal-header-bg !important;
24
+ .ant-pro-global-footer {
25
+ margin-left: 24px;
26
+ text-align: left;
27
+ }
28
+ }
29
+ }
30
+ }
31
+
4
32
  body {
33
+ background-color: @modal-header-bg !important;
5
34
  // :global {
35
+ // Scrollbar
36
+ ::-webkit-scrollbar {
37
+ width: @border-radius-base;
38
+ height: @border-radius-base;
39
+ }
40
+ ::-webkit-scrollbar-thumb {
41
+ background: @primary-color;
42
+ border-radius: @border-radius-base;
43
+ }
44
+ ::-webkit-scrollbar-track {
45
+ border-radius: @border-radius-base;
46
+ }
47
+ ::-webkit-scrollbar-corner {
48
+ background: transparent;
49
+ }
6
50
  // Button
7
51
  .ant-btn {
8
52
  padding: 0 22px;
@@ -23,7 +67,7 @@ body {
23
67
  background-color: fade(@primary-color, 65%);
24
68
  }
25
69
  &.gradient {
26
- background: linear-gradient(45deg, @primary-color 0%, @primary-color-gradient 100%);
70
+ background: linear-gradient(45deg, #7367f0 0%, #9e95f5 100%);
27
71
  border: none;
28
72
  }
29
73
  }
@@ -254,6 +298,9 @@ body {
254
298
  line-height: 18px;
255
299
  border: none;
256
300
  border-radius: 4px;
301
+ &.pill {
302
+ border-radius: 17px;
303
+ }
257
304
  &.secondary {
258
305
  color: @default-color;
259
306
  }
@@ -664,17 +711,24 @@ body {
664
711
  color: @white !important;
665
712
  }
666
713
  &:hover {
667
- background-color: #f8f8f8;
714
+ background-color: @modal-header-bg;
668
715
  }
669
716
  }
670
717
  .ant-menu-light .ant-menu-item:hover {
671
718
  color: @font-color;
672
719
  }
720
+ .ant-menu-submenu-selected {
721
+ .ant-menu-submenu-title {
722
+ background-color: @modal-header-bg;
723
+ &:hover {
724
+ .ant-menu-submenu-arrow {
725
+ color: @font-paragraph-color;
726
+ }
727
+ }
728
+ }
729
+ }
673
730
  .ant-menu-submenu-title {
674
- // height: auto !important;
675
- // line-height: normal !important;
676
- color: @placeholder-color !important;
677
- // font-size: @font-paragraph-small;
731
+ color: @font-color !important;
678
732
  &:active {
679
733
  background: transparent;
680
734
  }
@@ -687,7 +741,7 @@ body {
687
741
  }
688
742
  .ant-menu-item-selected {
689
743
  color: @white;
690
- background: linear-gradient(46.62deg, @primary-color 0%, @primary-color-gradient 93.64%);
744
+ background: linear-gradient(46.62deg, #7367f0 0%, #9e95f5 93.64%);
691
745
  &:hover {
692
746
  color: @white !important;
693
747
  }
@@ -830,7 +884,7 @@ body {
830
884
  .ant-list-item {
831
885
  color: @font-paragraph-color;
832
886
  &:hover {
833
- background-color: #f8f8f8;
887
+ background-color: @modal-header-bg;
834
888
  }
835
889
  p {
836
890
  color: @placeholder-color;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeeyoon/library",
3
- "version": "2.2.1",
3
+ "version": "2.2.5",
4
4
  "description": "宜云前端组件库和通用服务",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -20,6 +20,7 @@
20
20
  "precommit": "lint-staged"
21
21
  },
22
22
  "dependencies": {
23
+ "@ant-design/pro-layout": "^6.26.0",
23
24
  "@ant-design/pro-list": "^1.12.0",
24
25
  "antd": "^4.10.0",
25
26
  "dva": "^2.6.0-beta.6",
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,22 +1,24 @@
1
1
  import React from 'react';
2
2
  import Header from '../../lib/components/Header/';
3
3
  import TenantSelector from '../../lib/components/TenantSelector/';
4
+ import CustomDefaultFooter from '../../lib/components/DefaultFooter/';
4
5
 
5
6
  // eslint-disable-next-line react/display-name
6
7
  export default function () {
7
8
  return (
8
9
  <>
9
- <Header
10
+ {/* <Header
10
11
  productName="profile"
11
12
  tenantId="053a033a063711ecb0c00c42a1ff8370"
12
13
  token="ZmI1YzU4NzEyOTdlNDM2MTg2YjI0N2IyZGQzOGI3NDg1NDE2MzI2MjU4NjMzNzY="
13
14
  avatar="https://demo-yeeyoon-fm.oss-cn-zhangjiakou.aliyuncs.com/userCenter/userAvatar/user_avatar2.png"
14
15
  userName="王甍"
15
- />
16
- {/* <TenantSelector
16
+ /> */}
17
+ <TenantSelector
17
18
  tenantId="14bfb5d71d1011eca9820c42a1f6bf88"
18
19
  tenantIdChangeCb={(id) => console.log(id)}
19
- /> */}
20
+ />
21
+ {/* <CustomDefaultFooter /> */}
20
22
  </>
21
23
  );
22
24
  }