lu-lowcode-package-form 0.9.75 → 0.9.77
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/dist/index.cjs.js +365 -288
- package/dist/index.es.js +41715 -28470
- package/package.json +2 -1
- package/src/App.jsx +32 -11
- package/src/App.test.js +1 -0
- package/src/components/field/base.jsx +2 -2
- package/src/components/field/date-picker/index.jsx +18 -11
- package/src/components/field/table/index.jsx +20 -11
- package/src/components/form-container/index.jsx +112 -39
- package/src/components/form-container/layout/form-row.jsx +9 -4
- package/src/components/index.jsx +2 -0
- package/src/utils/formula.js +1 -0
- package/src/utils/index.jsx +19 -2
- package/frp_0.45.0_linux_amd64.tar.gz +0 -0
package/src/utils/index.jsx
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { DeleteFilled, EditFilled, FileAddFilled } from "@ant-design/icons";
|
2
2
|
import { Tooltip } from "antd";
|
3
|
+
import _ from "lodash";
|
3
4
|
|
4
5
|
export const createPromiseWrapper = () => {
|
5
6
|
let resolve, reject;
|
@@ -8,7 +9,7 @@ export const createPromiseWrapper = () => {
|
|
8
9
|
resolve = res;
|
9
10
|
reject = rej;
|
10
11
|
});
|
11
|
-
|
12
|
+
|
12
13
|
return { promise, resolve, reject };
|
13
14
|
};
|
14
15
|
|
@@ -85,7 +86,7 @@ export function handleTreeEdit(
|
|
85
86
|
children,
|
86
87
|
title,
|
87
88
|
rootId,
|
88
|
-
handle = { New: () => {}, Edit: () => {}, Del: () => {} },
|
89
|
+
handle = { New: () => { }, Edit: () => { }, Del: () => { } },
|
89
90
|
moduleName = "节点"
|
90
91
|
) {
|
91
92
|
const newNode = (node) => ({
|
@@ -184,3 +185,19 @@ function constructTree(
|
|
184
185
|
return father[parentId] === rootId;
|
185
186
|
});
|
186
187
|
}
|
188
|
+
|
189
|
+
|
190
|
+
const debouncers = {};
|
191
|
+
/**
|
192
|
+
* 一个带key的防抖函数
|
193
|
+
* @param {*} key
|
194
|
+
* @param {*} func
|
195
|
+
* @param {*} wait
|
196
|
+
* @returns
|
197
|
+
*/
|
198
|
+
export function debounce(func, wait, key = "default") {
|
199
|
+
if (!debouncers[key]) {
|
200
|
+
debouncers[key] = _.debounce(func, wait);
|
201
|
+
}
|
202
|
+
return debouncers[key];
|
203
|
+
}
|
Binary file
|