@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.
- package/dist/index.amd.js +4 -0
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +4 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +4 -0
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +4 -0
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +4 -0
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Utils.d.ts +4 -0
- package/package.json +1 -1
- package/src/Utils.ts +4 -0
|
@@ -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
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[],
|