@bit-sun/business-component 2.0.32 → 2.0.34-alpha.0

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.
Files changed (100) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +4 -4
  3. package/.gitlab-ci.yml +174 -174
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +74 -74
  7. package/README.md +27 -27
  8. package/dist/index.esm.js +5885 -7643
  9. package/dist/index.js +5882 -7640
  10. package/docs/index.md +21 -21
  11. package/lib/assets/drag.svg +17 -17
  12. package/lib/assets/exportFail.svg +37 -37
  13. package/lib/assets/exportProcessing.svg +28 -28
  14. package/lib/assets/exportSuccess.svg +34 -34
  15. package/lib/assets/label_icon_bottom.svg +25 -25
  16. package/lib/assets/upExport.svg +22 -22
  17. package/package.json +69 -69
  18. package/src/assets/btn-delete.svg +29 -29
  19. package/src/assets/btn-edit.svg +19 -19
  20. package/src/assets/btn-more.svg +17 -17
  21. package/src/assets/btn-submit.svg +19 -19
  22. package/src/assets/close.svg +26 -26
  23. package/src/assets/drag.svg +17 -17
  24. package/src/assets/exportFail.svg +37 -37
  25. package/src/assets/exportProcessing.svg +28 -28
  26. package/src/assets/exportSuccess.svg +34 -34
  27. package/src/assets/fixed-left-active.svg +11 -11
  28. package/src/assets/fixed-left.svg +15 -15
  29. package/src/assets/fixed-right-active.svg +11 -11
  30. package/src/assets/fixed-right.svg +15 -15
  31. package/src/assets/icon-quanping.svg +15 -15
  32. package/src/assets/icon-shezhi.svg +17 -17
  33. package/src/assets/label_icon_bottom.svg +25 -25
  34. package/src/assets/scanning.svg +24 -24
  35. package/src/assets/upExport.svg +22 -22
  36. package/src/components/Business/AddSelectBusiness/index.md +41 -41
  37. package/src/components/Business/AddSelectBusiness/index.tsx +290 -290
  38. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  39. package/src/components/Business/BsSulaQueryTable/index.tsx +534 -534
  40. package/src/components/Business/BsSulaQueryTable/setting.tsx +817 -817
  41. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  42. package/src/components/Business/BsSulaQueryTable/utils.tsx +690 -690
  43. package/src/components/Business/CommodityEntry/index.md +70 -70
  44. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  45. package/src/components/Business/CommonAlert/index.tsx +23 -23
  46. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  47. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  48. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  49. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  50. package/src/components/Business/DetailPageWrapper/index.tsx +324 -324
  51. package/src/components/Business/DetailPageWrapper/utils.tsx +110 -110
  52. package/src/components/Business/HomePageWrapper/index.less +33 -33
  53. package/src/components/Business/HomePageWrapper/index.md +45 -45
  54. package/src/components/Business/HomePageWrapper/index.tsx +150 -150
  55. package/src/components/Business/SearchSelect/BusinessUtils.ts +1448 -1448
  56. package/src/components/Business/SearchSelect/common.ts +53 -53
  57. package/src/components/Business/SearchSelect/index.md +1137 -1137
  58. package/src/components/Business/SearchSelect/index.tsx +51 -51
  59. package/src/components/Business/SearchSelect/utils.ts +99 -99
  60. package/src/components/Business/StateFlow/index.less +130 -130
  61. package/src/components/Business/StateFlow/index.md +60 -60
  62. package/src/components/Business/StateFlow/index.tsx +29 -29
  63. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  64. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  65. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  66. package/src/components/Business/columnSettingTable/columnSetting.tsx +762 -762
  67. package/src/components/Business/columnSettingTable/index.less +247 -247
  68. package/src/components/Business/columnSettingTable/index.md +357 -357
  69. package/src/components/Business/columnSettingTable/index.tsx +225 -225
  70. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +233 -233
  71. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  72. package/src/components/Functional/AddSelect/index.less +367 -367
  73. package/src/components/Functional/AddSelect/index.md +122 -122
  74. package/src/components/Functional/AddSelect/index.tsx +962 -962
  75. package/src/components/Functional/BillEntry/index.less +371 -371
  76. package/src/components/Functional/BillEntry/index.md +39 -37
  77. package/src/components/Functional/BillEntry/index.tsx +607 -547
  78. package/src/components/Functional/DataImport/index.less +63 -63
  79. package/src/components/Functional/DataImport/index.md +44 -44
  80. package/src/components/Functional/DataImport/index.tsx +689 -689
  81. package/src/components/Functional/DataValidation/index.less +63 -63
  82. package/src/components/Functional/DataValidation/index.md +38 -38
  83. package/src/components/Functional/DataValidation/index.tsx +681 -681
  84. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  85. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  86. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  87. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  88. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  89. package/src/components/Functional/SearchSelect/index.less +115 -115
  90. package/src/components/Functional/SearchSelect/index.md +141 -141
  91. package/src/components/Functional/SearchSelect/index.tsx +812 -812
  92. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  93. package/src/components/Functional/TreeSearchSelect/index.tsx +149 -149
  94. package/src/index.ts +30 -30
  95. package/src/utils/CheckOneUser/index.md +39 -39
  96. package/src/utils/CheckOneUser/index.ts +51 -51
  97. package/src/utils/requestUtils.ts +32 -32
  98. package/src/utils/utils.ts +22 -22
  99. package/tsconfig.json +29 -29
  100. package/typings.d.ts +4 -4
@@ -1,111 +1,111 @@
1
- // @ts-nocheck
2
- import { request } from 'bssula';
3
- import { Modal } from 'antd';
4
- import { ExclamationCircleOutlined } from '@ant-design/icons';
5
- import React from 'react';
6
- import { formatMessage, history } from 'umi';
7
- import isEqual from 'lodash/isEqual';
8
- import memoizeOne from 'memoize-one';
9
-
10
- interface actionItem {
11
- [propName: string]: any;
12
- }
13
-
14
- export const doDetailPageAction = (config: actionItem) => {
15
- if (config?.type == 'modal') {
16
- const { confirm } = Modal;
17
- let requestConfig = {
18
- url: config.url,
19
- method: config.method,
20
- params: config.params || {},
21
- successMessage: config?.successMessage,
22
- };
23
-
24
-
25
- const onOk = () => {
26
- request(requestConfig).then((res) => {
27
- if (config.backPath) {
28
- history.push({
29
- pathname: config.backPath
30
- })
31
- }
32
- // 是否执行成功之后的回调
33
- if (typeof (config.successCb) === 'function') {
34
- config.successCb();
35
- }
36
- });
37
- };
38
-
39
- if (config.noConfirm) {
40
- onOk();
41
- } else {
42
- confirm({
43
- title: config.title,
44
- icon: <ExclamationCircleOutlined />,
45
- content: config.content,
46
- okText: '确定',
47
- okType: 'danger',
48
- cancelText: '取消',
49
- onOk,
50
- onCancel() {
51
- console.log('Cancel');
52
- },
53
- });
54
- }
55
- }
56
- }
57
-
58
- export const formatter = (data, parentAuthority, parentName) => {
59
- return data
60
- .map((item) => {
61
- if (!item.name || !item.path) {
62
- return null;
63
- }
64
-
65
- let locale = 'menu';
66
- if (parentName) {
67
- locale = `${parentName}.${item.name}`;
68
- } else {
69
- locale = `menu.${item.name}`;
70
- }
71
- const result = {
72
- ...item,
73
- name: formatMessage && formatMessage({ id: locale, defaultMessage: item.name }) || item.name,
74
- locale,
75
- authority: item.authority || parentAuthority,
76
- };
77
- if (item.routes) {
78
- const children = formatter(item.routes, item.authority, locale);
79
- // Reduce memory usage
80
- result.children = children;
81
- }
82
- delete result.routes;
83
- return result;
84
- })
85
- .filter((item) => item);
86
- };
87
-
88
- export const memoizeOneFormatter = memoizeOne(formatter, isEqual);
89
-
90
- export const getBreadcrumbNameMap = (menuData) => {
91
- const routerMap = {};
92
-
93
- const flattenMenuData = (data) => {
94
- data.forEach((menuItem) => {
95
- if (menuItem.children) {
96
- flattenMenuData(menuItem.children);
97
- }
98
- // Reduce memory usage
99
- routerMap[menuItem.path] = menuItem;
100
- });
101
- };
102
- flattenMenuData(menuData);
103
- return routerMap;
104
- };
105
-
106
- export const judgeIsEmpty = (value: any) => {
107
- if (value == null || value == undefined || String(value).trim() == '') {
108
- return true;
109
- }
110
- return false;
1
+ // @ts-nocheck
2
+ import { request } from 'bssula';
3
+ import { Modal } from 'antd';
4
+ import { ExclamationCircleOutlined } from '@ant-design/icons';
5
+ import React from 'react';
6
+ import { formatMessage, history } from 'umi';
7
+ import isEqual from 'lodash/isEqual';
8
+ import memoizeOne from 'memoize-one';
9
+
10
+ interface actionItem {
11
+ [propName: string]: any;
12
+ }
13
+
14
+ export const doDetailPageAction = (config: actionItem) => {
15
+ if (config?.type == 'modal') {
16
+ const { confirm } = Modal;
17
+ let requestConfig = {
18
+ url: config.url,
19
+ method: config.method,
20
+ params: config.params || {},
21
+ successMessage: config?.successMessage,
22
+ };
23
+
24
+
25
+ const onOk = () => {
26
+ request(requestConfig).then((res) => {
27
+ if (config.backPath) {
28
+ history.push({
29
+ pathname: config.backPath
30
+ })
31
+ }
32
+ // 是否执行成功之后的回调
33
+ if (typeof (config.successCb) === 'function') {
34
+ config.successCb();
35
+ }
36
+ });
37
+ };
38
+
39
+ if (config.noConfirm) {
40
+ onOk();
41
+ } else {
42
+ confirm({
43
+ title: config.title,
44
+ icon: <ExclamationCircleOutlined />,
45
+ content: config.content,
46
+ okText: '确定',
47
+ okType: 'danger',
48
+ cancelText: '取消',
49
+ onOk,
50
+ onCancel() {
51
+ console.log('Cancel');
52
+ },
53
+ });
54
+ }
55
+ }
56
+ }
57
+
58
+ export const formatter = (data, parentAuthority, parentName) => {
59
+ return data
60
+ .map((item) => {
61
+ if (!item.name || !item.path) {
62
+ return null;
63
+ }
64
+
65
+ let locale = 'menu';
66
+ if (parentName) {
67
+ locale = `${parentName}.${item.name}`;
68
+ } else {
69
+ locale = `menu.${item.name}`;
70
+ }
71
+ const result = {
72
+ ...item,
73
+ name: formatMessage && formatMessage({ id: locale, defaultMessage: item.name }) || item.name,
74
+ locale,
75
+ authority: item.authority || parentAuthority,
76
+ };
77
+ if (item.routes) {
78
+ const children = formatter(item.routes, item.authority, locale);
79
+ // Reduce memory usage
80
+ result.children = children;
81
+ }
82
+ delete result.routes;
83
+ return result;
84
+ })
85
+ .filter((item) => item);
86
+ };
87
+
88
+ export const memoizeOneFormatter = memoizeOne(formatter, isEqual);
89
+
90
+ export const getBreadcrumbNameMap = (menuData) => {
91
+ const routerMap = {};
92
+
93
+ const flattenMenuData = (data) => {
94
+ data.forEach((menuItem) => {
95
+ if (menuItem.children) {
96
+ flattenMenuData(menuItem.children);
97
+ }
98
+ // Reduce memory usage
99
+ routerMap[menuItem.path] = menuItem;
100
+ });
101
+ };
102
+ flattenMenuData(menuData);
103
+ return routerMap;
104
+ };
105
+
106
+ export const judgeIsEmpty = (value: any) => {
107
+ if (value == null || value == undefined || String(value).trim() == '') {
108
+ return true;
109
+ }
110
+ return false;
111
111
  };
@@ -1,33 +1,33 @@
1
- .home_page_head {
2
- height: 54px;
3
- display: flex;
4
- justify-content: space-between;
5
- align-items: center;
6
- background-color: #FFFFFF;
7
- border-bottom: 1px solid #f0f0f0;
8
- padding: 0 20px;
9
- .home_page_title {
10
- height: 20px;
11
- font-family: PingFangSC-Medium;
12
- font-weight: 600;
13
- font-size: 16px;
14
- color: #000000;
15
- letter-spacing: 0;
16
- line-height: 20px;
17
- flex-grow: 1;
18
- margin-top: 2px;
19
- }
20
- .ant-breadcrumb {
21
- display: block !important;
22
- .ant-breadcrumb-separator {
23
- margin: 0 2px;
24
- }
25
- li .bread_name {
26
-
27
- color: #8A8F8D;
28
- font-size: 12px;
29
- line-height: 16px;
30
- cursor: pointer;
31
- }
32
- }
33
- }
1
+ .home_page_head {
2
+ height: 54px;
3
+ display: flex;
4
+ justify-content: space-between;
5
+ align-items: center;
6
+ background-color: #FFFFFF;
7
+ border-bottom: 1px solid #f0f0f0;
8
+ padding: 0 20px;
9
+ .home_page_title {
10
+ height: 20px;
11
+ font-family: PingFangSC-Medium;
12
+ font-weight: 600;
13
+ font-size: 16px;
14
+ color: #000000;
15
+ letter-spacing: 0;
16
+ line-height: 20px;
17
+ flex-grow: 1;
18
+ margin-top: 2px;
19
+ }
20
+ .ant-breadcrumb {
21
+ display: block !important;
22
+ .ant-breadcrumb-separator {
23
+ margin: 0 2px;
24
+ }
25
+ li .bread_name {
26
+
27
+ color: #8A8F8D;
28
+ font-size: 12px;
29
+ line-height: 16px;
30
+ cursor: pointer;
31
+ }
32
+ }
33
+ }
@@ -1,45 +1,45 @@
1
- ---
2
- nav:
3
- title: '组件'
4
- order: 1
5
- group:
6
- title: 业务组件
7
- order: 1
8
- title: 标题组件
9
- order: 1
10
- ---
11
-
12
- # HomePageWrapper
13
-
14
-
15
- ## 首页标题组件
16
-
17
- ```tsx
18
- import { HomePageWrapper } from '../../../index.ts';
19
- import React, { useState } from 'react';
20
-
21
- export default () => {
22
- const routes = [
23
- {
24
- path: '/',
25
- name: 'welcome',
26
- routes: [
27
- {
28
- path: '/components',
29
- name: '组件',
30
- routes: [
31
- {
32
- path: '/components/business/home-page-wrapper',
33
- name: '标题组件',
34
- component: 'aaa'
35
- }
36
- ]
37
- }
38
- ]
39
- }
40
- ]
41
- return (
42
- <HomePageWrapper routes={routes} />
43
- );
44
- };
45
- ```
1
+ ---
2
+ nav:
3
+ title: '组件'
4
+ order: 1
5
+ group:
6
+ title: 业务组件
7
+ order: 1
8
+ title: 标题组件
9
+ order: 1
10
+ ---
11
+
12
+ # HomePageWrapper
13
+
14
+
15
+ ## 首页标题组件
16
+
17
+ ```tsx
18
+ import { HomePageWrapper } from '../../../index.ts';
19
+ import React, { useState } from 'react';
20
+
21
+ export default () => {
22
+ const routes = [
23
+ {
24
+ path: '/',
25
+ name: 'welcome',
26
+ routes: [
27
+ {
28
+ path: '/components',
29
+ name: '组件',
30
+ routes: [
31
+ {
32
+ path: '/components/business/home-page-wrapper',
33
+ name: '标题组件',
34
+ component: 'aaa'
35
+ }
36
+ ]
37
+ }
38
+ ]
39
+ }
40
+ ]
41
+ return (
42
+ <HomePageWrapper routes={routes} />
43
+ );
44
+ };
45
+ ```
@@ -1,150 +1,150 @@
1
- // @ts-nocheck
2
- import React, { useEffect, useState, useMemo } from 'react';
3
- import { history } from 'umi';
4
- import { memoizeOneFormatter, getBreadcrumbNameMap } from '../DetailPageWrapper/utils';
5
- import pathToRegexp from 'path-to-regexp';
6
- import { Breadcrumb, Space } from 'antd';
7
- import './index.less';
8
- import { useLocation, formatMessage } from 'umi';
9
- import CommonAlert from '../CommonAlert';
10
-
11
- export default (props: any) => {
12
- const { pathname } = useLocation();
13
- const [id]: any = useState(pathname + 'id');
14
- const { children, ...restProps} = props;
15
-
16
- return (
17
- <div id={id} className={'home_page_wrapper'}>
18
- <HeaderWrapper
19
- pathname={pathname}
20
- {
21
- ...restProps
22
- }
23
- />
24
- {props.children}
25
- </div>
26
- );
27
- };
28
-
29
- const HeaderWrapper = React.memo(
30
- ({
31
- pathname,
32
- routes=[],
33
- itemPath,
34
- alertProps,
35
- extra,
36
- }: { pathname: string, routes: any[], itemPath: string, alertProps: any }) => {
37
- const basePath = window.top == window ? '' : `/${itemPath}`;
38
- const menuRoutes =
39
- window.top == window
40
- ? routes.find((item) => item.path === '/')?.routes || []
41
- : JSON.parse(localStorage.getItem('limitedMenuData') || '[]');
42
-
43
- const breadcrumbNameMap = getBreadcrumbNameMap(
44
- memoizeOneFormatter(menuRoutes, ''),
45
- );
46
-
47
- const matchParamsPath = (pathname: string, breadcrumbNameMap: object) => {
48
- const pathKey: any = Object.keys(breadcrumbNameMap).find((key) =>
49
- pathToRegexp(key).test(pathname),
50
- );
51
- return breadcrumbNameMap[pathKey];
52
- };
53
-
54
- const getPageTitle = (pathname: string) => {
55
- const currRouterData = matchParamsPath(
56
- `${basePath}${pathname}`,
57
- breadcrumbNameMap,
58
- );
59
-
60
- if (!currRouterData) {
61
- return '';
62
- }
63
- const pageName = formatMessage({
64
- id: currRouterData.locale || currRouterData.name,
65
- defaultMessage: currRouterData.name,
66
- });
67
- return `${pageName}`;
68
- };
69
-
70
- const pageTitle = useMemo(() => getPageTitle(pathname), [pathname]);
71
-
72
- useEffect(() => {}, [pathname]);
73
-
74
- const breadcrumbArr = `${basePath}${pathname}`
75
- .split('/')
76
- .slice(1)
77
- .map((_item, index, arr) =>
78
- matchParamsPath(
79
- `/${arr.slice(0, index + 1).join('/')}`,
80
- breadcrumbNameMap,
81
- ),
82
- )
83
- .filter((item) => item);
84
-
85
-
86
- return (
87
- <div>
88
- <div className={'home_page_head'}>
89
- <div>
90
- <div className={'home_page_title'}>{pageTitle}</div>
91
- <Breadcrumb>
92
- {breadcrumbArr.map((item) => (
93
- <Breadcrumb.Item
94
- key={item.path}
95
- onClick={() => {
96
- if (
97
- item.path &&
98
- !item.children &&
99
- !pathToRegexp(item.path).test(`${basePath}${pathname}`)
100
- ) {
101
- history.push({
102
- pathname: item.path.replace(basePath, ''),
103
- });
104
- }
105
- }}
106
- >
107
- <span
108
- style={{
109
- color: pathToRegexp(item.path).test(
110
- `${basePath}${pathname}`,
111
- )
112
- ? '#000000d9'
113
- : '',
114
- }}
115
- className="bread_name"
116
- >
117
- {item.name}
118
- </span>
119
- </Breadcrumb.Item>
120
- ))}
121
- </Breadcrumb>
122
- </div>
123
- {
124
- extra ?
125
- <Space>
126
- {
127
- extra
128
- }
129
- </Space> : ''
130
- }
131
- </div>
132
- {
133
- alertProps && (
134
- <CommonAlert
135
- {
136
- ...alertProps
137
- }
138
- />
139
- )
140
- }
141
- </div>
142
- );
143
- },
144
- (prevProps, nextProps) => {
145
- // if (prevProps.pathname === nextProps.pathname) {
146
- // return true;
147
- // }
148
- return true;
149
- },
150
- );
1
+ // @ts-nocheck
2
+ import React, { useEffect, useState, useMemo } from 'react';
3
+ import { history } from 'umi';
4
+ import { memoizeOneFormatter, getBreadcrumbNameMap } from '../DetailPageWrapper/utils';
5
+ import pathToRegexp from 'path-to-regexp';
6
+ import { Breadcrumb, Space } from 'antd';
7
+ import './index.less';
8
+ import { useLocation, formatMessage } from 'umi';
9
+ import CommonAlert from '../CommonAlert';
10
+
11
+ export default (props: any) => {
12
+ const { pathname } = useLocation();
13
+ const [id]: any = useState(pathname + 'id');
14
+ const { children, ...restProps} = props;
15
+
16
+ return (
17
+ <div id={id} className={'home_page_wrapper'}>
18
+ <HeaderWrapper
19
+ pathname={pathname}
20
+ {
21
+ ...restProps
22
+ }
23
+ />
24
+ {props.children}
25
+ </div>
26
+ );
27
+ };
28
+
29
+ const HeaderWrapper = React.memo(
30
+ ({
31
+ pathname,
32
+ routes=[],
33
+ itemPath,
34
+ alertProps,
35
+ extra,
36
+ }: { pathname: string, routes: any[], itemPath: string, alertProps: any }) => {
37
+ const basePath = window.top == window ? '' : `/${itemPath}`;
38
+ const menuRoutes =
39
+ window.top == window
40
+ ? routes.find((item) => item.path === '/')?.routes || []
41
+ : JSON.parse(localStorage.getItem('limitedMenuData') || '[]');
42
+
43
+ const breadcrumbNameMap = getBreadcrumbNameMap(
44
+ memoizeOneFormatter(menuRoutes, ''),
45
+ );
46
+
47
+ const matchParamsPath = (pathname: string, breadcrumbNameMap: object) => {
48
+ const pathKey: any = Object.keys(breadcrumbNameMap).find((key) =>
49
+ pathToRegexp(key).test(pathname),
50
+ );
51
+ return breadcrumbNameMap[pathKey];
52
+ };
53
+
54
+ const getPageTitle = (pathname: string) => {
55
+ const currRouterData = matchParamsPath(
56
+ `${basePath}${pathname}`,
57
+ breadcrumbNameMap,
58
+ );
59
+
60
+ if (!currRouterData) {
61
+ return '';
62
+ }
63
+ const pageName = formatMessage({
64
+ id: currRouterData.locale || currRouterData.name,
65
+ defaultMessage: currRouterData.name,
66
+ });
67
+ return `${pageName}`;
68
+ };
69
+
70
+ const pageTitle = useMemo(() => getPageTitle(pathname), [pathname]);
71
+
72
+ useEffect(() => {}, [pathname]);
73
+
74
+ const breadcrumbArr = `${basePath}${pathname}`
75
+ .split('/')
76
+ .slice(1)
77
+ .map((_item, index, arr) =>
78
+ matchParamsPath(
79
+ `/${arr.slice(0, index + 1).join('/')}`,
80
+ breadcrumbNameMap,
81
+ ),
82
+ )
83
+ .filter((item) => item);
84
+
85
+
86
+ return (
87
+ <div>
88
+ <div className={'home_page_head'}>
89
+ <div>
90
+ <div className={'home_page_title'}>{pageTitle}</div>
91
+ <Breadcrumb>
92
+ {breadcrumbArr.map((item) => (
93
+ <Breadcrumb.Item
94
+ key={item.path}
95
+ onClick={() => {
96
+ if (
97
+ item.path &&
98
+ !item.children &&
99
+ !pathToRegexp(item.path).test(`${basePath}${pathname}`)
100
+ ) {
101
+ history.push({
102
+ pathname: item.path.replace(basePath, ''),
103
+ });
104
+ }
105
+ }}
106
+ >
107
+ <span
108
+ style={{
109
+ color: pathToRegexp(item.path).test(
110
+ `${basePath}${pathname}`,
111
+ )
112
+ ? '#000000d9'
113
+ : '',
114
+ }}
115
+ className="bread_name"
116
+ >
117
+ {item.name}
118
+ </span>
119
+ </Breadcrumb.Item>
120
+ ))}
121
+ </Breadcrumb>
122
+ </div>
123
+ {
124
+ extra ?
125
+ <Space>
126
+ {
127
+ extra
128
+ }
129
+ </Space> : ''
130
+ }
131
+ </div>
132
+ {
133
+ alertProps && (
134
+ <CommonAlert
135
+ {
136
+ ...alertProps
137
+ }
138
+ />
139
+ )
140
+ }
141
+ </div>
142
+ );
143
+ },
144
+ (prevProps, nextProps) => {
145
+ // if (prevProps.pathname === nextProps.pathname) {
146
+ // return true;
147
+ // }
148
+ return true;
149
+ },
150
+ );