@azrico/webobject 1.4.43 → 1.4.45
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.
|
@@ -178,6 +178,7 @@ export declare class SimpleObject extends MapableObject {
|
|
|
178
178
|
setSaveResult(toObj: any, type?: saveResultType | "auto"): void;
|
|
179
179
|
getSaveResult(original?: boolean): any;
|
|
180
180
|
getSaveResultType(): saveResultType;
|
|
181
|
+
static setTemp(obj: any, key: string, value: any): any;
|
|
181
182
|
static factoryClear(obj: SimpleObject): void;
|
|
182
183
|
static delete_cache(): void;
|
|
183
184
|
static get_canModify(o: SimpleObject): boolean;
|
|
@@ -1064,6 +1064,14 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject) {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
return false;
|
|
1066
1066
|
}
|
|
1067
|
+
}, {
|
|
1068
|
+
key: "setTemp",
|
|
1069
|
+
value: function setTemp(obj, key, value) {
|
|
1070
|
+
if (_typeof(obj) !== "object" || !obj || Array.isArray(obj)) return;
|
|
1071
|
+
if (obj instanceof SimpleObject) return obj.setTemp(key, value);
|
|
1072
|
+
if (obj.__temp == null) obj.__temp = {};
|
|
1073
|
+
if (value == null) delete obj.__temp[key];else obj.__temp[key] = value;
|
|
1074
|
+
}
|
|
1067
1075
|
}, {
|
|
1068
1076
|
key: "factoryClear",
|
|
1069
1077
|
value: function factoryClear(obj) {
|
|
@@ -1150,7 +1158,7 @@ function _getTempProperty2(key) {
|
|
|
1150
1158
|
}
|
|
1151
1159
|
function _setTempProperty2(key, value) {
|
|
1152
1160
|
if (this.__temp == null) this.__temp = {};
|
|
1153
|
-
this.__temp[key] = value;
|
|
1161
|
+
if (value == null) delete this.__temp[key];else this.__temp[key] = value;
|
|
1154
1162
|
}
|
|
1155
1163
|
function _setSaveResultObject2(toObj) {
|
|
1156
1164
|
if (toObj == null) toObj = null; //null or undefined
|