@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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/utils",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "一个常用的工具库",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
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.8.30";
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 = [];