@tarojs/taro-h5 3.6.8 → 3.6.9-alpha.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/api/wxml/IntersectionObserver.js +8 -5
- package/dist/api/wxml/IntersectionObserver.js.map +1 -1
- package/dist/api/wxml/selectorQuery.js +9 -6
- package/dist/api/wxml/selectorQuery.js.map +1 -1
- package/dist/index.cjs.js +15 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +15 -11
- package/dist/index.esm.js.map +1 -1
- package/package.json +6 -6
package/dist/index.esm.js
CHANGED
|
@@ -5611,11 +5611,13 @@ class TaroH5IntersectionObserver {
|
|
|
5611
5611
|
const nodeList = this._options.observeAll
|
|
5612
5612
|
? this.container.querySelectorAll(targetSelector)
|
|
5613
5613
|
: [this.container.querySelector(targetSelector)];
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5614
|
+
Taro.nextTick(() => {
|
|
5615
|
+
nodeList.forEach(element => {
|
|
5616
|
+
if (!element)
|
|
5617
|
+
return;
|
|
5618
|
+
this._observerInst.observe(element);
|
|
5619
|
+
this._listeners.push({ element, callback });
|
|
5620
|
+
});
|
|
5619
5621
|
});
|
|
5620
5622
|
}
|
|
5621
5623
|
relativeTo(selector, margins) {
|
|
@@ -5917,13 +5919,15 @@ class SelectorQuery {
|
|
|
5917
5919
|
return new NodesRef('.taro_page', this, true);
|
|
5918
5920
|
}
|
|
5919
5921
|
exec(cb) {
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5922
|
+
Taro.nextTick(() => {
|
|
5923
|
+
queryBat(this._queue, res => {
|
|
5924
|
+
const _queueCb = this._queueCb;
|
|
5925
|
+
res.forEach((item, index) => {
|
|
5926
|
+
const cb = _queueCb[index];
|
|
5927
|
+
isFunction(cb) && cb.call(this, item);
|
|
5928
|
+
});
|
|
5929
|
+
isFunction(cb) && cb.call(this, res);
|
|
5925
5930
|
});
|
|
5926
|
-
isFunction(cb) && cb.call(this, res);
|
|
5927
5931
|
});
|
|
5928
5932
|
return this;
|
|
5929
5933
|
}
|