@bit-sun/business-component 2.0.25 → 2.0.26

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 (64) 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 +6239 -4361
  9. package/dist/index.js +6237 -4359
  10. package/docs/index.md +21 -21
  11. package/package.json +52 -52
  12. package/src/assets/drag.svg +17 -17
  13. package/src/assets/exportFail.svg +37 -37
  14. package/src/assets/exportProcessing.svg +28 -28
  15. package/src/assets/exportSuccess.svg +34 -34
  16. package/src/assets/label_icon_bottom.svg +25 -25
  17. package/src/assets/upExport.svg +22 -22
  18. package/src/components/Business/AddSelectBusiness/index.md +41 -41
  19. package/src/components/Business/AddSelectBusiness/index.tsx +290 -290
  20. package/src/components/Business/CommodityEntry/index.md +70 -70
  21. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  22. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  23. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  24. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  25. package/src/components/Business/SearchSelect/BusinessUtils.ts +1446 -1446
  26. package/src/components/Business/SearchSelect/common.ts +53 -53
  27. package/src/components/Business/SearchSelect/index.md +1137 -1137
  28. package/src/components/Business/SearchSelect/index.tsx +51 -48
  29. package/src/components/Business/SearchSelect/utils.ts +99 -99
  30. package/src/components/Business/StateFlow/index.less +130 -130
  31. package/src/components/Business/StateFlow/index.md +60 -60
  32. package/src/components/Business/StateFlow/index.tsx +29 -29
  33. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  34. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  35. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  36. package/src/components/Functional/AddSelect/index.less +367 -367
  37. package/src/components/Functional/AddSelect/index.md +122 -122
  38. package/src/components/Functional/AddSelect/index.tsx +952 -952
  39. package/src/components/Functional/BillEntry/index.less +371 -371
  40. package/src/components/Functional/BillEntry/index.md +37 -37
  41. package/src/components/Functional/BillEntry/index.tsx +547 -547
  42. package/src/components/Functional/DataImport/index.less +63 -63
  43. package/src/components/Functional/DataImport/index.md +44 -44
  44. package/src/components/Functional/DataImport/index.tsx +689 -689
  45. package/src/components/Functional/DataValidation/index.less +63 -63
  46. package/src/components/Functional/DataValidation/index.md +38 -38
  47. package/src/components/Functional/DataValidation/index.tsx +681 -681
  48. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  49. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +58 -59
  50. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  51. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  52. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  53. package/src/components/Functional/SearchSelect/index.less +115 -115
  54. package/src/components/Functional/SearchSelect/index.md +141 -141
  55. package/src/components/Functional/SearchSelect/index.tsx +803 -803
  56. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  57. package/src/components/Functional/TreeSearchSelect/index.tsx +149 -149
  58. package/src/index.ts +25 -25
  59. package/src/utils/CheckOneUser/index.md +39 -39
  60. package/src/utils/CheckOneUser/index.ts +51 -51
  61. package/src/utils/requestUtils.ts +32 -32
  62. package/src/utils/utils.ts +22 -22
  63. package/tsconfig.json +29 -29
  64. package/typings.d.ts +3 -3
@@ -1,49 +1,52 @@
1
- /*
2
- * @Description:
3
- * @Author: rodchen
4
- * @Date: 2022-05-07 15:17:28
5
- * @LastEditTime: 2022-08-16 16:49:01
6
- * @LastEditors: Sirius-kk
7
- */
8
- import React, { useMemo, useRef, forwardRef, useImperativeHandle } from 'react';
9
- import { commonFun } from './BusinessUtils';
10
- import { handleDefaultPrefixUrl } from './utils';
11
- import SearchSelect from '@/components/Functional/SearchSelect';
12
-
13
- const MemoSearchSelect = React.memo(SearchSelect)
14
-
15
- const BusinessSearchSelect = forwardRef((props: any, ref: any) => {
16
- const businessType = props?.selectBusinessType || 'supplier';
17
- const prefixUrl = props?.prefixUrl || { selectPrefix: handleDefaultPrefixUrl(businessType), formSelectFix: handleDefaultPrefixUrl(businessType) };
18
- const innerRef = useRef();
19
-
20
- const { requestConfig, modalTableProps, needModalTable } = commonFun(businessType, prefixUrl, props?.requestConfig || {}, props?.modalTableProps || {});
21
- const currentProps = useMemo(() => {
22
- return {
23
- ...props,
24
- requestConfig,
25
- needModalTable,
26
- modalTableProps
27
- }
28
- }, [props?.value]);
29
-
30
- useImperativeHandle(ref, () => ({
31
- getRef: () => innerRef,
32
- }))
33
-
34
- return (
35
- <div>
36
- <MemoSearchSelect {...currentProps} ref={innerRef} />
37
- </div>
38
- );
39
- });
40
-
41
- export default React.memo(BusinessSearchSelect, (props, nextProps) => {
42
- if (props && props.labelInValue && props.value && JSON.stringify(props.value) !== JSON.stringify(nextProps.value)) {
43
- return false
44
- }
45
- if (props && props.value !== nextProps.value) {
46
- return false
47
- }
48
- return true
1
+ /*
2
+ * @Description:
3
+ * @Author: rodchen
4
+ * @Date: 2022-05-07 15:17:28
5
+ * @LastEditTime: 2022-09-09 16:17:36
6
+ * @LastEditors: Sirius-kk
7
+ */
8
+ import React, { useMemo, useRef, forwardRef, useImperativeHandle } from 'react';
9
+ import { commonFun } from './BusinessUtils';
10
+ import { handleDefaultPrefixUrl } from './utils';
11
+ import SearchSelect from '@/components/Functional/SearchSelect';
12
+
13
+ const MemoSearchSelect = React.memo(SearchSelect)
14
+
15
+ const BusinessSearchSelect = forwardRef((props: any, ref: any) => {
16
+ const businessType = props?.selectBusinessType || 'supplier';
17
+ const prefixUrl = props?.prefixUrl || { selectPrefix: handleDefaultPrefixUrl(businessType), formSelectFix: handleDefaultPrefixUrl(businessType) };
18
+ const innerRef = useRef();
19
+
20
+ const { requestConfig, modalTableProps, needModalTable } = commonFun(businessType, prefixUrl, props?.requestConfig || {}, props?.modalTableProps || {});
21
+ const currentProps = useMemo(() => {
22
+ return {
23
+ ...props,
24
+ requestConfig,
25
+ needModalTable,
26
+ modalTableProps
27
+ }
28
+ }, [props?.value, props.disabled]);
29
+
30
+ useImperativeHandle(ref, () => ({
31
+ getRef: () => innerRef,
32
+ }))
33
+
34
+ return (
35
+ <div>
36
+ <MemoSearchSelect {...currentProps} ref={innerRef} />
37
+ </div>
38
+ );
39
+ });
40
+
41
+ export default React.memo(BusinessSearchSelect, (props, nextProps) => {
42
+ if (props && props.labelInValue && props.value && JSON.stringify(props.value) !== JSON.stringify(nextProps.value)) {
43
+ return false
44
+ }
45
+ if (props && props.value !== nextProps.value) {
46
+ return false
47
+ }
48
+ if (props && props.disabled !== nextProps.disabled) {
49
+ return false
50
+ }
51
+ return true
49
52
  });
@@ -1,99 +1,99 @@
1
- import axios from 'axios';
2
- import { message } from 'antd';
3
- import { stringify } from 'querystring';
4
-
5
- const getDicData = (dicCode: string) => {
6
- let dicData = {};
7
- let dictionaryData;
8
- if (!dictionaryData) {
9
- let storageDic = localStorage.getItem('dicData')
10
- ? JSON.parse(localStorage.getItem('dicData') || '{}')
11
- : {};
12
- dicData = storageDic[dicCode];
13
- } else {
14
- dicData = dictionaryData[dicCode];
15
- }
16
- // @ts-ignore
17
- if (!dicData || !dicData.length) {
18
- // throw new Error(`当前没有${dicCode}字典值`);
19
- }
20
- return dicData
21
- }
22
-
23
- const getDictionarySource = (dicCode: string, needConvertInterger = false) => {
24
- let dicData = getDicData(dicCode);
25
-
26
- try {
27
- if (needConvertInterger) {
28
- // @ts-ignore
29
- dicData = dicData.map((item: { text: string; value: string }) => ({
30
- ...item,
31
- value: parseFloat(item.value),
32
- }));
33
- }
34
- } catch (e) {}
35
- return dicData;
36
- };
37
-
38
- const getDictionaryTextByValue = (dicCode: string, value: string | number) => {
39
- let dicData = getDicData(dicCode);
40
-
41
- if (value === undefined) return '';
42
-
43
- // @ts-ignore
44
- const dicItemArray = dicData?.filter(
45
- (item: { value: string }) => item.value === value.toString(),
46
- );
47
-
48
- if (!dicItemArray?.length) {
49
- // throw new Error(`当前${dicCode}字典值合没有${value}的数据`)
50
- return value;
51
- }
52
-
53
- return dicItemArray[0].text;
54
- };
55
-
56
- const loadSelectSource = (url: string, params?: any) => {
57
- return new Promise((resolve, reject) => {
58
- axios
59
- .get(`${url}?${stringify(params)}`)
60
- .then((result: any) => {
61
- result = result.data;
62
- if ((result?.status && result.status !== '0') || (result?.code && result.code !== '000000')) {
63
- message.error(result.msg);
64
- return;
65
- }
66
- resolve(result);
67
- })
68
- .catch((err) => {
69
- reject(err);
70
- });
71
- })
72
- };
73
-
74
- const handleDefaultPrefixUrl = (type: string) => {
75
- let result;
76
- switch (type){
77
- case 'supplier2': case 'customer2': case 'shopFile2':
78
- result = '/channel-manage';
79
- break;
80
- case 'skuCommodity': case 'skuPropertyValue': case 'spuCommodity':
81
- result = '/items';
82
- break;
83
- case 'physicalWarehouse': case 'realWarehouse': case 'virtualWarehouse': case 'channelWarehouse':
84
- result = '/stock';
85
- break;
86
- case 'inventoryOrg2': case 'purchaseOrg': case 'salesOrg': case 'employee2':
87
- result = '/user';
88
- break;
89
- case 'deliveryMode':
90
- result = '/basic';
91
- break;
92
- default:
93
- result = '/bop/api';
94
- break
95
- }
96
- return result;
97
- };
98
-
99
- export { getDictionarySource, getDictionaryTextByValue, loadSelectSource, handleDefaultPrefixUrl }
1
+ import axios from 'axios';
2
+ import { message } from 'antd';
3
+ import { stringify } from 'querystring';
4
+
5
+ const getDicData = (dicCode: string) => {
6
+ let dicData = {};
7
+ let dictionaryData;
8
+ if (!dictionaryData) {
9
+ let storageDic = localStorage.getItem('dicData')
10
+ ? JSON.parse(localStorage.getItem('dicData') || '{}')
11
+ : {};
12
+ dicData = storageDic[dicCode];
13
+ } else {
14
+ dicData = dictionaryData[dicCode];
15
+ }
16
+ // @ts-ignore
17
+ if (!dicData || !dicData.length) {
18
+ // throw new Error(`当前没有${dicCode}字典值`);
19
+ }
20
+ return dicData
21
+ }
22
+
23
+ const getDictionarySource = (dicCode: string, needConvertInterger = false) => {
24
+ let dicData = getDicData(dicCode);
25
+
26
+ try {
27
+ if (needConvertInterger) {
28
+ // @ts-ignore
29
+ dicData = dicData.map((item: { text: string; value: string }) => ({
30
+ ...item,
31
+ value: parseFloat(item.value),
32
+ }));
33
+ }
34
+ } catch (e) {}
35
+ return dicData;
36
+ };
37
+
38
+ const getDictionaryTextByValue = (dicCode: string, value: string | number) => {
39
+ let dicData = getDicData(dicCode);
40
+
41
+ if (value === undefined) return '';
42
+
43
+ // @ts-ignore
44
+ const dicItemArray = dicData?.filter(
45
+ (item: { value: string }) => item.value === value.toString(),
46
+ );
47
+
48
+ if (!dicItemArray?.length) {
49
+ // throw new Error(`当前${dicCode}字典值合没有${value}的数据`)
50
+ return value;
51
+ }
52
+
53
+ return dicItemArray[0].text;
54
+ };
55
+
56
+ const loadSelectSource = (url: string, params?: any) => {
57
+ return new Promise((resolve, reject) => {
58
+ axios
59
+ .get(`${url}?${stringify(params)}`)
60
+ .then((result: any) => {
61
+ result = result.data;
62
+ if ((result?.status && result.status !== '0') || (result?.code && result.code !== '000000')) {
63
+ message.error(result.msg);
64
+ return;
65
+ }
66
+ resolve(result);
67
+ })
68
+ .catch((err) => {
69
+ reject(err);
70
+ });
71
+ })
72
+ };
73
+
74
+ const handleDefaultPrefixUrl = (type: string) => {
75
+ let result;
76
+ switch (type){
77
+ case 'supplier2': case 'customer2': case 'shopFile2':
78
+ result = '/channel-manage';
79
+ break;
80
+ case 'skuCommodity': case 'skuPropertyValue': case 'spuCommodity':
81
+ result = '/items';
82
+ break;
83
+ case 'physicalWarehouse': case 'realWarehouse': case 'virtualWarehouse': case 'channelWarehouse':
84
+ result = '/stock';
85
+ break;
86
+ case 'inventoryOrg2': case 'purchaseOrg': case 'salesOrg': case 'employee2':
87
+ result = '/user';
88
+ break;
89
+ case 'deliveryMode':
90
+ result = '/basic';
91
+ break;
92
+ default:
93
+ result = '/bop/api';
94
+ break
95
+ }
96
+ return result;
97
+ };
98
+
99
+ export { getDictionarySource, getDictionaryTextByValue, loadSelectSource, handleDefaultPrefixUrl }
@@ -1,131 +1,131 @@
1
- .form-status-label {
2
- height: 48px;
3
- margin-right: 12px;
4
- // flex-grow: 1;
5
- // flex-shrink: 1;
6
- display: inline-block;
7
- position: relative;
8
- background-color: #B0B4B7;
9
- align-items: center;
10
- }
11
- .choosed-status-label.form-status-label {
12
- background-color: #005CFF;
13
- }
14
-
15
- .form-status-label:last-child {
16
- margin-right: 0px;
17
- }
18
-
19
- .form-status-label:first-child::after {
20
- position: absolute;
21
- display: block;
22
- content: '';
23
- right: -48px;
24
- top: 0;
25
- width: 48px;
26
- height: 48px;
27
- border: 24px solid;
28
- border-color: transparent transparent transparent transparent;
29
- border-left: 12px solid #B0B4B7;
30
- }
31
-
32
- .choosed-status-label.form-status-label::after {
33
- border-left: 12px solid #005CFF;
34
- }
35
-
36
- .choosed-status-label.form-status-label:not(:first-child):not(:last-child)::after {
37
- border-left: 12px solid #005CFF;
38
- }
39
-
40
- .form-status-label:last-child::after {
41
- position: absolute;
42
- display: block;
43
- content: '';
44
- left: 0;
45
- top: 0;
46
- width: 48px;
47
- height: 48px;
48
- border: 24px solid;
49
- border-color: transparent transparent transparent transparent;
50
- border-left: 12px solid #ffffff;
51
- }
52
-
53
- .form-status-label:not(:first-child):not(:last-child)::before {
54
- position: absolute;
55
- display: block;
56
- content: '';
57
- left: 0;
58
- top: 0;
59
- width: 48px;
60
- height: 48px;
61
- border: 24px solid;
62
- border-color: transparent transparent transparent transparent;
63
- border-left: 12px solid #ffffff;
64
- }
65
-
66
- .form-status-label:not(:first-child):not(:last-child)::after {
67
- position: absolute;
68
- display: block;
69
- content: '';
70
- right: -48px;
71
- top: 0;
72
- width: 48px;
73
- height: 48px;
74
- border: 24px solid;
75
- border-color: transparent transparent transparent transparent;
76
- border-left: 12px solid #B0B4B7;
77
- }
78
-
79
- .status-label-index {
80
- display: inline-block;
81
- width: 24px;
82
- height: 24px;
83
- border: 1px solid #FFFFFF;
84
- color: #FFFFFF;
85
- border-radius: 50%;
86
- font-family: Montserrat;
87
- font-size: 14px;line-height: 24px;
88
- text-align: center;
89
- margin: 0 6px 0 20px;
90
- }
91
-
92
- .status-label-key {
93
- width: 50px;
94
- height: 100%;
95
- display: inline-flex;
96
- float: left;
97
- // flex-grow: 0;
98
- // flex-shrink: 0;
99
- align-items: center;
100
- justify-content: center;
101
- }
102
-
103
- .status-label-operate {
104
- // flex-grow: 1;
105
- // flex-shrink: 1;
106
- float: left;
107
- width: calc(100% - 50px);
108
- overflow: hidden;
109
- text-overflow: ellipsis;
110
- white-space: nowrap;
111
- height: 100%;
112
- margin: 4px 0;
113
- &>div {
114
- font-size: 12px;
115
- height: 20px;
116
- line-height: 20px;
117
- color: #FFFFFF;
118
- font-family: PingFangSC;
119
- overflow: hidden;
120
- text-overflow: ellipsis;
121
- white-space: nowrap;
122
- }
123
- &>div:first-child {
124
- font-size: 14px;
125
- font-weight: 600;
126
- }
127
- }
128
-
129
- .only-one-child.form-status-label::after,.only-one-child.form-status-label::before {
130
- border-left: 0px;
1
+ .form-status-label {
2
+ height: 48px;
3
+ margin-right: 12px;
4
+ // flex-grow: 1;
5
+ // flex-shrink: 1;
6
+ display: inline-block;
7
+ position: relative;
8
+ background-color: #B0B4B7;
9
+ align-items: center;
10
+ }
11
+ .choosed-status-label.form-status-label {
12
+ background-color: #005CFF;
13
+ }
14
+
15
+ .form-status-label:last-child {
16
+ margin-right: 0px;
17
+ }
18
+
19
+ .form-status-label:first-child::after {
20
+ position: absolute;
21
+ display: block;
22
+ content: '';
23
+ right: -48px;
24
+ top: 0;
25
+ width: 48px;
26
+ height: 48px;
27
+ border: 24px solid;
28
+ border-color: transparent transparent transparent transparent;
29
+ border-left: 12px solid #B0B4B7;
30
+ }
31
+
32
+ .choosed-status-label.form-status-label::after {
33
+ border-left: 12px solid #005CFF;
34
+ }
35
+
36
+ .choosed-status-label.form-status-label:not(:first-child):not(:last-child)::after {
37
+ border-left: 12px solid #005CFF;
38
+ }
39
+
40
+ .form-status-label:last-child::after {
41
+ position: absolute;
42
+ display: block;
43
+ content: '';
44
+ left: 0;
45
+ top: 0;
46
+ width: 48px;
47
+ height: 48px;
48
+ border: 24px solid;
49
+ border-color: transparent transparent transparent transparent;
50
+ border-left: 12px solid #ffffff;
51
+ }
52
+
53
+ .form-status-label:not(:first-child):not(:last-child)::before {
54
+ position: absolute;
55
+ display: block;
56
+ content: '';
57
+ left: 0;
58
+ top: 0;
59
+ width: 48px;
60
+ height: 48px;
61
+ border: 24px solid;
62
+ border-color: transparent transparent transparent transparent;
63
+ border-left: 12px solid #ffffff;
64
+ }
65
+
66
+ .form-status-label:not(:first-child):not(:last-child)::after {
67
+ position: absolute;
68
+ display: block;
69
+ content: '';
70
+ right: -48px;
71
+ top: 0;
72
+ width: 48px;
73
+ height: 48px;
74
+ border: 24px solid;
75
+ border-color: transparent transparent transparent transparent;
76
+ border-left: 12px solid #B0B4B7;
77
+ }
78
+
79
+ .status-label-index {
80
+ display: inline-block;
81
+ width: 24px;
82
+ height: 24px;
83
+ border: 1px solid #FFFFFF;
84
+ color: #FFFFFF;
85
+ border-radius: 50%;
86
+ font-family: Montserrat;
87
+ font-size: 14px;line-height: 24px;
88
+ text-align: center;
89
+ margin: 0 6px 0 20px;
90
+ }
91
+
92
+ .status-label-key {
93
+ width: 50px;
94
+ height: 100%;
95
+ display: inline-flex;
96
+ float: left;
97
+ // flex-grow: 0;
98
+ // flex-shrink: 0;
99
+ align-items: center;
100
+ justify-content: center;
101
+ }
102
+
103
+ .status-label-operate {
104
+ // flex-grow: 1;
105
+ // flex-shrink: 1;
106
+ float: left;
107
+ width: calc(100% - 50px);
108
+ overflow: hidden;
109
+ text-overflow: ellipsis;
110
+ white-space: nowrap;
111
+ height: 100%;
112
+ margin: 4px 0;
113
+ &>div {
114
+ font-size: 12px;
115
+ height: 20px;
116
+ line-height: 20px;
117
+ color: #FFFFFF;
118
+ font-family: PingFangSC;
119
+ overflow: hidden;
120
+ text-overflow: ellipsis;
121
+ white-space: nowrap;
122
+ }
123
+ &>div:first-child {
124
+ font-size: 14px;
125
+ font-weight: 600;
126
+ }
127
+ }
128
+
129
+ .only-one-child.form-status-label::after,.only-one-child.form-status-label::before {
130
+ border-left: 0px;
131
131
  }
@@ -1,60 +1,60 @@
1
- ---
2
- nav:
3
- title: '组件'
4
- order: 1
5
- group:
6
- title: 业务组件
7
- order: 1
8
- title: 状态流转
9
- order: 1
10
- ---
11
-
12
- # StateFlow
13
-
14
-
15
- ## 单据状态流转
16
-
17
- ```tsx
18
- import React, { useState } from 'react';
19
- import { StateFlow } from '../../../index.ts';
20
-
21
- export default () => {
22
- const formStatusMapping = [
23
- {
24
- text: '状态1',
25
- modifyUserName: '张三',
26
- modifyTime: '2022-09-01 12:20:20',
27
- isDone: true,
28
- },
29
- {
30
- text: '状态2',
31
- modifyUserName: '李四',
32
- modifyTime: '2022-09-01 12:20:20',
33
- isDone: true,
34
- },
35
- {
36
- text: '状态3',
37
- modifyUserName: '王五',
38
- modifyTime: '2022-09-01 12:20:20',
39
- isDone: true,
40
- },
41
- {
42
- text: '状态4',
43
- modifyUserName: '韩梅梅',
44
- isDone: true,
45
- modifyTime: '2022-09-01 12:20:20',
46
- },
47
- {
48
- text: '状态5',
49
- modifyUserName: '李雷',
50
- isDone: true,
51
- modifyTime: '2022-09-01 12:20:20',
52
- },
53
- ]
54
- return (
55
- <StateFlow
56
- formStatusMapping={formStatusMapping}
57
- />
58
- );
59
- };
60
- ```
1
+ ---
2
+ nav:
3
+ title: '组件'
4
+ order: 1
5
+ group:
6
+ title: 业务组件
7
+ order: 1
8
+ title: 状态流转
9
+ order: 1
10
+ ---
11
+
12
+ # StateFlow
13
+
14
+
15
+ ## 单据状态流转
16
+
17
+ ```tsx
18
+ import React, { useState } from 'react';
19
+ import { StateFlow } from '../../../index.ts';
20
+
21
+ export default () => {
22
+ const formStatusMapping = [
23
+ {
24
+ text: '状态1',
25
+ modifyUserName: '张三',
26
+ modifyTime: '2022-09-01 12:20:20',
27
+ isDone: true,
28
+ },
29
+ {
30
+ text: '状态2',
31
+ modifyUserName: '李四',
32
+ modifyTime: '2022-09-01 12:20:20',
33
+ isDone: true,
34
+ },
35
+ {
36
+ text: '状态3',
37
+ modifyUserName: '王五',
38
+ modifyTime: '2022-09-01 12:20:20',
39
+ isDone: true,
40
+ },
41
+ {
42
+ text: '状态4',
43
+ modifyUserName: '韩梅梅',
44
+ isDone: true,
45
+ modifyTime: '2022-09-01 12:20:20',
46
+ },
47
+ {
48
+ text: '状态5',
49
+ modifyUserName: '李雷',
50
+ isDone: true,
51
+ modifyTime: '2022-09-01 12:20:20',
52
+ },
53
+ ]
54
+ return (
55
+ <StateFlow
56
+ formStatusMapping={formStatusMapping}
57
+ />
58
+ );
59
+ };
60
+ ```