@tarojs/taro-h5 3.6.5 → 3.7.0-alpha.0
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/ai/index.d.ts +2 -2
- package/dist/api/base/index.d.ts +7 -7
- package/dist/api/canvas/index.d.ts +4 -4
- package/dist/api/device/index.d.ts +23 -23
- package/dist/api/index.d.ts +24 -24
- package/dist/api/index.js +1 -1
- package/dist/api/location/index.d.ts +2 -2
- package/dist/api/media/audio/InnerAudioContext.d.ts +1 -1
- package/dist/api/media/background-audio/BackgroundAudioManager.d.ts +1 -1
- package/dist/api/media/background-audio/index.d.ts +1 -1
- package/dist/api/media/image/index.d.ts +3 -3
- package/dist/api/media/index.d.ts +12 -12
- package/dist/api/network/index.d.ts +7 -7
- package/dist/api/network/index.js +1 -1
- package/dist/api/network/request/index.d.ts +2 -1
- package/dist/api/network/request/index.js +2 -1
- package/dist/api/network/request/index.js.map +1 -1
- package/dist/api/open-api/index.d.ts +18 -18
- package/dist/api/storage/index.d.ts +1 -1
- package/dist/api/taro.js +9 -4
- package/dist/api/taro.js.map +1 -1
- package/dist/api/ui/index.d.ts +12 -12
- package/dist/api/wxml/IntersectionObserver.js +7 -7
- package/dist/api/wxml/IntersectionObserver.js.map +1 -1
- package/dist/api/wxml/nodesRef.d.ts +1 -1
- package/dist/api/wxml/selectorQuery.d.ts +1 -1
- package/dist/index.cjs.d.ts +2 -1
- package/dist/index.cjs.js +18 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.d.ts +2 -1
- package/dist/index.esm.js +18 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/index.d.ts +3 -3
- package/package.json +6 -6
package/dist/index.cjs.js
CHANGED
|
@@ -3077,6 +3077,7 @@ function taroInterceptor(chain) {
|
|
|
3077
3077
|
const link = new Link$1(taroInterceptor);
|
|
3078
3078
|
const request = link.request.bind(link);
|
|
3079
3079
|
const addInterceptor = link.addInterceptor.bind(link);
|
|
3080
|
+
const cleanInterceptors = link.cleanInterceptors.bind(link);
|
|
3080
3081
|
|
|
3081
3082
|
// TCP 通信
|
|
3082
3083
|
const createTCPSocket = temporarilyNotSupport('createTCPSocket');
|
|
@@ -5124,13 +5125,6 @@ const createWorker = temporarilyNotSupport('createWorker');
|
|
|
5124
5125
|
// pollify
|
|
5125
5126
|
Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('intersection-observer')); });
|
|
5126
5127
|
class TaroH5IntersectionObserver {
|
|
5127
|
-
// selector 的容器节点
|
|
5128
|
-
get container() {
|
|
5129
|
-
const container = (this._component !== null
|
|
5130
|
-
? (findDOM(this._component) || document)
|
|
5131
|
-
: document);
|
|
5132
|
-
return container;
|
|
5133
|
-
}
|
|
5134
5128
|
constructor(component, options = {}) {
|
|
5135
5129
|
// 选项
|
|
5136
5130
|
this._options = {
|
|
@@ -5147,6 +5141,13 @@ class TaroH5IntersectionObserver {
|
|
|
5147
5141
|
this._component = component;
|
|
5148
5142
|
Object.assign(this._options, options);
|
|
5149
5143
|
}
|
|
5144
|
+
// selector 的容器节点
|
|
5145
|
+
get container() {
|
|
5146
|
+
const container = (this._component !== null
|
|
5147
|
+
? (findDOM(this._component) || document)
|
|
5148
|
+
: document);
|
|
5149
|
+
return container;
|
|
5150
|
+
}
|
|
5150
5151
|
createInst() {
|
|
5151
5152
|
// 去除原本的实例
|
|
5152
5153
|
this.disconnect();
|
|
@@ -5585,17 +5586,22 @@ const pxTransform = function (size = 0) {
|
|
|
5585
5586
|
throw new Error(`deviceRatio 配置中不存在 ${designWidth} 的设置!`);
|
|
5586
5587
|
}
|
|
5587
5588
|
const formatSize = ~~size;
|
|
5588
|
-
let rootValue = 1 / config.deviceRatio[designWidth]
|
|
5589
|
+
let rootValue = 1 / config.deviceRatio[designWidth];
|
|
5589
5590
|
switch (config === null || config === void 0 ? void 0 : config.targetUnit) {
|
|
5590
5591
|
case 'vw':
|
|
5591
|
-
rootValue
|
|
5592
|
+
rootValue = designWidth / 100;
|
|
5593
|
+
break;
|
|
5594
|
+
case 'px':
|
|
5595
|
+
rootValue *= 2;
|
|
5592
5596
|
break;
|
|
5593
5597
|
default:
|
|
5594
|
-
|
|
5598
|
+
// rem
|
|
5599
|
+
rootValue *= baseFontSize * 2;
|
|
5595
5600
|
}
|
|
5596
5601
|
let val = formatSize / rootValue;
|
|
5597
5602
|
if (config.unitPrecision >= 0 && config.unitPrecision <= 100) {
|
|
5598
|
-
val
|
|
5603
|
+
// Number(val): 0.50000 => 0.5
|
|
5604
|
+
val = Number(val.toFixed(config.unitPrecision));
|
|
5599
5605
|
}
|
|
5600
5606
|
return val + (config === null || config === void 0 ? void 0 : config.targetUnit);
|
|
5601
5607
|
};
|
|
@@ -5679,6 +5685,7 @@ exports.chooseMedia = chooseMedia;
|
|
|
5679
5685
|
exports.chooseMessageFile = chooseMessageFile;
|
|
5680
5686
|
exports.choosePoi = choosePoi;
|
|
5681
5687
|
exports.chooseVideo = chooseVideo;
|
|
5688
|
+
exports.cleanInterceptors = cleanInterceptors;
|
|
5682
5689
|
exports.clearStorage = clearStorage;
|
|
5683
5690
|
exports.clearStorageSync = clearStorageSync;
|
|
5684
5691
|
exports.closeBLEConnection = closeBLEConnection;
|