@lingxiteam/ebe-utils 0.2.21 → 0.2.23

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 (144) hide show
  1. package/lib/h5public/yarn.lock +7 -8
  2. package/lib/pcpublic/src/components/pcfactory/src/Button/index.tsx +11 -10
  3. package/lib/pcpublic/src/components/pcfactory/src/Card/CardTitle/index.tsx +31 -24
  4. package/lib/pcpublic/src/components/pcfactory/src/Card/index.tsx +32 -14
  5. package/lib/pcpublic/src/components/pcfactory/src/Card/useExtendBtn.tsx +85 -48
  6. package/lib/pcpublic/src/components/pcfactory/src/ChartLine/ChartLine.tsx +24 -6
  7. package/lib/pcpublic/src/components/pcfactory/src/ChartLine/PropsType.ts +31 -5
  8. package/lib/pcpublic/src/components/pcfactory/src/ChartLine/index.tsx +3 -2
  9. package/lib/pcpublic/src/components/pcfactory/src/ChartLine/loader.tsx +1 -1
  10. package/lib/pcpublic/src/components/pcfactory/src/Form/Form.tsx +153 -129
  11. package/lib/pcpublic/src/components/pcfactory/src/Form/index.tsx +2 -5
  12. package/lib/pcpublic/src/components/pcfactory/src/Form/useFormStatus.ts +8 -4
  13. package/lib/pcpublic/src/components/pcfactory/src/LXPieChart/LXPieChart.tsx +15 -3
  14. package/lib/pcpublic/src/components/pcfactory/src/LXPieChart/PropsType.ts +4 -3
  15. package/lib/pcpublic/src/components/pcfactory/src/LXPieChart/index.tsx +1 -1
  16. package/lib/pcpublic/src/components/pcfactory/src/LXPieChart/loader.tsx +1 -1
  17. package/lib/pcpublic/src/components/pcfactory/src/LXRadarChart/LXRadarChat.tsx +18 -4
  18. package/lib/pcpublic/src/components/pcfactory/src/LXRadarChart/PropsType.ts +2 -1
  19. package/lib/pcpublic/src/components/pcfactory/src/LXRadarChart/index.tsx +1 -1
  20. package/lib/pcpublic/src/components/pcfactory/src/LXRadarChart/loader.tsx +1 -1
  21. package/lib/pcpublic/src/components/pcfactory/src/ModalSelect/BaseModalSelect.tsx +7 -2
  22. package/lib/pcpublic/src/components/pcfactory/src/ModalSelect/index.tsx +60 -26
  23. package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/LcdpUeditorMain.tsx +62 -55
  24. package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/RichTextEditor.tsx +2 -6
  25. package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/RichTextEditorMain.tsx +5 -5
  26. package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/index.tsx +9 -2
  27. package/lib/pcpublic/src/components/pcfactory/src/RichTextEditor/loader.ts +1 -1
  28. package/lib/pcpublic/src/components/pcfactory/src/Select/index.tsx +145 -66
  29. package/lib/pcpublic/src/components/pcfactory/src/Select/selectUtils.ts +13 -9
  30. package/lib/pcpublic/src/components/pcfactory/src/Table/BodyCell/index.tsx +36 -26
  31. package/lib/pcpublic/src/components/pcfactory/src/Table/EditComponent/index.tsx +69 -94
  32. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/GhostTag/index.tsx +12 -5
  33. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/Hyperlink/index.tsx +9 -5
  34. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/PointTag/index.tsx +11 -5
  35. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/PureColourFill/index.tsx +11 -5
  36. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/PureFadeColourTag/index.tsx +14 -7
  37. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/Thumbnail/index.tsx +30 -31
  38. package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/index.tsx +89 -41
  39. package/lib/pcpublic/src/components/pcfactory/src/Table/HeaderCell/HeaderCellTitle/index.tsx +25 -12
  40. package/lib/pcpublic/src/components/pcfactory/src/Table/HeaderCell/index.tsx +12 -5
  41. package/lib/pcpublic/src/components/pcfactory/src/Table/OperationCell/PopoverWrapper.tsx +220 -0
  42. package/lib/pcpublic/src/components/pcfactory/src/Table/OperationCell/SingleBtn.tsx +39 -32
  43. package/lib/pcpublic/src/components/pcfactory/src/Table/OperationCell/index.tsx +178 -148
  44. package/lib/pcpublic/src/components/pcfactory/src/Table/Table.tsx +439 -0
  45. package/lib/pcpublic/src/components/pcfactory/src/Table/TableHead/index.tsx +159 -72
  46. package/lib/pcpublic/src/components/pcfactory/src/Table/TableSummaryRow/index.tsx +12 -20
  47. package/lib/pcpublic/src/components/pcfactory/src/Table/constant.ts +3 -0
  48. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/index.ts +4 -4
  49. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useCMDActions.ts +32 -28
  50. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useCheckStrict.ts +44 -57
  51. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useColumns.tsx +306 -276
  52. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useCommon.ts +9 -6
  53. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useDataSource.ts +30 -21
  54. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useExpandable.tsx +33 -27
  55. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useFilter.tsx +84 -77
  56. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useFormatCell.tsx +33 -16
  57. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/usePagination.ts +15 -5
  58. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useRowEdit.ts +33 -33
  59. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useRowMerge.ts +13 -5
  60. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useScroll.ts +94 -28
  61. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useSelection.ts +108 -99
  62. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useSort.ts +8 -5
  63. package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useSummaryCol.ts +27 -43
  64. package/lib/pcpublic/src/components/pcfactory/src/Table/index.tsx +73 -394
  65. package/lib/pcpublic/src/components/pcfactory/src/Table/loader.tsx +15 -0
  66. package/lib/pcpublic/src/components/pcfactory/src/Table/types/OperationCell.d.ts +2 -2
  67. package/lib/pcpublic/src/components/pcfactory/src/Table/types/event.d.ts +12 -8
  68. package/lib/pcpublic/src/components/pcfactory/src/Table/types/headerCell.d.ts +2 -1
  69. package/lib/pcpublic/src/components/pcfactory/src/Table/types/prop.d.ts +24 -11
  70. package/lib/pcpublic/src/components/pcfactory/src/Table/utils/SequenceId.ts +2 -1
  71. package/lib/pcpublic/src/components/pcfactory/src/Table/utils/index.ts +90 -82
  72. package/lib/pcpublic/src/components/pcfactory/src/Table/utils/indexedDBHelper.ts +9 -22
  73. package/lib/pcpublic/src/components/pcfactory/src/Table/utils/translate.ts +59 -0
  74. package/lib/pcpublic/src/components/pcfactory/src/Transfer/Transfer.tsx +644 -0
  75. package/lib/pcpublic/src/components/pcfactory/src/Transfer/index.tsx +49 -637
  76. package/lib/pcpublic/src/components/pcfactory/src/Transfer/loader.tsx +11 -0
  77. package/lib/pcpublic/src/components/pcfactory/src/Tree/TreeEllipsisIcon.tsx +38 -0
  78. package/lib/pcpublic/src/components/pcfactory/src/Tree/TreeNodeMenu/index.tsx +34 -35
  79. package/lib/pcpublic/src/components/pcfactory/src/Tree/index.tsx +213 -149
  80. package/lib/pcpublic/src/components/pcfactory/src/TreeSelect/index.tsx +47 -43
  81. package/lib/pcpublic/src/components/pcfactory/src/TreeTable/TreeTable.tsx +264 -0
  82. package/lib/pcpublic/src/components/pcfactory/src/TreeTable/hooks/index.ts +4 -1
  83. package/lib/pcpublic/src/components/pcfactory/src/TreeTable/hooks/useCMDAction.ts +9 -3
  84. package/lib/pcpublic/src/components/pcfactory/src/TreeTable/hooks/useExpandable.tsx +9 -3
  85. package/lib/pcpublic/src/components/pcfactory/src/TreeTable/index.tsx +52 -191
  86. package/lib/pcpublic/src/components/pcfactory/src/TreeTable/loader.tsx +16 -0
  87. package/lib/pcpublic/src/components/pcfactory/src/assets/index.tsx +34 -0
  88. package/lib/pcpublic/src/components/pcfactory/src/assets/svg/quadrate.tsx +20 -0
  89. package/lib/pcpublic/src/components/pcfactory/src/assets/svg/roundness.tsx +14 -0
  90. package/lib/pcpublic/src/components/pcfactory/src/assets/svg/semicircle.tsx +15 -0
  91. package/lib/pcpublic/src/components/pcfactory/src/assets/svg/verticalLine.tsx +12 -0
  92. package/lib/pcpublic/src/components/pcfactory/src/styles/common.less +17 -0
  93. package/lib/pcpublic/src/components/pcfactory/src/styles/components/Card.less +57 -11
  94. package/lib/pcpublic/src/components/pcfactory/src/styles/components/Form.less +101 -12
  95. package/lib/pcpublic/src/components/pcfactory/src/styles/components/ModalSelect.less +6 -0
  96. package/lib/pcpublic/src/components/pcfactory/src/styles/components/Select.less +70 -6
  97. package/lib/pcpublic/src/components/pcfactory/src/utils/ChannelContainer.tsx +20 -14
  98. package/lib/pcpublic/src/components/pcfactory/src/utils/ChildRender.ts +6 -8
  99. package/lib/pcpublic/src/components/pcfactory/src/utils/CustomModule.tsx +4 -6
  100. package/lib/pcpublic/src/components/pcfactory/src/utils/DummyFormContext.ts +9 -13
  101. package/lib/pcpublic/src/components/pcfactory/src/utils/Empty/empty.tsx +5 -17
  102. package/lib/pcpublic/src/components/pcfactory/src/utils/Empty/index.tsx +3 -3
  103. package/lib/pcpublic/src/components/pcfactory/src/utils/Holidays.ts +11 -39
  104. package/lib/pcpublic/src/components/pcfactory/src/utils/HolidaysFormat.ts +83 -0
  105. package/lib/pcpublic/src/components/pcfactory/src/utils/IdleContainer/index.tsx +47 -0
  106. package/lib/pcpublic/src/components/pcfactory/src/utils/IdleContainer/scheduler.ts +74 -0
  107. package/lib/pcpublic/src/components/pcfactory/src/utils/LoaderHelper.tsx +4 -1
  108. package/lib/pcpublic/src/components/pcfactory/src/utils/Spin/index.tsx +8 -7
  109. package/lib/pcpublic/src/components/pcfactory/src/utils/WithSyncValue.ts +25 -23
  110. package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/index.ts +10 -7
  111. package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/useMap.ts +9 -6
  112. package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/useMemoizedFn.ts +4 -1
  113. package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/usePersistFn.ts +17 -0
  114. package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/useSafeState.ts +2 -2
  115. package/lib/pcpublic/src/components/pcfactory/src/utils/ahooks/useSetState.ts +7 -5
  116. package/lib/pcpublic/src/components/pcfactory/src/utils/common.ts +23 -50
  117. package/lib/pcpublic/src/components/pcfactory/src/utils/constant.ts +53 -57
  118. package/lib/pcpublic/src/components/pcfactory/src/utils/dynamicUtils/DynamicContext.tsx +12 -17
  119. package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/FormContext.tsx +22 -12
  120. package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/FormFields.tsx +50 -19
  121. package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/WrapperContainer.tsx +58 -37
  122. package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/cmdHelper.ts +33 -30
  123. package/lib/pcpublic/src/components/pcfactory/src/utils/formUtils/common.ts +2 -0
  124. package/lib/pcpublic/src/components/pcfactory/src/utils/generatorDisabledCallback.ts +121 -113
  125. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useCommonImperativeHandle.ts +16 -14
  126. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useCompState.tsx +1 -1
  127. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useDataMask.ts +7 -2
  128. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useDoubleClick.ts +3 -1
  129. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useFuncExpExecute.ts +16 -14
  130. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useGetStaticAttrData.ts +9 -3
  131. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useHiddenStyle.ts +4 -5
  132. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useInit.ts +11 -0
  133. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useInitReactQuill.ts +3 -1
  134. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useListenState.ts +1 -0
  135. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useLocale.ts +5 -3
  136. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/usePrintMode.tsx +2 -2
  137. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useRules.ts +1 -1
  138. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useTestHelper.ts +2 -0
  139. package/lib/pcpublic/src/components/pcfactory/src/utils/hooks/useToggleBoolean.ts +8 -4
  140. package/lib/pcpublic/src/components/pcfactory/src/utils/index.ts +10 -10
  141. package/lib/pcpublic/src/components/pcfactory/src/utils/polyfill.js +29 -31
  142. package/lib/pcpublic/src/components/pcfactory/src/utils/renderReadOnly.tsx +29 -26
  143. package/lib/public/public/iconfont.js +1 -0
  144. package/package.json +2 -2
@@ -1,6 +1,7 @@
1
+ import React, { CSSProperties, FC } from 'react';
1
2
  import { Col } from 'antd';
2
- import { CSSProperties, FC } from 'react';
3
3
  import { getTestHelperProps } from '../hooks/useTestHelper';
4
+ import classNames from 'classnames';
4
5
 
5
6
  export interface WrapperContainerProps {
6
7
  labelAlign: any;
@@ -15,26 +16,74 @@ export interface WrapperContainerProps {
15
16
  colProps: any;
16
17
  fieldName: string;
17
18
  disabled: boolean;
19
+ labelWrap?: boolean;
20
+ lineHeight: string;
18
21
  }
19
22
 
20
23
  const WrapperContainer: FC<WrapperContainerProps> = props => {
21
- const { labelAlign, colon, wrapperStyle, children, required, labelCol, showWrapperContainer, isFormRootChild, fieldName, disabled } = props;
24
+ const {
25
+ labelAlign,
26
+ colon,
27
+ wrapperStyle,
28
+ children,
29
+ required,
30
+ labelCol,
31
+ showWrapperContainer,
32
+ isFormRootChild,
33
+ fieldName,
34
+ disabled,
35
+ labelWrap,
36
+ lineHeight,
37
+ } = props;
22
38
 
23
39
  // 配合测试的属性
24
40
  const testProps = getTestHelperProps({ fieldName, disabled });
25
41
 
42
+
26
43
  if (!showWrapperContainer && !isFormRootChild) {
27
44
  return <>{children}</>;
28
45
  }
29
46
 
30
47
  if (!showWrapperContainer && isFormRootChild) {
31
- return (
32
- <Col {...testProps} {...props.colProps}>
33
- {children}
34
- </Col>
35
- );
48
+ return <Col {...testProps} {...props.colProps}>{children}</Col>;
36
49
  }
37
50
 
51
+ const content = (
52
+ <div
53
+ style={{
54
+ width: labelCol,
55
+ flexShrink: 0,
56
+ lineHeight,
57
+ height: lineHeight,
58
+ }}
59
+ >
60
+ {props.label && (
61
+ <span
62
+ style={{
63
+ justifyContent: labelAlign === 'right' ? 'flex-end' : 'flex-start',
64
+ }}
65
+ className={classNames(
66
+ 'formLabel-item-label',
67
+ {
68
+ 'formLabel-item-label-no-colon': !colon,
69
+ }
70
+ )}
71
+ >
72
+ {required && <span className="formLabel-required">*</span>}
73
+ <span className={classNames(
74
+ 'formLabel-item-label-title',
75
+ {
76
+ 'formLabel-item-label-title-label-wrap': labelWrap,
77
+ }
78
+ )}
79
+ >
80
+ {props.label}
81
+ </span>
82
+ </span>
83
+ )}
84
+ </div>
85
+ );
86
+
38
87
  if (isFormRootChild) {
39
88
  return (
40
89
  <Col {...testProps} {...props.colProps}>
@@ -46,21 +95,7 @@ const WrapperContainer: FC<WrapperContainerProps> = props => {
46
95
  alignItems: 'center',
47
96
  }}
48
97
  >
49
- <div
50
- style={{
51
- width: labelCol,
52
- textAlign: labelAlign,
53
- flexShrink: 0,
54
- }}
55
- >
56
- {props.label && (
57
- <span>
58
- {required && <span style={{ fontSize: 12, marginRight: 4, color: '#ff4d4f' }}>*</span>}
59
- {props.label}
60
- <span style={{ marginLeft: 2, marginRight: 8 }}>{colon ? ':' : ''}</span>
61
- </span>
62
- )}
63
- </div>
98
+ {content}
64
99
  <div style={wrapperStyle}>{children}</div>
65
100
  </div>
66
101
  </Col>
@@ -77,21 +112,7 @@ const WrapperContainer: FC<WrapperContainerProps> = props => {
77
112
  }}
78
113
  {...testProps}
79
114
  >
80
- <div
81
- style={{
82
- width: labelCol,
83
- textAlign: labelAlign,
84
- flexShrink: 0,
85
- }}
86
- >
87
- {props.label && (
88
- <span>
89
- {required && <span style={{ fontSize: 12, marginRight: 4, color: '#ff4d4f' }}>*</span>}
90
- {props.label}
91
- <span style={{ marginLeft: 2, marginRight: 8 }}>{colon ? ':' : ''}</span>
92
- </span>
93
- )}
94
- </div>
115
+ {content}
95
116
  <div style={wrapperStyle}>{children}</div>
96
117
  </div>
97
118
  );
@@ -13,7 +13,7 @@ const getFormsIdByUid = (uid: string, refs: RefsType) => {
13
13
  if (!Array.isArray(list)) {
14
14
  return list;
15
15
  }
16
- return list.map(it => it.replace(/(@@@)|(&&&)/g, ''));
16
+ return list.map((it) => it.replace(/(@@@)|(&&&)/g, ''));
17
17
  };
18
18
 
19
19
  /**
@@ -45,7 +45,7 @@ export const getFormOfInLoopByLoopId = (options: {
45
45
  const result = uid
46
46
  .split('---')
47
47
  .filter(Boolean)
48
- .find(id => {
48
+ .find((id) => {
49
49
  const [compId] = id.split('@@@');
50
50
  return compId === loopId;
51
51
  });
@@ -64,6 +64,7 @@ export const getFormOfInLoopByLoopId = (options: {
64
64
  });
65
65
  }
66
66
 
67
+
67
68
  // 不是表单 或者不在循环容器内
68
69
  if (refs[uid].compName !== 'Form' || !/[@@@|&&&]/.test(uid)) {
69
70
  continue;
@@ -120,7 +121,7 @@ export const getFormByCompId = (compId: string, refs: RefsType) => {
120
121
  if (form) {
121
122
  return form;
122
123
  }
123
- const uidArr = Object.keys(refs).filter(uid => {
124
+ const uidArr = Object.keys(refs).filter((uid) => {
124
125
  const ids = getFormsIdByUid(uid, refs);
125
126
  if (!ids) {
126
127
  return false;
@@ -132,17 +133,20 @@ export const getFormByCompId = (compId: string, refs: RefsType) => {
132
133
  return null;
133
134
  }
134
135
 
135
- return uidArr.map(uid => refs[uid]);
136
+ return uidArr.map((uid) => refs[uid]);
136
137
  };
137
138
 
138
- export const getFieldsValue = async (forms: RefsType | RefsType[], getFieldsValue: (form: any) => void) => {
139
+ export const getFieldsValue = async (
140
+ forms: RefsType | RefsType[],
141
+ getFieldsValue: (form: any) => void,
142
+ ) => {
139
143
  // 当表单不存在时,应该获取的是undefined
140
144
  if (!forms) {
141
145
  return undefined;
142
146
  }
143
147
 
144
148
  if (Array.isArray(forms)) {
145
- return Promise.all(forms.map(form => getFieldsValue(form)));
149
+ return Promise.all(forms.map((form) => getFieldsValue(form)));
146
150
  }
147
151
  return getFieldsValue(forms);
148
152
  };
@@ -174,13 +178,8 @@ interface FirstErrorInfoType {
174
178
  * @param getFieldsValue
175
179
  */
176
180
  export const getOwnFormValues = async (
177
- options: {
178
- currentRefs: RefsType;
179
- engineRelation: EngineRelationMethods;
180
- routerId: string;
181
- compId?: string;
182
- },
183
- getFieldsValue: (form: any) => void
181
+ options: { currentRefs: RefsType; engineRelation: EngineRelationMethods; routerId: string, compId?: string },
182
+ getFieldsValue: (form: any) => void,
184
183
  ) => {
185
184
  const { currentRefs, engineRelation, routerId, compId } = options;
186
185
 
@@ -201,7 +200,7 @@ export const getOwnFormValues = async (
201
200
  if (!compId || compId === uid) {
202
201
  const ref = refs[uid];
203
202
  if (!['Form', 'DynamicDataContainer'].includes(ref.compName)) {
204
- // 需要处理BOFramer和PageView这种渲染逻辑
203
+ // 需要处理BOFramer和PageView这种渲染逻辑
205
204
  const uidRefs = engineRelation.getEngineRefsByUid(uid, routerId);
206
205
  if (uidRefs) {
207
206
  await getRenderRefsFormValues(uidRefs.refs);
@@ -220,7 +219,7 @@ export const getOwnFormValues = async (
220
219
  try {
221
220
  const value = await getFieldsValue(ref);
222
221
  if (type === 'default') {
223
- // 1. 首次赋值, 包含循环容器内逻辑
222
+ // 1. 首次赋值, 包含循环容器内逻辑
224
223
  if (!values[formCode]) {
225
224
  values[formCode] = value;
226
225
  formCodeTypes[formCode] = 'default';
@@ -228,17 +227,17 @@ export const getOwnFormValues = async (
228
227
  }
229
228
  // 2. 存在编码相同时,切换成数组类型
230
229
  if (formCodeTypes[formCode] === 'default') {
231
- // 处理页面中存在多个相同的表单,但是表单编码一样。这时候表现为数组形式
230
+ // 处理页面中存在多个相同的表单,但是表单编码一样。这时候表现为数组形式
232
231
  values[formCode] = [values[formCode]];
233
232
  formCodeTypes[formCode] = 'array';
234
233
  }
235
234
 
236
235
  // 3. 给数组添加当前值
237
- if (formCodeTypes[formCode] === 'array') {
236
+ if ((formCodeTypes[formCode] === 'array')) {
238
237
  values[formCode].push(value);
239
238
  }
240
239
  } else if (type === 'inLoop') {
241
- // 1. 或许存在一个没包含在循环容器内表单,并且该表单和循环容器下的表单编码相同,
240
+ // 1. 或许存在一个没包含在循环容器内表单,并且该表单和循环容器下的表单编码相同,
242
241
  if (formCodeTypes[formCode] === 'default') {
243
242
  values[formCode] = [values[formCode]];
244
243
  }
@@ -274,7 +273,11 @@ export const getOwnFormValues = async (
274
273
  return Promise.resolve(values);
275
274
  };
276
275
 
277
- export const getAllFormValues = (options: { currentRefs: RefsType; engineRelation: EngineRelationMethods; routerId: string }) => {
276
+ export const getAllFormValues = (options: {
277
+ currentRefs: RefsType;
278
+ engineRelation: EngineRelationMethods;
279
+ routerId: string,
280
+ }) => {
278
281
  const { currentRefs, engineRelation, routerId } = options;
279
282
  const forms: RefsType[] = [];
280
283
  const getRenderRefsFormValues = (refs: RefsType = {}) => {
@@ -320,15 +323,12 @@ export const getBOFramers = (compId: string, refs: RefsType = {}) => {
320
323
  return boframerRefs;
321
324
  };
322
325
 
323
- export const getBOFramerOwnFormValues = async (
324
- options: {
325
- refs: RefsType;
326
- engineRelation: EngineRelationMethods;
327
- routerId: string;
328
- compId: string;
329
- },
330
- getFieldsValue: (form: any) => void
331
- ) => {
326
+ export const getBOFramerOwnFormValues = async (options: {
327
+ refs: RefsType;
328
+ engineRelation: EngineRelationMethods;
329
+ routerId: string,
330
+ compId: string
331
+ }, getFieldsValue: (form: any) => void,) => {
332
332
  const { engineRelation, routerId, refs, compId } = options;
333
333
 
334
334
  // 2种情况 1只有单个业务组件 2 业务组件放在循环容器下
@@ -336,7 +336,10 @@ export const getBOFramerOwnFormValues = async (
336
336
 
337
337
  let values = {};
338
338
  if (boframerRefs) {
339
- values = await getOwnFormValues({ currentRefs: boframerRefs, engineRelation, routerId }, getFieldsValue);
339
+ values = await getOwnFormValues(
340
+ { currentRefs: boframerRefs, engineRelation, routerId },
341
+ getFieldsValue,
342
+ );
340
343
  }
341
344
 
342
345
  // 理论上获取业务组件 应该都带有表单编码,但是由于需要兼容旧数据 需要把值展开
@@ -350,7 +353,7 @@ export const getBOFramerOwnFormValues = async (
350
353
  };
351
354
 
352
355
  // 获取BOFramer下所有表单
353
- export const getBoframerOwnForms = (options: { currentRefs: RefsType; engineRelation: EngineRelationMethods; routerId: string; compId: string }) => {
356
+ export const getBoframerOwnForms = (options: { currentRefs: RefsType; engineRelation: EngineRelationMethods; routerId: string, compId: string }) => {
354
357
  const { compId, currentRefs, engineRelation, routerId } = options;
355
358
  const boframers = getBOFramers(compId, currentRefs);
356
359
 
@@ -1,3 +1,4 @@
1
+
1
2
  export type mode = 'grid' | 'pixel' | 'percentage' | '';
2
3
 
3
4
  /**
@@ -27,6 +28,7 @@ export const getFormItemClassName = (fieldName: string) => {
27
28
  return `formItem-error-${fieldName}`;
28
29
  };
29
30
 
31
+
30
32
  /**
31
33
  * 过滤html里面的危险标签
32
34
  * @param str