@whitesev/utils 2.4.3 → 2.4.5
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.amd.js +18 -1
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +18 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +18 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +18 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +18 -1
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +18 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Utils.d.ts +17 -0
- package/dist/types/src/types/Httpx.d.ts +3 -4
- package/package.json +1 -1
- package/src/Httpx.ts +1 -1
- package/src/Utils.ts +35 -1
- package/src/types/Httpx.d.ts +3 -4
package/dist/index.system.js
CHANGED
|
@@ -4077,7 +4077,7 @@ System.register('Utils', [], (function (exports) {
|
|
|
4077
4077
|
this.windowApi = new WindowApi(option);
|
|
4078
4078
|
}
|
|
4079
4079
|
/** 版本号 */
|
|
4080
|
-
version = "2024.
|
|
4080
|
+
version = "2024.11.1";
|
|
4081
4081
|
addStyle(cssText) {
|
|
4082
4082
|
if (typeof cssText !== "string") {
|
|
4083
4083
|
throw new Error("Utils.addStyle 参数cssText 必须为String类型");
|
|
@@ -7095,6 +7095,23 @@ System.register('Utils', [], (function (exports) {
|
|
|
7095
7095
|
});
|
|
7096
7096
|
}
|
|
7097
7097
|
}
|
|
7098
|
+
/**
|
|
7099
|
+
* 深度获取对象属性
|
|
7100
|
+
* @param target 待获取的对象
|
|
7101
|
+
* @param handler 获取属性的回调
|
|
7102
|
+
*/
|
|
7103
|
+
queryProperty(target, handler) {
|
|
7104
|
+
if (target == null) {
|
|
7105
|
+
return;
|
|
7106
|
+
}
|
|
7107
|
+
let handleResult = handler(target);
|
|
7108
|
+
if (handleResult &&
|
|
7109
|
+
typeof handleResult.isFind === "boolean" &&
|
|
7110
|
+
handleResult.isFind) {
|
|
7111
|
+
return handleResult.data;
|
|
7112
|
+
}
|
|
7113
|
+
return this.queryProperty(handleResult.data, handler);
|
|
7114
|
+
}
|
|
7098
7115
|
/**
|
|
7099
7116
|
* 创建一个新的Utils实例
|
|
7100
7117
|
* @param option
|