@whitesev/utils 2.2.4 → 2.2.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.
@@ -1034,6 +1034,10 @@ declare class Utils {
1034
1034
  * @param target 目标元素
1035
1035
  * @param callback 触发的回调
1036
1036
  * @param options 观察器配置
1037
+ * @example
1038
+ * Utils.mutationVisible(document.querySelector("div.xxxx"),(entries,observer)=>{
1039
+ * console.log("该元素出现在视图内");
1040
+ * }))
1037
1041
  */
1038
1042
  mutationVisible(target: Element | Element[], callback: (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void, options?: IntersectionObserverInit): void;
1039
1043
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/utils",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "一个常用的工具库",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
package/src/Utils.ts CHANGED
@@ -2524,6 +2524,10 @@ class Utils {
2524
2524
  * @param target 目标元素
2525
2525
  * @param callback 触发的回调
2526
2526
  * @param options 观察器配置
2527
+ * @example
2528
+ * Utils.mutationVisible(document.querySelector("div.xxxx"),(entries,observer)=>{
2529
+ * console.log("该元素出现在视图内");
2530
+ * }))
2527
2531
  */
2528
2532
  mutationVisible(
2529
2533
  target: Element | Element[],