@whitesev/utils 2.2.0 → 2.2.1
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 +14 -1
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +14 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +14 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +14 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +14 -1
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +14 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Utils.d.ts +1 -1
- package/package.json +1 -1
- package/src/Utils.ts +2 -3
|
@@ -914,7 +914,7 @@ declare class Utils {
|
|
|
914
914
|
* Utils.isVisible(document.documentElement)
|
|
915
915
|
* > true
|
|
916
916
|
*/
|
|
917
|
-
isVisible(element: HTMLElement[] | NodeList, inView?: boolean): boolean;
|
|
917
|
+
isVisible(element: HTMLElement | HTMLElement[] | Element | NodeList, inView?: boolean): boolean;
|
|
918
918
|
/**
|
|
919
919
|
* 判断是否是Via浏览器环境
|
|
920
920
|
* @returns
|
package/package.json
CHANGED
package/src/Utils.ts
CHANGED
|
@@ -52,7 +52,7 @@ class Utils {
|
|
|
52
52
|
this.windowApi = new WindowApi(option);
|
|
53
53
|
}
|
|
54
54
|
/** 版本号 */
|
|
55
|
-
version = "2024.
|
|
55
|
+
version = "2024.9.1";
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* 在页面中增加style元素,如果html节点存在子节点,添加子节点第一个,反之,添加到html节点的子节点最后一个
|
|
@@ -2170,9 +2170,8 @@ class Utils {
|
|
|
2170
2170
|
* Utils.isVisible(document.documentElement)
|
|
2171
2171
|
* > true
|
|
2172
2172
|
*/
|
|
2173
|
-
isVisible(element: HTMLElement[] | NodeList, inView?: boolean): boolean;
|
|
2174
2173
|
isVisible(
|
|
2175
|
-
element: HTMLElement[] | NodeList,
|
|
2174
|
+
element: HTMLElement | HTMLElement[] | Element | NodeList,
|
|
2176
2175
|
inView: boolean = false
|
|
2177
2176
|
): boolean {
|
|
2178
2177
|
let needCheckDomList = [];
|