@epie/bi-crud 2.0.47 → 2.0.49
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/lib/bi-crud.esm.js +19 -0
- package/lib/bi-crud.umd.js +19 -0
- package/lib/components/crud/helper.d.ts +1 -0
- package/lib/types/base/crud.d.ts +1 -0
- package/package.json +1 -1
package/lib/bi-crud.esm.js
CHANGED
|
@@ -8058,6 +8058,12 @@ function replaceParamsByDict(params, dict) {
|
|
|
8058
8058
|
...search,
|
|
8059
8059
|
...sort
|
|
8060
8060
|
};
|
|
8061
|
+
// 清理 null/undefined,避免 GET 序列化成字符串 "null"/"undefined"
|
|
8062
|
+
for (const k in a) {
|
|
8063
|
+
if (a[k] === null || a[k] === undefined) {
|
|
8064
|
+
delete a[k];
|
|
8065
|
+
}
|
|
8066
|
+
}
|
|
8061
8067
|
for (const i in b) {
|
|
8062
8068
|
if (b[i] === undefined || b[i] === null) continue;
|
|
8063
8069
|
if (!Object.prototype.hasOwnProperty.call(a, i)) continue;
|
|
@@ -8072,6 +8078,12 @@ function replaceParamsByDict(params, dict) {
|
|
|
8072
8078
|
delete a[i];
|
|
8073
8079
|
}
|
|
8074
8080
|
}
|
|
8081
|
+
// 再清理一次,覆盖映射后的键
|
|
8082
|
+
for (const k in a) {
|
|
8083
|
+
if (a[k] === null || a[k] === undefined) {
|
|
8084
|
+
delete a[k];
|
|
8085
|
+
}
|
|
8086
|
+
}
|
|
8075
8087
|
return a;
|
|
8076
8088
|
}
|
|
8077
8089
|
|
|
@@ -8562,6 +8574,9 @@ function useHelper({
|
|
|
8562
8574
|
}
|
|
8563
8575
|
});
|
|
8564
8576
|
}
|
|
8577
|
+
function refreshAutoParams() {
|
|
8578
|
+
mitt.emit("crud.refresh-auto-params");
|
|
8579
|
+
}
|
|
8565
8580
|
// 打开新增
|
|
8566
8581
|
function rowAdd() {
|
|
8567
8582
|
mitt.emit("crud.proxy", {
|
|
@@ -8692,6 +8707,7 @@ function useHelper({
|
|
|
8692
8707
|
rowDelete,
|
|
8693
8708
|
rowClose,
|
|
8694
8709
|
refresh,
|
|
8710
|
+
refreshAutoParams,
|
|
8695
8711
|
rowDescription,
|
|
8696
8712
|
getPermission,
|
|
8697
8713
|
paramsReplace,
|
|
@@ -30578,6 +30594,9 @@ var EpieInlineSearch = defineComponent({
|
|
|
30578
30594
|
next();
|
|
30579
30595
|
}
|
|
30580
30596
|
}
|
|
30597
|
+
mitt.on("crud.refresh-auto-params", () => {
|
|
30598
|
+
search();
|
|
30599
|
+
});
|
|
30581
30600
|
return {
|
|
30582
30601
|
form,
|
|
30583
30602
|
reset,
|
package/lib/bi-crud.umd.js
CHANGED
|
@@ -8061,6 +8061,12 @@
|
|
|
8061
8061
|
...search,
|
|
8062
8062
|
...sort
|
|
8063
8063
|
};
|
|
8064
|
+
// 清理 null/undefined,避免 GET 序列化成字符串 "null"/"undefined"
|
|
8065
|
+
for (const k in a) {
|
|
8066
|
+
if (a[k] === null || a[k] === undefined) {
|
|
8067
|
+
delete a[k];
|
|
8068
|
+
}
|
|
8069
|
+
}
|
|
8064
8070
|
for (const i in b) {
|
|
8065
8071
|
if (b[i] === undefined || b[i] === null) continue;
|
|
8066
8072
|
if (!Object.prototype.hasOwnProperty.call(a, i)) continue;
|
|
@@ -8075,6 +8081,12 @@
|
|
|
8075
8081
|
delete a[i];
|
|
8076
8082
|
}
|
|
8077
8083
|
}
|
|
8084
|
+
// 再清理一次,覆盖映射后的键
|
|
8085
|
+
for (const k in a) {
|
|
8086
|
+
if (a[k] === null || a[k] === undefined) {
|
|
8087
|
+
delete a[k];
|
|
8088
|
+
}
|
|
8089
|
+
}
|
|
8078
8090
|
return a;
|
|
8079
8091
|
}
|
|
8080
8092
|
|
|
@@ -8565,6 +8577,9 @@
|
|
|
8565
8577
|
}
|
|
8566
8578
|
});
|
|
8567
8579
|
}
|
|
8580
|
+
function refreshAutoParams() {
|
|
8581
|
+
mitt.emit("crud.refresh-auto-params");
|
|
8582
|
+
}
|
|
8568
8583
|
// 打开新增
|
|
8569
8584
|
function rowAdd() {
|
|
8570
8585
|
mitt.emit("crud.proxy", {
|
|
@@ -8695,6 +8710,7 @@
|
|
|
8695
8710
|
rowDelete,
|
|
8696
8711
|
rowClose,
|
|
8697
8712
|
refresh,
|
|
8713
|
+
refreshAutoParams,
|
|
8698
8714
|
rowDescription,
|
|
8699
8715
|
getPermission,
|
|
8700
8716
|
paramsReplace,
|
|
@@ -30581,6 +30597,9 @@
|
|
|
30581
30597
|
next();
|
|
30582
30598
|
}
|
|
30583
30599
|
}
|
|
30600
|
+
mitt.on("crud.refresh-auto-params", () => {
|
|
30601
|
+
search();
|
|
30602
|
+
});
|
|
30584
30603
|
return {
|
|
30585
30604
|
form,
|
|
30586
30605
|
reset,
|
|
@@ -9,6 +9,7 @@ export declare function useHelper({ mitt, props, crud }: any): {
|
|
|
9
9
|
rowDelete: (...selection: any[]) => void;
|
|
10
10
|
rowClose: () => void;
|
|
11
11
|
refresh: (params?: any) => Promise<unknown>;
|
|
12
|
+
refreshAutoParams: () => void;
|
|
12
13
|
rowDescription: (data: any) => void;
|
|
13
14
|
getPermission: (key: "page" | "list" | "info" | "update" | "add" | "delete") => boolean;
|
|
14
15
|
paramsReplace: (params: any) => any;
|
package/lib/types/base/crud.d.ts
CHANGED
|
@@ -133,6 +133,7 @@ export declare namespace EpieCrud {
|
|
|
133
133
|
rowDelete(...selection: any[]): void;
|
|
134
134
|
rowDescription(row?: any): void;
|
|
135
135
|
refresh: Service["page"]["request"];
|
|
136
|
+
refreshAutoParams: Service["page"]["request"];
|
|
136
137
|
}
|
|
137
138
|
interface Provide extends Ref {
|
|
138
139
|
[key: string]: any;
|