@tarojs/taro-h5 3.5.10 → 3.5.12
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/system.js +5 -1
- package/dist/api/ui/interaction/index.js +10 -4
- package/dist/api/ui/interaction/modal.d.ts +1 -0
- package/dist/api/ui/interaction/modal.js +9 -1
- package/dist/api/ui/interaction/toast.d.ts +1 -0
- package/dist/api/ui/interaction/toast.js +9 -1
- package/dist/api/wxml/IntersectionObserver.d.ts +20 -0
- package/dist/api/wxml/IntersectionObserver.js +104 -0
- package/dist/api/wxml/MediaQueryObserver.d.ts +7 -0
- package/dist/api/wxml/MediaQueryObserver.js +49 -0
- package/dist/api/wxml/index.d.ts +2 -1
- package/dist/api/wxml/index.js +8 -2
- package/dist/index.cjs.d.ts +3 -2
- package/dist/index.cjs.js +234 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.d.ts +3 -2
- package/dist/index.esm.js +216 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/taroApis.d.ts +3 -2
- package/dist/taroApis.js +1 -1
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +28 -0
- package/package.json +9 -5
package/dist/api/base/system.js
CHANGED
|
@@ -62,6 +62,8 @@ export const getDeviceInfo = () => {
|
|
|
62
62
|
const info = {
|
|
63
63
|
/** 应用二进制接口类型(仅 Android 支持) */
|
|
64
64
|
abi: '',
|
|
65
|
+
/** 设备二进制接口类型(仅 Android 支持) */
|
|
66
|
+
deviceAbi: '',
|
|
65
67
|
/** 设备性能等级(仅Android小游戏)。取值为:-2 或 0(该设备无法运行小游戏),-1(性能未知),>=1(设备性能值,该值越高,设备性能越好,目前最高不到50) */
|
|
66
68
|
benchmarkLevel: -1,
|
|
67
69
|
/** 设备品牌 */
|
|
@@ -71,7 +73,9 @@ export const getDeviceInfo = () => {
|
|
|
71
73
|
/** 操作系统及版本 */
|
|
72
74
|
system: md.os(),
|
|
73
75
|
/** 客户端平台 */
|
|
74
|
-
platform: navigator.platform
|
|
76
|
+
platform: navigator.platform,
|
|
77
|
+
/** 设备二进制接口类型(仅 Android 支持) */
|
|
78
|
+
CPUType: '',
|
|
75
79
|
};
|
|
76
80
|
return info;
|
|
77
81
|
};
|
|
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import Taro from '@tarojs/api';
|
|
11
|
+
import { Current } from '@tarojs/runtime';
|
|
11
12
|
import { getParameterError, temporarilyNotSupport } from '../../../utils';
|
|
12
13
|
import { MethodHandler } from '../../../utils/handler';
|
|
13
14
|
import ActionSheet from './actionSheet';
|
|
@@ -267,10 +268,15 @@ const showActionSheet = (options = { itemList: [] }) => __awaiter(void 0, void 0
|
|
|
267
268
|
return handle.success(({ tapIndex: result }));
|
|
268
269
|
}
|
|
269
270
|
});
|
|
270
|
-
Taro.eventCenter.on('
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
Taro.eventCenter.on('__afterTaroRouterChange', () => {
|
|
272
|
+
var _a, _b;
|
|
273
|
+
if (toast.currentPath && toast.currentPath !== ((_a = Current.page) === null || _a === void 0 ? void 0 : _a.path)) {
|
|
274
|
+
hideToast();
|
|
275
|
+
hideLoading();
|
|
276
|
+
}
|
|
277
|
+
if (modal.currentPath && modal.currentPath !== ((_b = Current.page) === null || _b === void 0 ? void 0 : _b.path)) {
|
|
278
|
+
hideModal();
|
|
279
|
+
}
|
|
274
280
|
});
|
|
275
281
|
const enableAlertBeforeUnload = temporarilyNotSupport('enableAlertBeforeUnload');
|
|
276
282
|
const disableAlertBeforeUnload = temporarilyNotSupport('disableAlertBeforeUnload');
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Current } from '@tarojs/runtime';
|
|
2
|
+
import { getLaunchPage, inlineStyle } from '../../../utils';
|
|
2
3
|
export default class Modal {
|
|
3
4
|
constructor() {
|
|
4
5
|
this.options = {
|
|
@@ -61,6 +62,7 @@ export default class Modal {
|
|
|
61
62
|
}
|
|
62
63
|
create(options = {}) {
|
|
63
64
|
return new Promise((resolve) => {
|
|
65
|
+
var _a, _b;
|
|
64
66
|
// style
|
|
65
67
|
const { maskStyle, modalStyle, titleStyle, textStyle, footStyle, btnStyle } = this.style;
|
|
66
68
|
// configuration
|
|
@@ -125,10 +127,13 @@ export default class Modal {
|
|
|
125
127
|
// show immediately
|
|
126
128
|
document.body.appendChild(this.el);
|
|
127
129
|
setTimeout(() => { this.el.style.opacity = '1'; }, 0);
|
|
130
|
+
// Current.page不存在时说明路由还未挂载,此时需根据url来分配将要渲染的页面path
|
|
131
|
+
this.currentPath = (_b = (_a = Current.page) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : getLaunchPage();
|
|
128
132
|
});
|
|
129
133
|
}
|
|
130
134
|
show(options = {}) {
|
|
131
135
|
return new Promise((resolve) => {
|
|
136
|
+
var _a, _b;
|
|
132
137
|
const config = Object.assign(Object.assign({}, this.options), options);
|
|
133
138
|
if (this.hideOpacityTimer)
|
|
134
139
|
clearTimeout(this.hideOpacityTimer);
|
|
@@ -172,6 +177,8 @@ export default class Modal {
|
|
|
172
177
|
// show
|
|
173
178
|
this.el.style.display = 'block';
|
|
174
179
|
setTimeout(() => { this.el.style.opacity = '1'; }, 0);
|
|
180
|
+
// Current.page不存在时说明路由还未挂载,此时需根据url来分配将要渲染的页面path
|
|
181
|
+
this.currentPath = (_b = (_a = Current.page) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : getLaunchPage();
|
|
175
182
|
});
|
|
176
183
|
}
|
|
177
184
|
hide() {
|
|
@@ -179,6 +186,7 @@ export default class Modal {
|
|
|
179
186
|
clearTimeout(this.hideOpacityTimer);
|
|
180
187
|
if (this.hideDisplayTimer)
|
|
181
188
|
clearTimeout(this.hideDisplayTimer);
|
|
189
|
+
this.currentPath = null;
|
|
182
190
|
this.hideOpacityTimer = setTimeout(() => {
|
|
183
191
|
this.el.style.opacity = '0';
|
|
184
192
|
this.hideDisplayTimer = setTimeout(() => { this.el.style.display = 'none'; }, 200);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Current } from '@tarojs/runtime';
|
|
2
|
+
import { getLaunchPage, inlineStyle } from '../../../utils';
|
|
2
3
|
export default class Toast {
|
|
3
4
|
constructor() {
|
|
4
5
|
this.options = {
|
|
@@ -75,6 +76,7 @@ export default class Toast {
|
|
|
75
76
|
};
|
|
76
77
|
}
|
|
77
78
|
create(options = {}, _type = 'toast') {
|
|
79
|
+
var _a, _b;
|
|
78
80
|
// style
|
|
79
81
|
const { maskStyle, toastStyle, successStyle, errrorStyle, loadingStyle, imageStyle, textStyle } = this.style;
|
|
80
82
|
// configuration
|
|
@@ -118,9 +120,12 @@ export default class Toast {
|
|
|
118
120
|
this.type = config._type;
|
|
119
121
|
// disappear after duration
|
|
120
122
|
config.duration >= 0 && this.hide(config.duration, this.type);
|
|
123
|
+
// Current.page不存在时说明路由还未挂载,此时需根据url来分配将要渲染的页面path
|
|
124
|
+
this.currentPath = (_b = (_a = Current.page) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : getLaunchPage();
|
|
121
125
|
return '';
|
|
122
126
|
}
|
|
123
127
|
show(options = {}, _type = 'toast') {
|
|
128
|
+
var _a, _b;
|
|
124
129
|
const config = Object.assign(Object.assign(Object.assign({}, this.options), options), { _type });
|
|
125
130
|
if (this.hideOpacityTimer)
|
|
126
131
|
clearTimeout(this.hideOpacityTimer);
|
|
@@ -152,6 +157,8 @@ export default class Toast {
|
|
|
152
157
|
this.type = config._type;
|
|
153
158
|
// disappear after duration
|
|
154
159
|
config.duration >= 0 && this.hide(config.duration, this.type);
|
|
160
|
+
// Current.page不存在时说明路由还未挂载,此时需根据url来分配将要渲染的页面path
|
|
161
|
+
this.currentPath = (_b = (_a = Current.page) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : getLaunchPage();
|
|
155
162
|
return '';
|
|
156
163
|
}
|
|
157
164
|
hide(duration = 0, type) {
|
|
@@ -161,6 +168,7 @@ export default class Toast {
|
|
|
161
168
|
clearTimeout(this.hideOpacityTimer);
|
|
162
169
|
if (this.hideDisplayTimer)
|
|
163
170
|
clearTimeout(this.hideDisplayTimer);
|
|
171
|
+
this.currentPath = null;
|
|
164
172
|
this.hideOpacityTimer = setTimeout(() => {
|
|
165
173
|
this.el.style.opacity = '0';
|
|
166
174
|
this.hideDisplayTimer = setTimeout(() => { this.el.style.display = 'none'; }, 100);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Taro from '@tarojs/taro';
|
|
2
|
+
declare type TElement = Document | HTMLElement | Element;
|
|
3
|
+
export declare class TaroH5IntersectionObserver implements Taro.IntersectionObserver {
|
|
4
|
+
private _component;
|
|
5
|
+
private _options;
|
|
6
|
+
private _observerInst;
|
|
7
|
+
private _listeners;
|
|
8
|
+
private _root;
|
|
9
|
+
private _rootMargin;
|
|
10
|
+
private _isInited;
|
|
11
|
+
protected get container(): TElement;
|
|
12
|
+
constructor(component: TaroGeneral.IAnyObject, options?: Taro.createIntersectionObserver.Option);
|
|
13
|
+
private createInst;
|
|
14
|
+
disconnect(): void;
|
|
15
|
+
observe(targetSelector: string, callback: Taro.IntersectionObserver.ObserveCallback): void;
|
|
16
|
+
relativeTo(selector: string, margins?: Taro.IntersectionObserver.RelativeToMargins | undefined): Taro.IntersectionObserver;
|
|
17
|
+
relativeToViewport(margins?: Taro.IntersectionObserver.RelativeToViewportMargins | undefined): Taro.IntersectionObserver;
|
|
18
|
+
private _getCallbackByElement;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { findDOM } from '../../utils';
|
|
2
|
+
// pollify
|
|
3
|
+
import('intersection-observer');
|
|
4
|
+
export class TaroH5IntersectionObserver {
|
|
5
|
+
constructor(component, options = {}) {
|
|
6
|
+
// 选项
|
|
7
|
+
this._options = {
|
|
8
|
+
thresholds: [0],
|
|
9
|
+
initialRatio: 0,
|
|
10
|
+
observeAll: false
|
|
11
|
+
};
|
|
12
|
+
// 监控中的选择器
|
|
13
|
+
this._listeners = [];
|
|
14
|
+
// 用来扩展(或收缩)参照节点布局区域的边界
|
|
15
|
+
this._rootMargin = {};
|
|
16
|
+
// 是否已初始化
|
|
17
|
+
this._isInited = false;
|
|
18
|
+
this._component = component;
|
|
19
|
+
Object.assign(this._options, options);
|
|
20
|
+
}
|
|
21
|
+
// selector 的容器节点
|
|
22
|
+
get container() {
|
|
23
|
+
const container = (this._component !== null
|
|
24
|
+
? (findDOM(this._component) || document)
|
|
25
|
+
: document);
|
|
26
|
+
return container;
|
|
27
|
+
}
|
|
28
|
+
createInst() {
|
|
29
|
+
// 去除原本的实例
|
|
30
|
+
this.disconnect();
|
|
31
|
+
const { left = 0, top = 0, bottom = 0, right = 0 } = this._rootMargin;
|
|
32
|
+
return new IntersectionObserver(entries => {
|
|
33
|
+
entries.forEach(entry => {
|
|
34
|
+
const _callback = this._getCallbackByElement(entry.target);
|
|
35
|
+
const result = {
|
|
36
|
+
boundingClientRect: entry.boundingClientRect,
|
|
37
|
+
intersectionRatio: entry.intersectionRatio,
|
|
38
|
+
intersectionRect: entry.intersectionRect,
|
|
39
|
+
relativeRect: entry.rootBounds || { left: 0, right: 0, top: 0, bottom: 0 },
|
|
40
|
+
time: entry.time
|
|
41
|
+
};
|
|
42
|
+
// web端会默认首次触发
|
|
43
|
+
if (!this._isInited && this._options.initialRatio <= Math.min.apply(Math, this._options.thresholds)) {
|
|
44
|
+
// 初始的相交比例,如果调用时检测到的相交比例与这个值不相等且达到阈值,则会触发一次监听器的回调函数。
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
_callback && _callback.call(this, result);
|
|
48
|
+
});
|
|
49
|
+
this._isInited = true;
|
|
50
|
+
}, {
|
|
51
|
+
root: this._root,
|
|
52
|
+
rootMargin: [`${top}px`, `${right}px`, `${bottom}px`, `${left}px`].join(' '),
|
|
53
|
+
threshold: this._options.thresholds
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
disconnect() {
|
|
57
|
+
if (this._observerInst) {
|
|
58
|
+
let listener;
|
|
59
|
+
while ((listener = this._listeners.pop())) {
|
|
60
|
+
this._observerInst.unobserve(listener.element);
|
|
61
|
+
}
|
|
62
|
+
this._observerInst.disconnect();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
observe(targetSelector, callback) {
|
|
66
|
+
// 同wx小程序效果一致,每个实例监听一个Selector
|
|
67
|
+
if (this._listeners.length)
|
|
68
|
+
return;
|
|
69
|
+
// 监听前没有设置关联的节点
|
|
70
|
+
if (!this._observerInst) {
|
|
71
|
+
console.warn('Intersection observer will be ignored because no relative nodes are found.');
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const nodeList = this._options.observeAll
|
|
75
|
+
? this.container.querySelectorAll(targetSelector)
|
|
76
|
+
: [this.container.querySelector(targetSelector)];
|
|
77
|
+
nodeList.forEach(element => {
|
|
78
|
+
if (!element)
|
|
79
|
+
return;
|
|
80
|
+
this._observerInst.observe(element);
|
|
81
|
+
this._listeners.push({ element, callback });
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
relativeTo(selector, margins) {
|
|
85
|
+
// 已设置observe监听后,重新关联节点
|
|
86
|
+
if (this._listeners.length) {
|
|
87
|
+
console.error('Relative nodes cannot be added after "observe" call in IntersectionObserver');
|
|
88
|
+
return this;
|
|
89
|
+
}
|
|
90
|
+
this._root = this.container.querySelector(selector) || null;
|
|
91
|
+
if (margins) {
|
|
92
|
+
this._rootMargin = margins;
|
|
93
|
+
}
|
|
94
|
+
this._observerInst = this.createInst();
|
|
95
|
+
return this;
|
|
96
|
+
}
|
|
97
|
+
relativeToViewport(margins) {
|
|
98
|
+
return this.relativeTo('.taro_page', margins);
|
|
99
|
+
}
|
|
100
|
+
_getCallbackByElement(element) {
|
|
101
|
+
const listener = this._listeners.find(listener => listener.element === element);
|
|
102
|
+
return listener ? listener.callback : null;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Taro from '@tarojs/taro';
|
|
2
|
+
export declare class MediaQueryObserver implements Taro.MediaQueryObserver {
|
|
3
|
+
private _mediaQueryObserver;
|
|
4
|
+
private _listener;
|
|
5
|
+
observe(descriptor: Taro.MediaQueryObserver.descriptor, callback: Taro.MediaQueryObserver.observeCallback): void;
|
|
6
|
+
disconnect(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { isFunction, toKebabCase } from '../../utils';
|
|
2
|
+
function generateMediaQueryStr(descriptor) {
|
|
3
|
+
const mediaQueryArr = [];
|
|
4
|
+
const descriptorMenu = ['width', 'minWidth', 'maxWidth', 'height', 'minHeight', 'maxHeight', 'orientation'];
|
|
5
|
+
for (const item of descriptorMenu) {
|
|
6
|
+
if (item !== 'orientation' &&
|
|
7
|
+
descriptor[item] &&
|
|
8
|
+
Number(descriptor[item]) >= 0) {
|
|
9
|
+
mediaQueryArr.push(`(${(toKebabCase(item))}: ${Number(descriptor[item])}px)`);
|
|
10
|
+
}
|
|
11
|
+
if (item === 'orientation' && descriptor[item]) {
|
|
12
|
+
mediaQueryArr.push(`(${toKebabCase(item)}: ${descriptor[item]})`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return mediaQueryArr.join(' and ');
|
|
16
|
+
}
|
|
17
|
+
export class MediaQueryObserver {
|
|
18
|
+
// 监听页面媒体查询变化情况
|
|
19
|
+
observe(descriptor, callback) {
|
|
20
|
+
if (isFunction(callback)) {
|
|
21
|
+
// 创建媒体查询对象
|
|
22
|
+
this._mediaQueryObserver = window.matchMedia(generateMediaQueryStr(descriptor));
|
|
23
|
+
// 监听器
|
|
24
|
+
this._listener = (ev) => {
|
|
25
|
+
callback({ matches: ev.matches });
|
|
26
|
+
};
|
|
27
|
+
callback({ matches: this._mediaQueryObserver.matches });
|
|
28
|
+
// 兼容旧浏览器中MediaQueryList尚未继承于EventTarget导致不存在'addEventListener'
|
|
29
|
+
if ('addEventListener' in this._mediaQueryObserver) {
|
|
30
|
+
this._mediaQueryObserver.addEventListener('change', this._listener);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this._mediaQueryObserver.addListener(this._listener);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// 停止监听,销毁媒体查询对象
|
|
38
|
+
disconnect() {
|
|
39
|
+
if (this._mediaQueryObserver && this._listener) {
|
|
40
|
+
// 兼容旧浏览器中MediaQueryList尚未继承于EventTarget导致不存在'removeEventListener'
|
|
41
|
+
if ('removeEventListener' in this._mediaQueryObserver) {
|
|
42
|
+
this._mediaQueryObserver.removeEventListener('change', this._listener);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
this._mediaQueryObserver.removeListener(this._listener);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
package/dist/api/wxml/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import Taro from '@tarojs/api';
|
|
2
2
|
export declare const createSelectorQuery: typeof Taro.createSelectorQuery;
|
|
3
|
-
export declare const createIntersectionObserver:
|
|
3
|
+
export declare const createIntersectionObserver: typeof Taro.createIntersectionObserver;
|
|
4
|
+
export declare const createMediaQueryObserver: typeof Taro.createMediaQueryObserver;
|
package/dist/api/wxml/index.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaroH5IntersectionObserver } from './IntersectionObserver';
|
|
2
|
+
import { MediaQueryObserver } from './MediaQueryObserver';
|
|
2
3
|
import { SelectorQuery } from './selectorQuery';
|
|
3
4
|
export const createSelectorQuery = () => {
|
|
4
5
|
return new SelectorQuery();
|
|
5
6
|
};
|
|
6
|
-
export const createIntersectionObserver =
|
|
7
|
+
export const createIntersectionObserver = (component, options) => {
|
|
8
|
+
return new TaroH5IntersectionObserver(component, options);
|
|
9
|
+
};
|
|
10
|
+
export const createMediaQueryObserver = () => {
|
|
11
|
+
return new MediaQueryObserver();
|
|
12
|
+
};
|
package/dist/index.cjs.d.ts
CHANGED
|
@@ -755,6 +755,7 @@ declare const offWindowResize: typeof Taro.offWindowResize;
|
|
|
755
755
|
// Worker
|
|
756
756
|
declare const createWorker: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
757
757
|
declare const createSelectorQuery: typeof Taro.createSelectorQuery;
|
|
758
|
-
declare const createIntersectionObserver:
|
|
759
|
-
|
|
758
|
+
declare const createIntersectionObserver: typeof Taro.createIntersectionObserver;
|
|
759
|
+
declare const createMediaQueryObserver: typeof Taro.createMediaQueryObserver;
|
|
760
|
+
export { taro as default, taro, createRewardedVideoAd, createInterstitialAd, stopFaceDetect, initFaceDetect, faceDetect, isVKSupport, createVKSession, getOpenUserInfo, canIUse, arrayBufferToBase64, base64ToArrayBuffer, getUserCryptoManager, setEnableDebug, getRealtimeLogManager, getLogManager, reportPerformance, getPerformance, openSystemBluetoothSetting, openAppAuthorizeSetting, getWindowInfo, getSystemSetting, getDeviceInfo, getAppBaseInfo, getAppAuthorizeSetting, getSystemInfoSync, getSystemInfoAsync, getSystemInfo, updateWeChatApp, getUpdateManager, onUnhandledRejection, onThemeChange, onPageNotFound, onError, onAudioInterruptionEnd, onAudioInterruptionBegin, onAppShow, onAppHide, offUnhandledRejection, offThemeChange, offPageNotFound, offError, offAudioInterruptionEnd, offAudioInterruptionBegin, offAppShow, offAppHide, getLaunchOptionsSync, getEnterOptionsSync, createOffscreenCanvas, createCanvasContext, canvasToTempFilePath, canvasPutImageData, canvasGetImageData, cloud, reportMonitor, reportAnalytics, reportEvent, getExptInfoSync, stopAccelerometer, startAccelerometer, onAccelerometerChange, offAccelerometerChange, checkIsOpenAccessibility, getBatteryInfoSync, getBatteryInfo, stopBluetoothDevicesDiscovery, startBluetoothDevicesDiscovery, openBluetoothAdapter, onBluetoothDeviceFound, onBluetoothAdapterStateChange, offBluetoothDeviceFound, offBluetoothAdapterStateChange, makeBluetoothPair, isBluetoothDevicePaired, getConnectedBluetoothDevices, getBluetoothDevices, getBluetoothAdapterState, closeBluetoothAdapter, writeBLECharacteristicValue, setBLEMTU, readBLECharacteristicValue, onBLEMTUChange, onBLEConnectionStateChange, onBLECharacteristicValueChange, offBLEMTUChange, offBLEConnectionStateChange, offBLECharacteristicValueChange, notifyBLECharacteristicValueChange, getBLEMTU, getBLEDeviceServices, getBLEDeviceRSSI, getBLEDeviceCharacteristics, createBLEConnection, closeBLEConnection, onBLEPeripheralConnectionStateChanged, offBLEPeripheralConnectionStateChanged, createBLEPeripheralServer, addPhoneRepeatCalendar, addPhoneCalendar, setClipboardData, getClipboardData, stopCompass, startCompass, onCompassChange, offCompassChange, chooseContact, addPhoneContact, getRandomValues, stopGyroscope, startGyroscope, onGyroscopeChange, offGyroscopeChange, stopBeaconDiscovery, startBeaconDiscovery, onBeaconUpdate, onBeaconServiceChange, offBeaconUpdate, offBeaconServiceChange, getBeacons, onKeyboardHeightChange, offKeyboardHeightChange, hideKeyboard, getSelectedTextRange, onMemoryWarning, offMemoryWarning, stopDeviceMotionListening, startDeviceMotionListening, onDeviceMotionChange, offDeviceMotionChange, getNetworkType, onNetworkWeakChange, onNetworkStatusChange, offNetworkWeakChange, offNetworkStatusChange, getLocalIPAddress, stopHCE, startHCE, sendHCEMessage, onHCEMessage, offHCEMessage, getNFCAdapter, getHCEState, makePhoneCall, scanCode, setVisualEffectOnCapture, setScreenBrightness, setKeepScreenOn, onUserCaptureScreen, offUserCaptureScreen, getScreenBrightness, vibrateShort, vibrateLong, stopWifi, startWifi, setWifiList, onWifiConnectedWithPartialInfo, onWifiConnected, onGetWifiList, offWifiConnected, offGetWifiList, getWifiList, getConnectedWifi, connectWifi, getExtConfigSync, getExtConfig, saveFileToDisk, saveFile, removeSavedFile, openDocument, getSavedFileList, getSavedFileInfo, getFileSystemManager, getFileInfo, getApp, getCurrentInstance, stopLocationUpdate, startLocationUpdateBackground, startLocationUpdate, openLocation, onLocationChangeError, onLocationChange, offLocationChangeError, offLocationChange, getLocation, choosePoi, getFuzzyLocation, chooseLocation, stopVoice, setInnerAudioOption, playVoice, pauseVoice, getAvailableAudioSources, createWebAudioContext, createMediaAudioPlayer, createInnerAudioContext, createAudioContext, stopBackgroundAudio, seekBackgroundAudio, playBackgroundAudio, pauseBackgroundAudio, onBackgroundAudioStop, onBackgroundAudioPlay, onBackgroundAudioPause, getBackgroundAudioPlayerState, getBackgroundAudioManager, createCameraContext, saveImageToPhotosAlbum, previewMedia, getImageInfo, previewImage, compressImage, chooseMessageFile, chooseImage, createLivePusherContext, createLivePlayerContext, createMapContext, createMediaRecorder, stopRecord, startRecord, getRecorderManager, saveVideoToPhotosAlbum, openVideoEditor, getVideoInfo, createVideoContext, compressVideo, chooseVideo, chooseMedia, createVideoDecoder, createMediaContainer, updateVoIPChatMuteConfig, subscribeVoIPVideoMembers, setEnable1v1Chat, onVoIPVideoMembersChanged, onVoIPChatStateChanged, onVoIPChatSpeakersChanged, onVoIPChatMembersChanged, onVoIPChatInterrupted, offVoIPVideoMembersChanged, offVoIPChatStateChanged, offVoIPChatMembersChanged, offVoIPChatInterrupted, joinVoIPChat, exitVoIPChat, openEmbeddedMiniProgram, navigateToMiniProgram, navigateBackMiniProgram, exitMiniProgram, openBusinessView, downloadFile, stopLocalServiceDiscovery, startLocalServiceDiscovery, onLocalServiceResolveFail, onLocalServiceLost, onLocalServiceFound, onLocalServiceDiscoveryStop, offLocalServiceResolveFail, offLocalServiceLost, offLocalServiceFound, offLocalServiceDiscoveryStop, request, addInterceptor, createTCPSocket, createUDPSocket, uploadFile, sendSocketMessage, onSocketOpen, onSocketMessage, onSocketError, onSocketClose, connectSocket, closeSocket, getAccountInfoSync, chooseAddress, authorizeForMiniProgram, authorize, openCard, addCard, reserveChannelsLive, openChannelsLive, openChannelsEvent, openChannelsActivity, getChannelsLiveNoticeInfo, getChannelsLiveInfo, openCustomerServiceChat, checkIsSupportFacialRecognition, startFacialRecognitionVerify, startFacialRecognitionVerifyAndUploadVideo, faceVerifyForPay, addVideoToFavorites, addFileToFavorites, getGroupEnterInfo, chooseInvoiceTitle, chooseInvoice, chooseLicensePlate, pluginLogin, login, checkSession, showRedPackage, openSetting, getSetting, startSoterAuthentication, checkIsSupportSoterAuthentication, checkIsSoterEnrolledInDevice, requestSubscribeMessage, getUserProfile, getUserInfo, shareToWeRun, getWeRunData, requestPayment, requestOrderPayment, updateShareMenu, showShareMenu, showShareImageMenu, shareVideoMessage, shareFileMessage, onCopyUrl, offCopyUrl, hideShareMenu, getShareInfo, authPrivateMessage, setStorageSync, setStorage, revokeBufferURL, removeStorageSync, removeStorage, getStorageSync, getStorageInfoSync, getStorageInfo, getStorage, createBufferURL, clearStorageSync, clearStorage, setBackgroundFetchToken, onBackgroundFetchData, getBackgroundFetchToken, getBackgroundFetchData, setPageInfo, ocrIdCard, ocrBankCard, ocrDrivingLicense, ocrVehicleLicense, textReview, textToAudio, imageAudit, advancedGeneralIdentify, objectDetectIdentify, carClassify, dishClassify, logoClassify, animalClassify, plantClassify, getSwanId, requestPolymerPayment, navigateToSmartGameProgram, navigateToSmartProgram, navigateBackSmartProgram, preloadSubPackage, createAnimation, setBackgroundTextStyle, setBackgroundColor, nextTick, loadFontFace, disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal, showToast, getMenuButtonBoundingClientRect, showNavigationBarLoading, setNavigationBarTitle, setNavigationBarColor, hideNavigationBarLoading, hideHomeButton, startPullDownRefresh, stopPullDownRefresh, pageScrollTo, setTopBarText, initTabBarApis, showTabBarRedDot, showTabBar, setTabBarStyle, setTabBarItem, setTabBarBadge, removeTabBarBadge, hideTabBarRedDot, hideTabBar, setWindowSize, onWindowResize, offWindowResize, createWorker, createSelectorQuery, createIntersectionObserver, createMediaQueryObserver, Behavior, canIUseWebp, Current, ENV_TYPE, eventCenter, Events, getEnv, history, initPxTransform, interceptors, Link, options, preload, pxTransform, requirePlugin };
|
|
760
761
|
export { getCurrentPages, navigateBack, navigateTo, redirectTo, reLaunch, switchTab } from "@tarojs/router";
|