@whitesev/utils 2.4.3 → 2.4.4
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/package.json +1 -1
- package/src/Utils.ts +35 -1
package/dist/index.amd.js
CHANGED
|
@@ -4074,7 +4074,7 @@ define((function () { 'use strict';
|
|
|
4074
4074
|
this.windowApi = new WindowApi(option);
|
|
4075
4075
|
}
|
|
4076
4076
|
/** 版本号 */
|
|
4077
|
-
version = "2024.
|
|
4077
|
+
version = "2024.11.1";
|
|
4078
4078
|
addStyle(cssText) {
|
|
4079
4079
|
if (typeof cssText !== "string") {
|
|
4080
4080
|
throw new Error("Utils.addStyle 参数cssText 必须为String类型");
|
|
@@ -7092,6 +7092,23 @@ define((function () { 'use strict';
|
|
|
7092
7092
|
});
|
|
7093
7093
|
}
|
|
7094
7094
|
}
|
|
7095
|
+
/**
|
|
7096
|
+
* 深度获取对象属性
|
|
7097
|
+
* @param target 待获取的对象
|
|
7098
|
+
* @param handler 获取属性的回调
|
|
7099
|
+
*/
|
|
7100
|
+
queryProperty(target, handler) {
|
|
7101
|
+
if (target == null) {
|
|
7102
|
+
return;
|
|
7103
|
+
}
|
|
7104
|
+
let handleResult = handler(target);
|
|
7105
|
+
if (handleResult &&
|
|
7106
|
+
typeof handleResult.isFind === "boolean" &&
|
|
7107
|
+
handleResult.isFind) {
|
|
7108
|
+
return handleResult.data;
|
|
7109
|
+
}
|
|
7110
|
+
return this.queryProperty(handleResult.data, handler);
|
|
7111
|
+
}
|
|
7095
7112
|
/**
|
|
7096
7113
|
* 创建一个新的Utils实例
|
|
7097
7114
|
* @param option
|