@tarojs/taro-h5 3.6.24-nightly.9 → 3.6.25
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/index.js +2 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/location/getLocation.js +2 -2
- package/dist/api/location/getLocation.js.map +1 -1
- package/dist/api/location/index.d.ts +2 -7
- package/dist/api/location/index.js +2 -8
- package/dist/api/location/index.js.map +1 -1
- package/dist/api/location/locationChange.d.ts +7 -0
- package/dist/api/location/locationChange.js +130 -0
- package/dist/api/location/locationChange.js.map +1 -0
- package/dist/api/location/utils.d.ts +2 -0
- package/dist/api/location/utils.js +4 -0
- package/dist/api/location/utils.js.map +1 -0
- package/dist/api/ui/navigation-bar/index.d.ts +8 -2
- package/dist/api/ui/navigation-bar/index.js +20 -4
- package/dist/api/ui/navigation-bar/index.js.map +1 -1
- package/dist/index.cjs.d.ts +17 -10
- package/dist/index.cjs.js +149 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.d.ts +17 -10
- package/dist/index.esm.js +150 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/handler.d.ts +2 -0
- package/dist/utils/handler.js +4 -0
- package/dist/utils/handler.js.map +1 -1
- package/package.json +7 -7
package/dist/api/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import './device/index.js';
|
|
|
9
9
|
export { getExtConfig, getExtConfigSync } from './ext/index.js';
|
|
10
10
|
export { getFileInfo, getFileSystemManager, getSavedFileInfo, getSavedFileList, openDocument, removeSavedFile, saveFile, saveFileToDisk } from './files/index.js';
|
|
11
11
|
export { getApp, getCurrentInstance } from './framework/index.js';
|
|
12
|
-
export { choosePoi, getFuzzyLocation,
|
|
12
|
+
export { choosePoi, getFuzzyLocation, openLocation, startLocationUpdateBackground } from './location/index.js';
|
|
13
13
|
import './media/index.js';
|
|
14
14
|
export { exitMiniProgram, navigateBackMiniProgram, navigateToMiniProgram, openBusinessView, openEmbeddedMiniProgram } from './navigate/index.js';
|
|
15
15
|
import './network/index.js';
|
|
@@ -64,6 +64,7 @@ export { connectWifi, getConnectedWifi, getWifiList, offGetWifiList, offWifiConn
|
|
|
64
64
|
export { getCurrentPages, navigateBack, navigateTo, reLaunch, redirectTo, switchTab } from '@tarojs/router';
|
|
65
65
|
export { getLocation } from './location/getLocation.js';
|
|
66
66
|
export { chooseLocation } from './location/chooseLocation.js';
|
|
67
|
+
export { offLocationChange, offLocationChangeError, onLocationChange, onLocationChangeError, startLocationUpdate, stopLocationUpdate } from './location/locationChange.js';
|
|
67
68
|
export { createAudioContext, createInnerAudioContext, createMediaAudioPlayer, createWebAudioContext, getAvailableAudioSources, pauseVoice, playVoice, setInnerAudioOption, stopVoice } from './media/audio/index.js';
|
|
68
69
|
export { getBackgroundAudioManager, getBackgroundAudioPlayerState, onBackgroundAudioPause, onBackgroundAudioPlay, onBackgroundAudioStop, pauseBackgroundAudio, playBackgroundAudio, seekBackgroundAudio, stopBackgroundAudio } from './media/background-audio/index.js';
|
|
69
70
|
export { createCameraContext } from './media/camera.js';
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { shouldBeObject, processOpenApi } from '../../utils/index.js';
|
|
2
2
|
import { MethodHandler } from '../../utils/handler.js';
|
|
3
|
+
import { isGeolocationSupported } from './utils.js';
|
|
3
4
|
|
|
4
5
|
const getLocationByW3CApi = (options) => {
|
|
5
6
|
var _a;
|
|
@@ -26,8 +27,7 @@ const getLocationByW3CApi = (options) => {
|
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
// 判断当前浏览器是否支持位置API
|
|
29
|
-
|
|
30
|
-
if (!geolocationSupported) {
|
|
30
|
+
if (!isGeolocationSupported()) {
|
|
31
31
|
return handle.fail({
|
|
32
32
|
errMsg: 'The current browser does not support this feature'
|
|
33
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLocation.js","sources":["../../../src/api/location/getLocation.ts"],"sourcesContent":["import Taro from '@tarojs/api'\n\nimport { processOpenApi, shouldBeObject } from '../../utils'\nimport { MethodHandler } from '../../utils/handler'\n\nconst getLocationByW3CApi: (options: Taro.getLocation.Option) => Promise<Taro.getLocation.SuccessCallbackResult> = (options: Taro.getLocation.Option): Promise<Taro.getLocation.SuccessCallbackResult> => {\n // 断言 options 必须是 Object\n const isObject = shouldBeObject(options)\n if (!isObject.flag) {\n const res = { errMsg: `getLocation:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n\n // 解构回调函数\n const { success, fail, complete } = options\n\n const handle = new MethodHandler({ name: 'getLocation', success, fail, complete })\n\n // const defaultMaximumAge = 5 * 1000\n\n const positionOptions: PositionOptions = {\n enableHighAccuracy: options.isHighAccuracy || (options.altitude != null), // 海拔定位需要高精度\n // maximumAge: defaultMaximumAge, // 允许取多久以内的缓存位置\n timeout: options.highAccuracyExpireTime // 高精度定位超时时间\n }\n\n // Web端API实现暂时仅支持GPS坐标系\n if (options.type?.toUpperCase() !== 'WGS84') {\n return handle.fail({\n errMsg: 'This coordinate system type is not temporarily supported'\n })\n }\n\n // 判断当前浏览器是否支持位置API\n
|
|
1
|
+
{"version":3,"file":"getLocation.js","sources":["../../../src/api/location/getLocation.ts"],"sourcesContent":["import Taro from '@tarojs/api'\n\nimport { processOpenApi, shouldBeObject } from '../../utils'\nimport { MethodHandler } from '../../utils/handler'\nimport { isGeolocationSupported } from './utils'\n\nconst getLocationByW3CApi: (options: Taro.getLocation.Option) => Promise<Taro.getLocation.SuccessCallbackResult> = (options: Taro.getLocation.Option): Promise<Taro.getLocation.SuccessCallbackResult> => {\n // 断言 options 必须是 Object\n const isObject = shouldBeObject(options)\n if (!isObject.flag) {\n const res = { errMsg: `getLocation:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n\n // 解构回调函数\n const { success, fail, complete } = options\n\n const handle = new MethodHandler({ name: 'getLocation', success, fail, complete })\n\n // const defaultMaximumAge = 5 * 1000\n\n const positionOptions: PositionOptions = {\n enableHighAccuracy: options.isHighAccuracy || (options.altitude != null), // 海拔定位需要高精度\n // maximumAge: defaultMaximumAge, // 允许取多久以内的缓存位置\n timeout: options.highAccuracyExpireTime // 高精度定位超时时间\n }\n\n // Web端API实现暂时仅支持GPS坐标系\n if (options.type?.toUpperCase() !== 'WGS84') {\n return handle.fail({\n errMsg: 'This coordinate system type is not temporarily supported'\n })\n }\n\n // 判断当前浏览器是否支持位置API\n if (!isGeolocationSupported()) {\n return handle.fail({\n errMsg: 'The current browser does not support this feature'\n })\n }\n\n // 开始获取位置\n return new Promise<Taro.getLocation.SuccessCallbackResult>(\n (resolve, reject) => {\n navigator.geolocation.getCurrentPosition(\n (position) => {\n const result: Taro.getLocation.SuccessCallbackResult = {\n /** 位置的精确度 */\n accuracy: position.coords.accuracy,\n /** 高度,单位 m */\n altitude: position.coords.altitude!,\n /** 水平精度,单位 m */\n horizontalAccuracy: position.coords.accuracy,\n /** 纬度,范围为 -90~90,负数表示南纬 */\n latitude: position.coords.latitude,\n /** 经度,范围为 -180~180,负数表示西经 */\n longitude: position.coords.longitude,\n /** 速度,单位 m/s */\n speed: position.coords.speed!,\n /** 垂直精度,单位 m(Android 无法获取,返回 0) */\n verticalAccuracy: position.coords.altitudeAccuracy || 0,\n /** 调用结果,自动补充 */\n errMsg: ''\n }\n handle.success(result, { resolve, reject })\n },\n (error) => {\n handle.fail({ errMsg: error.message }, { resolve, reject })\n },\n positionOptions\n )\n }\n )\n}\n\nexport const getLocation = /* @__PURE__ */ processOpenApi({\n name: 'getLocation',\n standardMethod: getLocationByW3CApi\n})\n"],"names":[],"mappings":";;;;AAMA,MAAM,mBAAmB,GAA0F,CAAC,OAAgC,KAAqD;;;AAEvM,IAAA,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;AACxC,IAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;QAClB,MAAM,GAAG,GAAG,EAAE,MAAM,EAAE,CAAoB,iBAAA,EAAA,QAAQ,CAAC,GAAG,CAAE,CAAA,EAAE,CAAA;AAC1D,QAAA,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AACzB,QAAA,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAC3B,KAAA;;IAGD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;AAE3C,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;;AAIlF,IAAA,MAAM,eAAe,GAAoB;QACvC,kBAAkB,EAAE,OAAO,CAAC,cAAc,KAAK,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC;;AAExE,QAAA,OAAO,EAAE,OAAO,CAAC,sBAAsB;KACxC,CAAA;;IAGD,IAAI,CAAA,CAAA,EAAA,GAAA,OAAO,CAAC,IAAI,0CAAE,WAAW,EAAE,MAAK,OAAO,EAAE;QAC3C,OAAO,MAAM,CAAC,IAAI,CAAC;AACjB,YAAA,MAAM,EAAE,0DAA0D;AACnE,SAAA,CAAC,CAAA;AACH,KAAA;;IAGD,IAAI,CAAC,sBAAsB,EAAE,EAAE;QAC7B,OAAO,MAAM,CAAC,IAAI,CAAC;AACjB,YAAA,MAAM,EAAE,m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neral.CallbackResult>;
|
|
2
1
|
declare const startLocationUpdateBackground: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
3
|
-
declare const startLocationUpdate: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
4
2
|
declare const openLocation: (options?: Partial<{
|
|
5
3
|
scale: number;
|
|
6
4
|
}>, ...args: any[]) => Promise<any>;
|
|
7
|
-
declare const onLocationChangeError: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
8
|
-
declare const onLocationChange: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
9
|
-
declare const offLocationChangeError: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
10
|
-
declare const offLocationChange: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
11
5
|
declare const choosePoi: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
12
6
|
declare const getFuzzyLocation: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
13
|
-
export {
|
|
7
|
+
export { startLocationUpdateBackground, openLocation, choosePoi, getFuzzyLocation };
|
|
14
8
|
export { getLocation } from "./getLocation.js";
|
|
15
9
|
export { chooseLocation } from "./chooseLocation.js";
|
|
10
|
+
export { offLocationChange, offLocationChangeError, onLocationChange, onLocationChangeError, startLocationUpdate, stopLocationUpdate } from "./locationChange.js";
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import { temporarilyNotSupport, processOpenApi } from '../../utils/index.js';
|
|
2
2
|
export { getLocation } from './getLocation.js';
|
|
3
3
|
export { chooseLocation } from './chooseLocation.js';
|
|
4
|
+
export { offLocationChange, offLocationChangeError, onLocationChange, onLocationChangeError, startLocationUpdate, stopLocationUpdate } from './locationChange.js';
|
|
4
5
|
|
|
5
|
-
// 位置
|
|
6
|
-
const stopLocationUpdate = /* @__PURE__ */ temporarilyNotSupport('stopLocationUpdate');
|
|
7
6
|
const startLocationUpdateBackground = /* @__PURE__ */ temporarilyNotSupport('startLocationUpdateBackground');
|
|
8
|
-
const startLocationUpdate = /* @__PURE__ */ temporarilyNotSupport('startLocationUpdate');
|
|
9
7
|
const openLocation = /* @__PURE__ */ processOpenApi({
|
|
10
8
|
name: 'openLocation',
|
|
11
9
|
defaultOptions: { scale: 18 }
|
|
12
10
|
});
|
|
13
|
-
const onLocationChangeError = /* @__PURE__ */ temporarilyNotSupport('onLocationChangeError');
|
|
14
|
-
const onLocationChange = /* @__PURE__ */ temporarilyNotSupport('onLocationChange');
|
|
15
|
-
const offLocationChangeError = /* @__PURE__ */ temporarilyNotSupport('offLocationChangeError');
|
|
16
|
-
const offLocationChange = /* @__PURE__ */ temporarilyNotSupport('offLocationChange');
|
|
17
11
|
const choosePoi = /* @__PURE__ */ temporarilyNotSupport('choosePoi');
|
|
18
12
|
const getFuzzyLocation = /* @__PURE__ */ temporarilyNotSupport('getFuzzyLocation');
|
|
19
13
|
|
|
20
|
-
export { choosePoi, getFuzzyLocation,
|
|
14
|
+
export { choosePoi, getFuzzyLocation, openLocation, startLocationUpdateBackground };
|
|
21
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/api/location/index.ts"],"sourcesContent":["import { processOpenApi, temporarilyNotSupport } from '../../utils/index'\r\n\r\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/api/location/index.ts"],"sourcesContent":["import { processOpenApi, temporarilyNotSupport } from '../../utils/index'\r\n\r\nexport const startLocationUpdateBackground = /* @__PURE__ */ temporarilyNotSupport('startLocationUpdateBackground')\r\n\r\nexport const openLocation = /* @__PURE__ */ processOpenApi({\r\n name: 'openLocation',\r\n defaultOptions: { scale: 18 }\r\n})\r\n\r\nexport { getLocation } from './getLocation'\r\n\r\nexport const choosePoi = /* @__PURE__ */ temporarilyNotSupport('choosePoi')\r\nexport const getFuzzyLocation = /* @__PURE__ */ temporarilyNotSupport('getFuzzyLocation')\r\n\r\nexport { chooseLocation } from './chooseLocation'\r\nexport { offLocationChange, offLocationChangeError, onLocationChange, onLocationChangeError, startLocationUpdate, stopLocationUpdate } from './locationChange'\r\n"],"names":[],"mappings":";;;;;AAEa,MAAA,6BAA6B,mBAAmB,qBAAqB,CAAC,+BAA+B,EAAC;AAEtG,MAAA,YAAY,mBAAmB,cAAc,CAAC;AACzD,IAAA,IAAI,EAAE,cAAc;AACpB,IAAA,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;AAC9B,CAAA,EAAC;AAIW,MAAA,SAAS,mBAAmB,qBAAqB,CAAC,WAAW,EAAC;AAC9D,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare function onLocationChange(callback: Taro.onLocationChange.Callback): void;
|
|
2
|
+
declare function offLocationChange(callback: Taro.onLocationChange.Callback): void;
|
|
3
|
+
declare function onLocationChangeError(callback: Taro.onLocationChange.Callback): void;
|
|
4
|
+
declare function offLocationChangeError(callback: Taro.onLocationChange.Callback): void;
|
|
5
|
+
declare const stopLocationUpdate: (options?: Partial<import("taro/types").stopLocationUpdate.Option>, ...args: any[]) => Promise<TaroGeneral.CallbackResult>;
|
|
6
|
+
declare const startLocationUpdate: (options?: Partial<import("taro/types").startLocationUpdate.Option>, ...args: any[]) => Promise<TaroGeneral.CallbackResult>;
|
|
7
|
+
export { onLocationChange, offLocationChange, onLocationChangeError, offLocationChangeError, stopLocationUpdate, startLocationUpdate };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { shouldBeObject, processOpenApi } from '../../utils/index.js';
|
|
2
|
+
import { CallbackManager, MethodHandler } from '../../utils/handler.js';
|
|
3
|
+
import { isGeolocationSupported } from './utils.js';
|
|
4
|
+
|
|
5
|
+
const _successCbManager = new CallbackManager();
|
|
6
|
+
const _errorCbManager = new CallbackManager();
|
|
7
|
+
let _watchID = -1;
|
|
8
|
+
function onLocationChange(callback) {
|
|
9
|
+
_successCbManager.add(callback);
|
|
10
|
+
}
|
|
11
|
+
function offLocationChange(callback) {
|
|
12
|
+
if (callback && typeof callback === 'function') {
|
|
13
|
+
_successCbManager.remove(callback);
|
|
14
|
+
}
|
|
15
|
+
else if (callback === undefined) {
|
|
16
|
+
_successCbManager.clear();
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
console.warn('offLocationChange failed');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function onLocationChangeError(callback) {
|
|
23
|
+
_errorCbManager.add(callback);
|
|
24
|
+
}
|
|
25
|
+
function offLocationChangeError(callback) {
|
|
26
|
+
if (callback && typeof callback === 'function') {
|
|
27
|
+
_errorCbManager.remove(callback);
|
|
28
|
+
}
|
|
29
|
+
else if (callback === undefined) {
|
|
30
|
+
_errorCbManager.clear();
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
console.warn('offLocationChangeError failed');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 开始监听位置信息
|
|
38
|
+
* @param opts
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
function startLocationUpdateByW3CApi(opts) {
|
|
42
|
+
// 断言 options 必须是 Object
|
|
43
|
+
const isObject = shouldBeObject(opts);
|
|
44
|
+
if (!isObject.flag) {
|
|
45
|
+
const res = { errMsg: `startLocationUpdate:fail ${isObject.msg}` };
|
|
46
|
+
console.error(res.errMsg);
|
|
47
|
+
return Promise.reject(res);
|
|
48
|
+
}
|
|
49
|
+
const { success, fail, complete } = opts;
|
|
50
|
+
const handle = new MethodHandler({ name: 'startLocationUpdate', success, fail, complete });
|
|
51
|
+
// 判断当前浏览器是否支持位置API
|
|
52
|
+
if (!isGeolocationSupported()) {
|
|
53
|
+
return handle.fail({
|
|
54
|
+
errMsg: 'The current browser does not support this feature'
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
if (_watchID > -1) {
|
|
59
|
+
console.error('startLocationUpdate:fail');
|
|
60
|
+
return handle.fail();
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
_watchID = navigator.geolocation.watchPosition(({ coords }) => {
|
|
64
|
+
const { latitude, longitude, altitude, accuracy, speed } = coords;
|
|
65
|
+
_successCbManager.trigger({
|
|
66
|
+
accuracy,
|
|
67
|
+
altitude,
|
|
68
|
+
horizontalAccuracy: 0,
|
|
69
|
+
verticalAccuracy: 0,
|
|
70
|
+
latitude,
|
|
71
|
+
longitude,
|
|
72
|
+
speed,
|
|
73
|
+
});
|
|
74
|
+
}, err => {
|
|
75
|
+
_errorCbManager.trigger({
|
|
76
|
+
errMsg: 'Watch Position error',
|
|
77
|
+
err
|
|
78
|
+
});
|
|
79
|
+
}, {
|
|
80
|
+
timeout: 10,
|
|
81
|
+
maximumAge: 0,
|
|
82
|
+
enableHighAccuracy: true,
|
|
83
|
+
});
|
|
84
|
+
return handle.success();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
return handle.fail();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* 停止监听位置信息
|
|
93
|
+
* @param opts
|
|
94
|
+
* @returns
|
|
95
|
+
*/
|
|
96
|
+
function stopLocationUpdateByW3CApi(opts) {
|
|
97
|
+
const isObject = shouldBeObject(opts);
|
|
98
|
+
if (!isObject.flag) {
|
|
99
|
+
const res = { errMsg: `stopLocationUpdate:fail ${isObject.msg}` };
|
|
100
|
+
console.error(res.errMsg);
|
|
101
|
+
return Promise.reject(res);
|
|
102
|
+
}
|
|
103
|
+
const { success, fail, complete } = opts;
|
|
104
|
+
const handle = new MethodHandler({ name: 'stopLocationUpdate', success, fail, complete });
|
|
105
|
+
// 判断当前浏览器是否支持位置API
|
|
106
|
+
if (!isGeolocationSupported()) {
|
|
107
|
+
return handle.fail({
|
|
108
|
+
errMsg: 'The current browser does not support this feature'
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
navigator.geolocation.clearWatch(_watchID);
|
|
113
|
+
_watchID = -1;
|
|
114
|
+
return handle.success();
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
return handle.fail();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const stopLocationUpdate = /* @__PURE__ */ processOpenApi({
|
|
121
|
+
name: 'stopLocationUpdate',
|
|
122
|
+
standardMethod: stopLocationUpdateByW3CApi
|
|
123
|
+
});
|
|
124
|
+
const startLocationUpdate = /* @__PURE__ */ processOpenApi({
|
|
125
|
+
name: 'startLocationUpdate',
|
|
126
|
+
standardMethod: startLocationUpdateByW3CApi
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
export { offLocationChange, offLocationChangeError, onLocationChange, onLocationChangeError, startLocationUpdate, stopLocationUpdate };
|
|
130
|
+
//# sourceMappingURL=locationChange.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locationChange.js","sources":["../../../src/api/location/locationChange.ts"],"sourcesContent":["import { processOpenApi,shouldBeObject } from '../../utils'\nimport { CallbackManager, MethodHandler } from '../../utils/handler'\nimport { isGeolocationSupported } from './utils'\n\nconst _successCbManager = new CallbackManager()\nconst _errorCbManager = new CallbackManager()\nlet _watchID = -1\n\nexport function onLocationChange (callback: Taro.onLocationChange.Callback): void {\n _successCbManager.add(callback)\n}\n\nexport function offLocationChange (callback: Taro.onLocationChange.Callback): void {\n if (callback && typeof callback === 'function') {\n _successCbManager.remove(callback)\n } else if (callback === undefined) {\n _successCbManager.clear()\n } else {\n console.warn('offLocationChange failed')\n }\n}\n\nexport function onLocationChangeError (callback: Taro.onLocationChange.Callback): void {\n _errorCbManager.add(callback)\n}\n \nexport function offLocationChangeError (callback: Taro.onLocationChange.Callback): void {\n if (callback && typeof callback === 'function') {\n _errorCbManager.remove(callback)\n } else if (callback === undefined) {\n _errorCbManager.clear()\n } else {\n console.warn('offLocationChangeError failed')\n }\n}\n\n/**\n * 开始监听位置信息\n * @param opts \n * @returns \n */\nfunction startLocationUpdateByW3CApi (opts: Taro.startLocationUpdate.Option): Promise<TaroGeneral.CallbackResult> {\n// 断言 options 必须是 Object\n const isObject = shouldBeObject(opts)\n if (!isObject.flag) {\n const res = { errMsg: `startLocationUpdate:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n\n const { success, fail, complete } = opts\n const handle = new MethodHandler({ name: 'startLocationUpdate', success, fail, complete })\n\n // 判断当前浏览器是否支持位置API\n if (!isGeolocationSupported()) {\n return handle.fail({\n errMsg: 'The current browser does not support this feature'\n })\n }\n\n try {\n if (_watchID > -1) {\n console.error('startLocationUpdate:fail')\n return handle.fail()\n } else {\n _watchID = navigator.geolocation.watchPosition(({ coords }) => {\n const { latitude, longitude, altitude, accuracy, speed } = coords\n _successCbManager.trigger({\n accuracy,\n altitude,\n horizontalAccuracy: 0,\n verticalAccuracy: 0,\n latitude,\n longitude,\n speed,\n })\n }, err => {\n _errorCbManager.trigger({\n errMsg: 'Watch Position error',\n err\n })\n }, {\n timeout: 10,\n maximumAge: 0,\n enableHighAccuracy: true,\n })\n return handle.success()\n }\n } catch (error) {\n return handle.fail()\n }\n}\n\n/**\n * 停止监听位置信息\n * @param opts \n * @returns \n */\nfunction stopLocationUpdateByW3CApi (opts: Taro.stopLocationUpdate.Option): Promise<TaroGeneral.CallbackResult> {\n const isObject = shouldBeObject(opts)\n if (!isObject.flag) {\n const res = { errMsg: `stopLocationUpdate:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n \n const { success, fail, complete } = opts\n const handle = new MethodHandler({ name: 'stopLocationUpdate', success, fail, complete })\n\n // 判断当前浏览器是否支持位置API\n if (!isGeolocationSupported()) {\n return handle.fail({\n errMsg: 'The current browser does not support this feature'\n })\n }\n\n try {\n navigator.geolocation.clearWatch(_watchID)\n _watchID = -1\n return handle.success()\n } catch (error) {\n return handle.fail()\n }\n}\n\nexport const stopLocationUpdate = /* @__PURE__ */ processOpenApi({\n name: 'stopLocationUpdate',\n standardMethod: stopLocationUpdateByW3CApi\n})\n\nexport const startLocationUpdate = /* @__PURE__ */ processOpenApi({\n name: 'startLocationUpdate',\n standardMethod: startLocationUpdateByW3CApi\n})\n"],"names":[],"mappings":";;;;AAIA,MAAM,iBAAiB,GAAG,IAAI,eAAe,EAAE,CAAA;AAC/C,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAA;AAC7C,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAA;AAEX,SAAU,gBAAgB,CAAE,QAAwC,EAAA;AACxE,IAAA,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AACjC,CAAC;AAEK,SAAU,iBAAiB,CAAE,QAAwC,EAAA;AACzE,IAAA,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;AAC9C,QAAA,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AACnC,KAAA;SAAM,IAAI,QAAQ,KAAK,SAAS,EAAE;QACjC,iBAAiB,CAAC,KAAK,EAAE,CAAA;AAC1B,KAAA;AAAM,SAAA;AACL,QAAA,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA;AACzC,KAAA;AACH,CAAC;AAEK,SAAU,qBAAqB,CAAE,QAAwC,EAAA;AAC7E,IAAA,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AAC/B,CAAC;AA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AO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAC3B,KAAA;IAED,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;AACxC,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;;IAGzF,IAAI,CAAC,sBAAsB,EAAE,EAAE;QAC7B,OAAO,MAAM,CAAC,IAAI,CAAC;AACjB,YAAA,MAAM,EAAE,mDAAmD;AAC5D,SAAA,CAAC,CAAA;AACH,KAAA;IAED,IAAI;AACF,QAAA,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;QAC1C,QAAQ,GAAG,CAAC,CAAC,CAAA;AACb,QAAA,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;AACxB,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,MAAM,CAAC,IAAI,EAAE,CAAA;AACrB,KAAA;AACH,CAAC;AAEY,MAAA,kBAAkB,mBAAmB,cAAc,CAAC;AAC/D,IAAA,IAAI,EAAE,oBAAoB;AAC1B,IAAA,cAAc,EAAE,0BAA0B;AAC3C,CAAA,EAAC;AAEW,MAAA,mBAAmB,mBAAmB,cAAc,CAAC;AAChE,IAAA,IAAI,EAAE,qBAAqB;AAC3B,IAAA,cAAc,EAAE,2BAA2B;AAC5C,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/api/location/utils.ts"],"sourcesContent":["export const isGeolocationSupported = (): boolean => !!navigator.geolocation\n"],"names":[],"mappings":"AAAO,MAAM,sBAAsB,GAAG,MAAe,CAAC,CAAC,SAAS,CAAC;;;;"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import Taro from '@tarojs/api';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* 展示导航栏 loading 状态
|
|
4
|
+
*/
|
|
5
|
+
declare function showNavigationBarLoading(options?: Taro.showNavigationBarLoading.Option): Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
3
6
|
declare function setNavigationBarTitle(options?: Taro.setNavigationBarTitle.Option): Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
4
7
|
/**
|
|
5
8
|
* 设置页面导航条颜色
|
|
6
9
|
*/
|
|
7
10
|
declare const setNavigationBarColor: typeof Taro.setNavigationBarColor;
|
|
8
|
-
|
|
11
|
+
/**
|
|
12
|
+
* 隐藏导航栏 loading 状态
|
|
13
|
+
*/
|
|
14
|
+
declare function hideNavigationBarLoading(options?: Taro.hideNavigationBarLoading.Option): Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
9
15
|
declare const hideHomeButton: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
10
16
|
export { showNavigationBarLoading, setNavigationBarTitle, setNavigationBarColor, hideNavigationBarLoading, hideHomeButton };
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import { setTitle, setNavigationBarStyle } from '@tarojs/router';
|
|
2
|
-
import {
|
|
1
|
+
import { setNavigationBarLoading, setTitle, setNavigationBarStyle } from '@tarojs/router';
|
|
2
|
+
import { shouldBeObject, getParameterError, temporarilyNotSupport } from '../../../utils/index.js';
|
|
3
3
|
import { MethodHandler } from '../../../utils/handler.js';
|
|
4
4
|
|
|
5
5
|
// 导航栏
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* 展示导航栏 loading 状态
|
|
8
|
+
*/
|
|
9
|
+
function showNavigationBarLoading(options = {}) {
|
|
10
|
+
const { success, fail, complete } = options;
|
|
11
|
+
const handle = new MethodHandler({ name: 'showNavigationBarLoading', success, fail, complete });
|
|
12
|
+
setNavigationBarLoading(true);
|
|
13
|
+
return handle.success();
|
|
14
|
+
}
|
|
7
15
|
function setNavigationBarTitle(options) {
|
|
8
16
|
// options must be an Object
|
|
9
17
|
const isObject = shouldBeObject(options);
|
|
@@ -39,7 +47,15 @@ const setNavigationBarColor = (options) => {
|
|
|
39
47
|
setNavigationBarStyle({ frontColor, backgroundColor });
|
|
40
48
|
return handle.success();
|
|
41
49
|
};
|
|
42
|
-
|
|
50
|
+
/**
|
|
51
|
+
* 隐藏导航栏 loading 状态
|
|
52
|
+
*/
|
|
53
|
+
function hideNavigationBarLoading(options = {}) {
|
|
54
|
+
const { success, fail, complete } = options;
|
|
55
|
+
const handle = new MethodHandler({ name: 'hideNavigationBarLoading', success, fail, complete });
|
|
56
|
+
setNavigationBarLoading(false);
|
|
57
|
+
return handle.success();
|
|
58
|
+
}
|
|
43
59
|
const hideHomeButton = /* @__PURE__ */ temporarilyNotSupport('hideHomeButton');
|
|
44
60
|
|
|
45
61
|
export { hideHomeButton, hideNavigationBarLoading, setNavigationBarColor, setNavigationBarTitle, showNavigationBarLoading };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/api/ui/navigation-bar/index.ts"],"sourcesContent":["import Taro from '@tarojs/api'\nimport { setNavigationBarStyle, setTitle } from '@tarojs/router'\n\nimport { getParameterError, shouldBeObject, temporarilyNotSupport } from '../../../utils'\nimport { MethodHandler } from '../../../utils/handler'\n\n// 导航栏\nexport
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/api/ui/navigation-bar/index.ts"],"sourcesContent":["import Taro from '@tarojs/api'\nimport { setNavigationBarLoading, setNavigationBarStyle, setTitle } from '@tarojs/router'\n\nimport { getParameterError, shouldBeObject, temporarilyNotSupport } from '../../../utils'\nimport { MethodHandler } from '../../../utils/handler'\n\n// 导航栏\n/**\n * 展示导航栏 loading 状态\n*/\nexport function showNavigationBarLoading (options: Taro.showNavigationBarLoading.Option = {}) {\n const { success, fail, complete } = options\n const handle = new MethodHandler({ name: 'showNavigationBarLoading', success, fail, complete })\n setNavigationBarLoading(true)\n return handle.success()\n}\n\nexport function setNavigationBarTitle (options?: Taro.setNavigationBarTitle.Option) {\n // options must be an Object\n const isObject = shouldBeObject(options)\n if (!isObject.flag) {\n const res = { errMsg: `setNavigationBarTitle:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n\n const { title, success, fail, complete } = options as Exclude<typeof options, undefined>\n const handle = new MethodHandler({ name: 'setNavigationBarTitle', success, fail, complete })\n\n if (!title || typeof title !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'title',\n correct: 'String',\n wrong: title\n })\n })\n }\n\n setTitle(title)\n\n return handle.success()\n}\n\n/**\n * 设置页面导航条颜色\n */\nexport const setNavigationBarColor: typeof Taro.setNavigationBarColor = (options) => {\n const { backgroundColor, frontColor, success, fail, complete } = options\n const handle = new MethodHandler({ name: 'setNavigationBarColor', success, fail, complete })\n const meta = document.createElement('meta')\n meta.setAttribute('name', 'theme-color')\n meta.setAttribute('content', backgroundColor)\n document.head.appendChild(meta)\n setNavigationBarStyle({ frontColor, backgroundColor })\n return handle.success()\n}\n\n/**\n * 隐藏导航栏 loading 状态\n*/\nexport function hideNavigationBarLoading (options: Taro.hideNavigationBarLoading.Option = {}) {\n const { success, fail, complete } = options\n const handle = new MethodHandler({ name: 'hideNavigationBarLoading', success, fail, complete })\n setNavigationBarLoading(false)\n return handle.success()\n}\n\nexport const hideHomeButton = /* @__PURE__ */ temporarilyNotSupport('hideHomeButton')\n"],"names":[],"mappings":";;;;AAMA;AACA;;AAEE;AACc,SAAA,wBAAwB,CAAE,OAAA,GAAgD,EAAE,EAAA;IAC1F,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;AAC3C,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,IAAI,EAAE,0BAA0B,EAAE,OAAO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AE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;AACxE,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;IAC5F,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;AAC3C,IAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;AACxC,IAAA,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,eAAe,CAAC,CAAA;AAC7C,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;AAC/B,IAAA,qBAAqB,CAAC,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC,CAAA;AACtD,IAAA,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;AACzB,EAAC;AAED;;AAEE;AACc,SAAA,wBAAwB,CAAE,OAAA,GAAgD,EAAE,EAAA;IAC1F,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;AAC3C,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,IAAI,EAAE,0BAA0B,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;IAC/F,uBAAuB,CAAC,KAAK,CAAC,CAAA;AAC9B,IAAA,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;AACzB,CAAC;AAEY,MAAA,cAAc,mBAAmB,qBAAqB,CAAC,gBAAgB;;;;"}
|
package/dist/index.cjs.d.ts
CHANGED
|
@@ -348,17 +348,10 @@ declare const getFileInfo: (option?: {}, ...args: any[]) => Promise<Partial<Taro
|
|
|
348
348
|
declare const getApp: typeof Taro.getApp;
|
|
349
349
|
// 自定义组件
|
|
350
350
|
declare const getCurrentInstance: () => Taro.getCurrentInstance.Current;
|
|
351
|
-
// 位置
|
|
352
|
-
declare const stopLocationUpdate: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
353
351
|
declare const startLocationUpdateBackground: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
354
|
-
declare const startLocationUpdate: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
355
352
|
declare const openLocation: (options?: Partial<{
|
|
356
353
|
scale: number;
|
|
357
354
|
}>, ...args: any[]) => Promise<any>;
|
|
358
|
-
declare const onLocationChangeError: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
359
|
-
declare const onLocationChange: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
360
|
-
declare const offLocationChangeError: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
361
|
-
declare const offLocationChange: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
362
355
|
declare const getLocation: (options?: Partial<Taro.getLocation.Option>, ...args: any[]) => Promise<Taro.getLocation.SuccessCallbackResult>;
|
|
363
356
|
declare const choosePoi: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
364
357
|
declare const getFuzzyLocation: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
@@ -366,6 +359,12 @@ declare const getFuzzyLocation: (option?: {}, ...args: any[]) => Promise<Partial
|
|
|
366
359
|
* 打开地图选择位置。
|
|
367
360
|
*/
|
|
368
361
|
declare const chooseLocation: typeof Taro.chooseLocation;
|
|
362
|
+
declare function onLocationChange(callback: Taro.onLocationChange.Callback): void;
|
|
363
|
+
declare function offLocationChange(callback: Taro.onLocationChange.Callback): void;
|
|
364
|
+
declare function onLocationChangeError(callback: Taro.onLocationChange.Callback): void;
|
|
365
|
+
declare function offLocationChangeError(callback: Taro.onLocationChange.Callback): void;
|
|
366
|
+
declare const stopLocationUpdate: (options?: Partial<import("taro/types").stopLocationUpdate.Option>, ...args: any[]) => Promise<TaroGeneral.CallbackResult>;
|
|
367
|
+
declare const startLocationUpdate: (options?: Partial<import("taro/types").startLocationUpdate.Option>, ...args: any[]) => Promise<TaroGeneral.CallbackResult>;
|
|
369
368
|
// 音频
|
|
370
369
|
declare const stopVoice: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
371
370
|
declare const setInnerAudioOption: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
@@ -396,6 +395,8 @@ declare class CallbackManager<T extends unknown[] = unknown[]> {
|
|
|
396
395
|
count: () => number;
|
|
397
396
|
/** 触发回调 */
|
|
398
397
|
trigger: (...args: T) => void;
|
|
398
|
+
/** 清空所有回调 */
|
|
399
|
+
clear: () => void;
|
|
399
400
|
}
|
|
400
401
|
declare class BackgroundAudioManager implements Taro.BackgroundAudioManager {
|
|
401
402
|
Instance?: HTMLAudioElement;
|
|
@@ -781,13 +782,19 @@ declare const disableAlertBeforeUnload: (option?: {}, ...args: any[]) => Promise
|
|
|
781
782
|
// 菜单
|
|
782
783
|
declare const getMenuButtonBoundingClientRect: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
783
784
|
// 导航栏
|
|
784
|
-
|
|
785
|
+
/**
|
|
786
|
+
* 展示导航栏 loading 状态
|
|
787
|
+
*/
|
|
788
|
+
declare function showNavigationBarLoading(options?: Taro.showNavigationBarLoading.Option): Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
785
789
|
declare function setNavigationBarTitle(options?: Taro.setNavigationBarTitle.Option): Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
786
790
|
/**
|
|
787
791
|
* 设置页面导航条颜色
|
|
788
792
|
*/
|
|
789
793
|
declare const setNavigationBarColor: typeof Taro.setNavigationBarColor;
|
|
790
|
-
|
|
794
|
+
/**
|
|
795
|
+
* 隐藏导航栏 loading 状态
|
|
796
|
+
*/
|
|
797
|
+
declare function hideNavigationBarLoading(options?: Taro.hideNavigationBarLoading.Option): Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
791
798
|
declare const hideHomeButton: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
792
799
|
/**
|
|
793
800
|
* 开始下拉刷新。调用后触发下拉刷新动画,效果与用户手动下拉刷新一致。
|
|
@@ -887,5 +894,5 @@ declare class NodesRef implements Taro.NodesRef {
|
|
|
887
894
|
declare const createSelectorQuery: typeof Taro.createSelectorQuery;
|
|
888
895
|
declare const createIntersectionObserver: typeof Taro.createIntersectionObserver;
|
|
889
896
|
declare const createMediaQueryObserver: typeof Taro.createMediaQueryObserver;
|
|
890
|
-
export { taro as default, taro, createRewardedVideoAd, createInterstitialAd, stopFaceDetect, initFaceDetect, faceDetect, getInferenceEnvInfo, createInferenceSession, isVKSupport, createVKSession, getOpenUserInfo, tradePay, env, arrayBufferToBase64, base64ToArrayBuffer, getUserCryptoManager, setEnableDebug, getRealtimeLogManager, getLogManager, reportPerformance, getPerformance, preloadWebview, preloadSkylineView, preloadAssets, openSystemBluetoothSetting, openAppAuthorizeSetting, getWindowInfo, getSystemSetting, getDeviceInfo, getAppBaseInfo, getAppAuthorizeSetting, getSystemInfoSync, getSystemInfoAsync, getSystemInfo, getSkylineInfoSync, getSkylineInfo, getRendererUserAgent, updateWeChatApp, getUpdateManager, onUnhandledRejection, onThemeChange, onPageNotFound, onLazyLoadError, onError, onAudioInterruptionEnd, onAudioInterruptionBegin, onAppShow, onAppHide, offUnhandledRejection, offThemeChange, offPageNotFound, offLazyLoadError, 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, onScreenRecordingStateChanged, offScreenRecordingStateChanged, getScreenRecordingState, sendSms, vibrateShort, vibrateLong, stopWifi, startWifi, setWifiList, onWifiConnectedWithPartialInfo, onWifiConnected, onGetWifiList, offWifiConnectedWithPartialInfo, offWifiConnected, offGetWifiList, getWifiList, getConnectedWifi, connectWifi, getExtConfigSync, getExtConfig, saveFileToDisk, saveFile, removeSavedFile, openDocument, getSavedFileList, getSavedFileInfo, getFileSystemManager, getFileInfo, getApp, getCurrentInstance,
|
|
897
|
+
export { taro as default, taro, createRewardedVideoAd, createInterstitialAd, stopFaceDetect, initFaceDetect, faceDetect, getInferenceEnvInfo, createInferenceSession, isVKSupport, createVKSession, getOpenUserInfo, tradePay, env, arrayBufferToBase64, base64ToArrayBuffer, getUserCryptoManager, setEnableDebug, getRealtimeLogManager, getLogManager, reportPerformance, getPerformance, preloadWebview, preloadSkylineView, preloadAssets, openSystemBluetoothSetting, openAppAuthorizeSetting, getWindowInfo, getSystemSetting, getDeviceInfo, getAppBaseInfo, getAppAuthorizeSetting, getSystemInfoSync, getSystemInfoAsync, getSystemInfo, getSkylineInfoSync, getSkylineInfo, getRendererUserAgent, updateWeChatApp, getUpdateManager, onUnhandledRejection, onThemeChange, onPageNotFound, onLazyLoadError, onError, onAudioInterruptionEnd, onAudioInterruptionBegin, onAppShow, onAppHide, offUnhandledRejection, offThemeChange, offPageNotFound, offLazyLoadError, 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, onScreenRecordingStateChanged, offScreenRecordingStateChanged, getScreenRecordingState, sendSms, vibrateShort, vibrateLong, stopWifi, startWifi, setWifiList, onWifiConnectedWithPartialInfo, onWifiConnected, onGetWifiList, offWifiConnectedWithPartialInfo, offWifiConnected, offGetWifiList, getWifiList, getConnectedWifi, connectWifi, getExtConfigSync, getExtConfig, saveFileToDisk, saveFile, removeSavedFile, openDocument, getSavedFileList, getSavedFileInfo, getFileSystemManager, getFileInfo, getApp, getCurrentInstance, startLocationUpdateBackground, openLocation, getLocation, choosePoi, getFuzzyLocation, chooseLocation, offLocationChange, offLocationChangeError, onLocationChange, onLocationChangeError, startLocationUpdate, stopLocationUpdate, 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, editImage, cropImage, createLivePusherContext, createLivePlayerContext, createMapContext, createMediaRecorder, stopRecord, startRecord, getRecorderManager, saveVideoToPhotosAlbum, openVideoEditor, getVideoInfo, createVideoContext, compressVideo, chooseMedia, chooseVideo, createVideoDecoder, createMediaContainer, updateVoIPChatMuteConfig, subscribeVoIPVideoMembers, setEnable1v1Chat, onVoIPVideoMembersChanged, onVoIPChatStateChanged, onVoIPChatSpeakersChanged, onVoIPChatMembersChanged, onVoIPChatInterrupted, offVoIPChatSpeakersChanged, offVoIPVideoMembersChanged, offVoIPChatStateChanged, offVoIPChatMembersChanged, offVoIPChatInterrupted, joinVoIPChat, join1v1Chat, exitVoIPChat, openEmbeddedMiniProgram, navigateToMiniProgram, navigateBackMiniProgram, exitMiniProgram, openBusinessView, downloadFile, stopLocalServiceDiscovery, startLocalServiceDiscovery, onLocalServiceResolveFail, onLocalServiceLost, onLocalServiceFound, onLocalServiceDiscoveryStop, offLocalServiceResolveFail, offLocalServiceLost, offLocalServiceFound, offLocalServiceDiscoveryStop, request, addInterceptor, cleanInterceptors, createTCPSocket, createUDPSocket, uploadFile, sendSocketMessage, onSocketOpen, onSocketMessage, onSocketError, onSocketClose, connectSocket, closeSocket, SocketTask, getAccountInfoSync, chooseAddress, authorizeForMiniProgram, authorize, openCard, addCard, reserveChannelsLive, openChannelsUserProfile, openChannelsLive, openChannelsEvent, openChannelsActivity, getChannelsShareKey, getChannelsLiveNoticeInfo, getChannelsLiveInfo, openCustomerServiceChat, requestDeviceVoIP, getDeviceVoIPList, checkIsSupportFacialRecognition, startFacialRecognitionVerify, startFacialRecognitionVerifyAndUploadVideo, faceVerifyForPay, addVideoToFavorites, addFileToFavorites, getGroupEnterInfo, chooseInvoiceTitle, chooseInvoice, chooseLicensePlate, pluginLogin, login, checkSession, checkIsAddedToMyMiniProgram, requirePrivacyAuthorize, openPrivacyContract, onNeedPrivacyAuthorization, getPrivacySetting, showRedPackage, openSetting, getSetting, startSoterAuthentication, checkIsSupportSoterAuthentication, checkIsSoterEnrolledInDevice, requestSubscribeMessage, requestSubscribeDeviceMessage, getUserProfile, getUserInfo, shareToWeRun, getWeRunData, requestPayment, requestPluginPayment, requestOrderPayment, openQzonePublish, getQQRunData, setOfficialDress, setCustomDress, updateQQApp, addRecentColorSign, getGuildInfo, applyAddToMyApps, isAddedToMyApps, updateShareMenu, showShareMenu, showShareImageMenu, shareVideoMessage, shareFileMessage, onCopyUrl, offCopyUrl, hideShareMenu, getShareInfo, authPrivateMessage, setStorageSync, setStorage, revokeBufferURL, removeStorageSync, removeStorage, getStorageSync, getStorageInfoSync, getStorageInfo, getStorage, createBufferURL, clearStorageSync, clearStorage, batchSetStorageSync, batchSetStorage, batchGetStorageSync, batchGetStorage, setBackgroundFetchToken, onBackgroundFetchData, getBackgroundFetchToken, getBackgroundFetchData, createCacheManager, 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, checkIsPictureInPictureActive, createWorker, createSelectorQuery, createIntersectionObserver, createMediaQueryObserver, NodesRef, Behavior, canIUseWebp, Current, ENV_TYPE, eventCenter, Events, getAppInfo, getEnv, history, initPxTransform, interceptorify, interceptors, Link, options, preload, pxTransform, requirePlugin };
|
|
891
898
|
export { getCurrentPages, navigateBack, navigateTo, redirectTo, reLaunch, switchTab } from "@tarojs/router";
|