@lingxiteam/ebe-utils 0.0.25 → 0.0.27
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.
- package/es/index.js +6 -3
- package/lib/h5public/src/hooks/usePageForm.ts +30 -3
- package/lib/h5public/yarn.lock +19383 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useRowEdit.ts +4 -2
- package/lib/pcpublic/src/hooks/usePageForm.ts +5 -3
- package/lib/pcpublic/src/utils/exportCustomData/index.tsx +726 -0
- package/lib/pcpublic/src/utils/exportCustomData/tool.ts +399 -0
- package/lib/pcpublic/src/utils/messageApi.ts +25 -20
- package/lib/pcpublic/yarn.lock +11441 -0
- package/lib/public/src/components/ProgressComp/index.tsx +4 -14
- package/lib/public/src/hooks/useBaseDataSource.ts +2 -1
- package/lib/public/src/services/api/engine.ts +19 -0
- package/lib/public/src/utils/cmd.ts +455 -0
- package/lib/public/src/utils/useComponentHoc.ts +6 -3
- package/package.json +2 -2
|
@@ -196,13 +196,14 @@ const useRowEdit = (props: any) => {
|
|
|
196
196
|
|
|
197
197
|
// 当处于编辑状态时,需要过滤来自编辑控件内部触发的 click
|
|
198
198
|
while (target?.className !== curentTarget?.className) {
|
|
199
|
+
if (!target) return false;
|
|
199
200
|
if (
|
|
200
201
|
typeof target?.className === 'string' &&
|
|
201
202
|
target.className.includes(EDIT_COMPONENT_STOP_PROPAGATION_CLS)
|
|
202
203
|
) {
|
|
203
204
|
return true;
|
|
204
205
|
}
|
|
205
|
-
target = target
|
|
206
|
+
target = target?.parentNode as HTMLBaseElement;
|
|
206
207
|
}
|
|
207
208
|
|
|
208
209
|
if (onRowClick) {
|
|
@@ -221,6 +222,7 @@ const useRowEdit = (props: any) => {
|
|
|
221
222
|
// 当处于编辑状态时,需要过滤来自编辑控件内部触发的 doubleclick
|
|
222
223
|
let stopDoubleClick = false;
|
|
223
224
|
while (target?.className !== curentTarget?.className) {
|
|
225
|
+
if (!target) break;
|
|
224
226
|
if (
|
|
225
227
|
typeof target?.className === 'string' &&
|
|
226
228
|
target.className.includes(EDIT_COMPONENT_STOP_PROPAGATION_CLS)
|
|
@@ -228,7 +230,7 @@ const useRowEdit = (props: any) => {
|
|
|
228
230
|
stopDoubleClick = true;
|
|
229
231
|
break;
|
|
230
232
|
}
|
|
231
|
-
target = target
|
|
233
|
+
target = target?.parentNode as HTMLBaseElement;
|
|
232
234
|
}
|
|
233
235
|
|
|
234
236
|
if (!stopDoubleClick) {
|
|
@@ -8,10 +8,11 @@ import {
|
|
|
8
8
|
getOwnFormValues,
|
|
9
9
|
updateNodeChildren,
|
|
10
10
|
} from '@/utils/formUtils';
|
|
11
|
-
import { useContext } from 'react';
|
|
11
|
+
import { useContext, useState } from 'react';
|
|
12
12
|
|
|
13
13
|
const usePageForm = (refs: Record<string, any>) => {
|
|
14
14
|
const { refs: renderRefs } = useContext(Context);
|
|
15
|
+
const [, forceUpdate] = useState({});
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* 获取当前表单值
|
|
@@ -121,11 +122,12 @@ const usePageForm = (refs: Record<string, any>) => {
|
|
|
121
122
|
});
|
|
122
123
|
|
|
123
124
|
forms.forEach((form) => {
|
|
124
|
-
form?.setFieldsValue(formValues);
|
|
125
|
+
form?.setFieldsValue(formValues, refs);
|
|
125
126
|
});
|
|
126
127
|
} else {
|
|
127
|
-
refs[compId]?.setFieldsValue?.(formValues);
|
|
128
|
+
refs[compId]?.setFieldsValue?.(formValues, refs);
|
|
128
129
|
}
|
|
130
|
+
forceUpdate({});
|
|
129
131
|
};
|
|
130
132
|
|
|
131
133
|
/**
|