@tarojs/taro 3.6.17 → 3.6.18
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/package.json +4 -4
- package/types/api/device/accelerometer.d.ts +8 -6
- package/types/api/device/accessibility.d.ts +1 -1
- package/types/api/device/battery.d.ts +2 -2
- package/types/api/device/bluetooth-ble.d.ts +40 -17
- package/types/api/device/bluetooth-peripheral.d.ts +26 -26
- package/types/api/device/bluetooth.d.ts +37 -13
- package/types/api/device/calendar.d.ts +11 -1
- package/types/api/device/clipboard.d.ts +2 -2
- package/types/api/device/compass.d.ts +5 -5
- package/types/api/device/gyroscope.d.ts +4 -4
- package/types/api/device/iBeacon.d.ts +10 -8
- package/types/api/device/keyboard.d.ts +7 -5
- package/types/api/device/memory.d.ts +3 -4
- package/types/api/device/motion.d.ts +8 -6
- package/types/api/device/network.d.ts +12 -6
- package/types/api/device/nfc.d.ts +13 -13
- package/types/api/device/phone.d.ts +1 -1
- package/types/api/device/scan.d.ts +5 -3
- package/types/api/device/screen.d.ts +27 -11
- package/types/api/device/sms.d.ts +1 -1
- package/types/api/device/vibrate.d.ts +5 -5
- package/types/api/device/wifi.d.ts +25 -13
- package/types/api/open-api/login.d.ts +1 -1
- package/types/api/storage/cache-manager.d.ts +1 -1
- package/types/taro.config.d.ts +29 -4
|
@@ -90,6 +90,10 @@ declare module '../../index' {
|
|
|
90
90
|
|
|
91
91
|
namespace getConnectedWifi {
|
|
92
92
|
interface Option {
|
|
93
|
+
/** 是否需要返回部分 Wi-Fi 信息
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
partialInfo?: boolean
|
|
93
97
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
94
98
|
complete?: (res: TaroGeneral.WifiError) => void
|
|
95
99
|
/** 接口调用失败的回调函数 */
|
|
@@ -113,6 +117,14 @@ declare module '../../index' {
|
|
|
113
117
|
password: string
|
|
114
118
|
/** Wi-Fi 设备 BSSID */
|
|
115
119
|
BSSID?: string
|
|
120
|
+
/** 跳转到系统设置页进行连接
|
|
121
|
+
* @default false
|
|
122
|
+
*/
|
|
123
|
+
maunal?: boolean
|
|
124
|
+
/** 是否需要返回部分 Wi-Fi 信息,仅安卓生效
|
|
125
|
+
* @default false
|
|
126
|
+
*/
|
|
127
|
+
partialInfo?: boolean
|
|
116
128
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
117
129
|
complete?: (res: TaroGeneral.WifiError) => void
|
|
118
130
|
/** 接口调用失败的回调函数 */
|
|
@@ -142,7 +154,7 @@ declare module '../../index' {
|
|
|
142
154
|
|
|
143
155
|
interface TaroStatic {
|
|
144
156
|
/** 关闭 Wi-Fi 模块。
|
|
145
|
-
* @supported weapp
|
|
157
|
+
* @supported weapp, alipay, swan, jd
|
|
146
158
|
* @example
|
|
147
159
|
* ```tsx
|
|
148
160
|
* Taro.stopWifi({
|
|
@@ -156,7 +168,7 @@ declare module '../../index' {
|
|
|
156
168
|
stopWifi(option?: stopWifi.Option): Promise<TaroGeneral.WifiError>
|
|
157
169
|
|
|
158
170
|
/** 初始化 Wi-Fi 模块。
|
|
159
|
-
* @supported weapp
|
|
171
|
+
* @supported weapp, alipay, swan, jd
|
|
160
172
|
* @example
|
|
161
173
|
* ```tsx
|
|
162
174
|
* Taro.startWifi({
|
|
@@ -175,7 +187,7 @@ declare module '../../index' {
|
|
|
175
187
|
* - 该接口只能在 `onGetWifiList` 回调之后才能调用。
|
|
176
188
|
* - 此时客户端会挂起,等待小程序设置 Wi-Fi 信息,请务必尽快调用该接口,若无数据请传入一个空数组。
|
|
177
189
|
* - 有可能随着周边 Wi-Fi 列表的刷新,单个流程内收到多次带有存在重复的 Wi-Fi 列表的回调。
|
|
178
|
-
* @supported weapp
|
|
190
|
+
* @supported weapp, swan, jd
|
|
179
191
|
* @example
|
|
180
192
|
* ```tsx
|
|
181
193
|
* Taro.onGetWifiList(function (res) {
|
|
@@ -209,7 +221,7 @@ declare module '../../index' {
|
|
|
209
221
|
): void
|
|
210
222
|
|
|
211
223
|
/** 监听连接上 Wi-Fi 的事件。
|
|
212
|
-
* @supported weapp
|
|
224
|
+
* @supported weapp, alipay, swan, jd
|
|
213
225
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/device/wifi/wx.onWifiConnected.html
|
|
214
226
|
*/
|
|
215
227
|
onWifiConnected(
|
|
@@ -218,7 +230,7 @@ declare module '../../index' {
|
|
|
218
230
|
): void
|
|
219
231
|
|
|
220
232
|
/** 监听获取到 Wi-Fi 列表数据事件
|
|
221
|
-
* @supported weapp, tt
|
|
233
|
+
* @supported weapp, alipay, swan, jd, tt
|
|
222
234
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/device/wifi/wx.onGetWifiList.html
|
|
223
235
|
*/
|
|
224
236
|
onGetWifiList(
|
|
@@ -232,39 +244,39 @@ declare module '../../index' {
|
|
|
232
244
|
*/
|
|
233
245
|
offWifiConnectedWithPartialInfo(
|
|
234
246
|
/** 连接上 Wi-Fi 的事件的回调函数 */
|
|
235
|
-
callback
|
|
247
|
+
callback?: onWifiConnectedWithPartialInfo.Callback,
|
|
236
248
|
): void
|
|
237
249
|
|
|
238
250
|
/**
|
|
239
251
|
* 取消监听连接上 Wi-Fi 的事件。
|
|
240
|
-
* @supported weapp
|
|
252
|
+
* @supported weapp, alipay, swan, jd
|
|
241
253
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/device/wifi/wx.offWifiConnected.html
|
|
242
254
|
*/
|
|
243
255
|
offWifiConnected(
|
|
244
256
|
/** 连接上 Wi-Fi 的事件的回调函数 */
|
|
245
|
-
callback
|
|
257
|
+
callback?: onWifiConnected.Callback,
|
|
246
258
|
): void
|
|
247
259
|
|
|
248
260
|
/**
|
|
249
261
|
* 取消监听获取到 Wi-Fi 列表数据事件。
|
|
250
|
-
* @supported weapp, tt
|
|
262
|
+
* @supported weapp, alipay, swan, jd, tt
|
|
251
263
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/device/wifi/wx.offGetWifiList.html
|
|
252
264
|
*/
|
|
253
265
|
offGetWifiList(
|
|
254
266
|
/** 获取到 Wi-Fi 列表数据事件的回调函数 */
|
|
255
|
-
callback
|
|
267
|
+
callback?: onGetWifiList.Callback,
|
|
256
268
|
): void
|
|
257
269
|
|
|
258
270
|
/** 请求获取 Wi-Fi 列表。在 `onGetWifiList` 注册的回调中返回 `wifiList` 数据。 **Android 调用前需要 [用户授权](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html) scope.userLocation。**
|
|
259
271
|
*
|
|
260
272
|
* iOS 将跳转到系统的 Wi-Fi 界面,Android 不会跳转。 iOS 11.0 及 iOS 11.1 两个版本因系统问题,该方法失效。但在 iOS 11.2 中已修复。
|
|
261
|
-
* @supported weapp, tt
|
|
273
|
+
* @supported weapp, alipay, swan, jd, tt
|
|
262
274
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/device/wifi/wx.getWifiList.html
|
|
263
275
|
*/
|
|
264
276
|
getWifiList(option?: getWifiList.Option): Promise<TaroGeneral.WifiError>
|
|
265
277
|
|
|
266
278
|
/** 获取已连接中的 Wi-Fi 信息。
|
|
267
|
-
* @supported weapp
|
|
279
|
+
* @supported weapp, alipay, swan, tt
|
|
268
280
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/device/wifi/wx.getConnectedWifi.html
|
|
269
281
|
*/
|
|
270
282
|
getConnectedWifi(option?: getConnectedWifi.Option): Promise<TaroGeneral.WifiError>
|
|
@@ -281,7 +293,7 @@ declare module '../../index' {
|
|
|
281
293
|
* }
|
|
282
294
|
* })
|
|
283
295
|
* ```
|
|
284
|
-
* @supported weapp
|
|
296
|
+
* @supported weapp, alipay, swan, jd
|
|
285
297
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/device/wifi/wx.connectWifi.html
|
|
286
298
|
*/
|
|
287
299
|
connectWifi(option: connectWifi.Option): Promise<TaroGeneral.WifiError>
|
|
@@ -81,7 +81,7 @@ declare module '../../index' {
|
|
|
81
81
|
*
|
|
82
82
|
* 通过 Taro.login 接口获得的用户登录态拥有一定的时效性。用户越久未使用小程序,用户登录态越有可能失效。反之如果用户一直在使用小程序,则用户登录态一直保持有效。具体时效逻辑由微信维护,对开发者透明。开发者只需要调用 Taro.checkSession 接口检测当前用户登录态是否有效。
|
|
83
83
|
*
|
|
84
|
-
* 登录态过期后开发者可以再调用 Taro.login
|
|
84
|
+
* 登录态过期后开发者可以再调用 Taro.login 获取新的用户登录态。调用 Taro.checkSession 成功说明当前 session_key 未过期,调用失败说明 session_key 已过期。更多使用方法详见 [小程序登录](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/login.html)。
|
|
85
85
|
* @supported weapp
|
|
86
86
|
* @example
|
|
87
87
|
* ```tsx
|
|
@@ -191,7 +191,7 @@ declare module '../../index' {
|
|
|
191
191
|
interface TaroStatic {
|
|
192
192
|
/** 创建缓存管理器
|
|
193
193
|
* @supported weapp
|
|
194
|
-
* @see
|
|
194
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/storage/cachemanager/wx.createCacheManager.html
|
|
195
195
|
*/
|
|
196
196
|
createCacheManager(option: createCacheManager.Option): CacheManager
|
|
197
197
|
}
|
package/types/taro.config.d.ts
CHANGED
|
@@ -363,16 +363,41 @@ declare module './index' {
|
|
|
363
363
|
|
|
364
364
|
interface RenderOptions {
|
|
365
365
|
skyline: {
|
|
366
|
-
/**
|
|
367
|
-
* 开启默认Block布局
|
|
366
|
+
/** 开启默认Block布局
|
|
368
367
|
* @see https://developers.weixin.qq.com/miniprogram/dev/framework/runtime/skyline/wxss.html#%E5%BC%80%E5%90%AF%E9%BB%98%E8%AE%A4Block%E5%B8%83%E5%B1%80
|
|
368
|
+
* @supported weapp
|
|
369
369
|
*/
|
|
370
370
|
defaultDisplayBlock?: boolean
|
|
371
|
-
/**
|
|
372
|
-
* 关闭 Skyline AB 实验
|
|
371
|
+
/** 关闭 Skyline AB 实验
|
|
373
372
|
* @see https://developers.weixin.qq.com/miniprogram/dev/framework/runtime/skyline/migration/release.html#%E5%8F%91%E5%B8%83%E4%B8%8A%E7%BA%BF
|
|
373
|
+
* @supported weapp
|
|
374
374
|
*/
|
|
375
375
|
disableABTest?: boolean
|
|
376
|
+
/** 基础库最低版本
|
|
377
|
+
* @supported weapp
|
|
378
|
+
*/
|
|
379
|
+
sdkVersionBegin?: string
|
|
380
|
+
/** 基础库最高版本
|
|
381
|
+
* @supported weapp
|
|
382
|
+
*/
|
|
383
|
+
sdkVersionEnd?: string
|
|
384
|
+
/** iOS 微信最低版本
|
|
385
|
+
* @supported weapp
|
|
386
|
+
*/
|
|
387
|
+
iosVersionBegin?: string
|
|
388
|
+
/** iOS 微信最高版本
|
|
389
|
+
* @supported weapp
|
|
390
|
+
*/
|
|
391
|
+
iosVersionEnd?: string
|
|
392
|
+
/** 安卓微信最低版本
|
|
393
|
+
* @supported weapp
|
|
394
|
+
*/
|
|
395
|
+
androidVersionBegin?: string
|
|
396
|
+
/** 安卓微信最高版本
|
|
397
|
+
* @supported weapp
|
|
398
|
+
*/
|
|
399
|
+
androidVersionEnd?: string
|
|
400
|
+
[key: string]: unknown
|
|
376
401
|
}
|
|
377
402
|
}
|
|
378
403
|
|