@epie/bi-crud 2.0.47 → 2.0.48
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 +12 -0
- package/lib/bi-crud.umd.js +12 -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
|
|
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
|
|