qmwts 1.1.23 → 1.1.24
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/utils/json-utils.js
CHANGED
|
@@ -41,5 +41,14 @@ exports.default = {
|
|
|
41
41
|
o = o[key] || '';
|
|
42
42
|
}
|
|
43
43
|
return o || substitute;
|
|
44
|
+
},
|
|
45
|
+
// 返回一个值被全部设为null的object,主要用于naive-ui
|
|
46
|
+
setNull: function (o, exclusions) {
|
|
47
|
+
if (o === void 0) { o = {}; }
|
|
48
|
+
if (exclusions === void 0) { exclusions = []; }
|
|
49
|
+
for (var key in o)
|
|
50
|
+
if (!exclusions.includes(key))
|
|
51
|
+
o[key] = null;
|
|
52
|
+
return o;
|
|
44
53
|
}
|
|
45
54
|
};
|