@tarojs/taro-h5 3.6.7-alpha.1 → 3.6.8
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/base/index.js +1 -1
- package/dist/api/base/index.js.map +1 -1
- package/dist/api/ui/interaction/toast.js +4 -0
- package/dist/api/ui/interaction/toast.js.map +1 -1
- package/dist/api/ui/scroll/index.js +4 -3
- package/dist/api/ui/scroll/index.js.map +1 -1
- package/dist/index.cjs.d.ts +1 -1
- package/dist/index.cjs.js +9 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.d.ts +1 -1
- package/dist/index.esm.js +9 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +6 -6
package/dist/index.esm.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ declare const env: {
|
|
|
38
38
|
TARO_VERSION: string | undefined;
|
|
39
39
|
};
|
|
40
40
|
// Note: 该方法由 taro-plugin-platform-h5 实现
|
|
41
|
-
// export const canIUse = temporarilyNotSupport('canIUse')
|
|
41
|
+
// export const canIUse = /* @__PURE__ */ temporarilyNotSupport('canIUse')
|
|
42
42
|
declare function arrayBufferToBase64(arrayBuffer: ArrayBuffer): string;
|
|
43
43
|
declare function base64ToArrayBuffer(base64: string): Uint8Array;
|
|
44
44
|
// 加密
|
package/dist/index.esm.js
CHANGED
|
@@ -954,7 +954,7 @@ const env = {
|
|
|
954
954
|
TARO_VERSION: process.env.TARO_VERSION,
|
|
955
955
|
};
|
|
956
956
|
// Note: 该方法由 taro-plugin-platform-h5 实现
|
|
957
|
-
|
|
957
|
+
|
|
958
958
|
function arrayBufferToBase64(arrayBuffer) {
|
|
959
959
|
return fromByteArray(arrayBuffer);
|
|
960
960
|
}
|
|
@@ -3509,6 +3509,10 @@ class Toast {
|
|
|
3509
3509
|
this.el.className = 'taro__toast';
|
|
3510
3510
|
this.el.style.opacity = '0';
|
|
3511
3511
|
this.el.style.transition = 'opacity 0.1s linear';
|
|
3512
|
+
this.el.ontouchmove = (e) => {
|
|
3513
|
+
e.stopPropagation();
|
|
3514
|
+
e.preventDefault();
|
|
3515
|
+
};
|
|
3512
3516
|
// mask
|
|
3513
3517
|
this.mask = document.createElement('div');
|
|
3514
3518
|
this.mask.setAttribute('style', inlineStyle(maskStyle));
|
|
@@ -3942,20 +3946,21 @@ const pageScrollTo = ({ scrollTop, selector = '', offsetTop = 0, duration = 300,
|
|
|
3942
3946
|
let scrollFunc;
|
|
3943
3947
|
const handle = new MethodHandler({ name: 'pageScrollTo', success, fail, complete });
|
|
3944
3948
|
return new Promise((resolve, reject) => {
|
|
3945
|
-
var _a, _b;
|
|
3949
|
+
var _a, _b, _c;
|
|
3946
3950
|
try {
|
|
3947
3951
|
if (scrollTop === undefined && !selector) {
|
|
3948
3952
|
return handle.fail({
|
|
3949
3953
|
errMsg: 'scrollTop" 或 "selector" 需要其之一'
|
|
3950
3954
|
}, { resolve, reject });
|
|
3951
3955
|
}
|
|
3952
|
-
const
|
|
3956
|
+
const usingWindowScroll = (_a = window.__taroAppConfig) === null || _a === void 0 ? void 0 : _a.usingWindowScroll;
|
|
3957
|
+
const id = (_c = (_b = Current$1.page) === null || _b === void 0 ? void 0 : _b.path) === null || _c === void 0 ? void 0 : _c.replace(/([^a-z0-9\u00a0-\uffff_-])/ig, '\\$1');
|
|
3953
3958
|
const el = (id
|
|
3954
3959
|
? document.querySelector(`.taro_page#${id}`)
|
|
3955
3960
|
: document.querySelector('.taro_page') ||
|
|
3956
3961
|
document.querySelector('.taro_router'));
|
|
3957
3962
|
if (!scrollFunc) {
|
|
3958
|
-
if (
|
|
3963
|
+
if (usingWindowScroll) {
|
|
3959
3964
|
scrollFunc = pos => {
|
|
3960
3965
|
if (pos === undefined) {
|
|
3961
3966
|
return window.pageYOffset;
|