@tarojs/taro 3.6.6-alpha.3 → 3.6.7
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.7",
|
|
4
4
|
"description": "Taro framework",
|
|
5
5
|
"homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
|
|
6
6
|
"main": "index.js",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"author": "O2Team",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tarojs/api": "3.6.
|
|
25
|
-
"@tarojs/runtime": "3.6.
|
|
24
|
+
"@tarojs/api": "3.6.7",
|
|
25
|
+
"@tarojs/runtime": "3.6.7"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@tarojs/helper": "3.6.
|
|
28
|
+
"@tarojs/helper": "3.6.7"
|
|
29
29
|
},
|
|
30
30
|
"peerDependenciesMeta": {
|
|
31
31
|
"@types/react": {
|
|
@@ -3,7 +3,7 @@ import Taro from '../../index'
|
|
|
3
3
|
declare module '../../index' {
|
|
4
4
|
interface TaroStatic {
|
|
5
5
|
/** 判断小程序的 API,回调,参数,组件等是否在当前版本可用。
|
|
6
|
-
* @supported weapp, tt
|
|
6
|
+
* @supported weapp, tt
|
|
7
7
|
* @example
|
|
8
8
|
* ```tsx
|
|
9
9
|
* Taro.canIUse('openBluetoothAdapter')
|
|
@@ -36,7 +36,7 @@ declare module '../../index' {
|
|
|
36
36
|
): boolean
|
|
37
37
|
|
|
38
38
|
/** 判断能否使用 WebP 格式
|
|
39
|
-
*
|
|
39
|
+
*
|
|
40
40
|
* > 在小程序平台中仅在 android 和 devtools 设备时可用
|
|
41
41
|
* @supported global
|
|
42
42
|
*/
|
|
@@ -227,6 +227,14 @@ declare module '../../index' {
|
|
|
227
227
|
toggleTorch(option?: LivePusherContext.ToggleTorchOption): void
|
|
228
228
|
}
|
|
229
229
|
namespace LivePlayerContext {
|
|
230
|
+
interface ExitCastingOption {
|
|
231
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
232
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
233
|
+
/** 接口调用失败的回调函数 */
|
|
234
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
235
|
+
/** 接口调用成功的回调函数 */
|
|
236
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
237
|
+
}
|
|
230
238
|
interface ExitFullScreenOption {
|
|
231
239
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
232
240
|
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
@@ -267,6 +275,14 @@ declare module '../../index' {
|
|
|
267
275
|
/** 接口调用成功的回调函数 */
|
|
268
276
|
success?: (res: TaroGeneral.CallbackResult) => void
|
|
269
277
|
}
|
|
278
|
+
interface ReconnectCastingOption {
|
|
279
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
280
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
281
|
+
/** 接口调用失败的回调函数 */
|
|
282
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
283
|
+
/** 接口调用成功的回调函数 */
|
|
284
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
285
|
+
}
|
|
270
286
|
interface RequestFullScreenOption {
|
|
271
287
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
272
288
|
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
@@ -316,6 +332,14 @@ declare module '../../index' {
|
|
|
316
332
|
/** 调用结果 */
|
|
317
333
|
errMsg: string
|
|
318
334
|
}
|
|
335
|
+
interface StartCastingOption {
|
|
336
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
337
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
338
|
+
/** 接口调用失败的回调函数 */
|
|
339
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
340
|
+
/** 接口调用成功的回调函数 */
|
|
341
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
342
|
+
}
|
|
319
343
|
interface StopOption {
|
|
320
344
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
321
345
|
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
@@ -324,6 +348,14 @@ declare module '../../index' {
|
|
|
324
348
|
/** 接口调用成功的回调函数 */
|
|
325
349
|
success?: (res: TaroGeneral.CallbackResult) => void
|
|
326
350
|
}
|
|
351
|
+
interface SwitchCastingOption {
|
|
352
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
353
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
354
|
+
/** 接口调用失败的回调函数 */
|
|
355
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
356
|
+
/** 接口调用成功的回调函数 */
|
|
357
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
358
|
+
}
|
|
327
359
|
}
|
|
328
360
|
|
|
329
361
|
/** `LivePlayerContext` 实例,可通过 `Taro.createLivePlayerContext` 获取。
|
|
@@ -332,6 +364,11 @@ declare module '../../index' {
|
|
|
332
364
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.html
|
|
333
365
|
*/
|
|
334
366
|
interface LivePlayerContext {
|
|
367
|
+
/** 退出投屏。仅支持在 tap 事件回调内调用。
|
|
368
|
+
* @supported weapp
|
|
369
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.exitCasting.html
|
|
370
|
+
*/
|
|
371
|
+
exitCasting(option?: LivePlayerContext.ExitCastingOption): void
|
|
335
372
|
/** 退出全屏
|
|
336
373
|
* @supported weapp
|
|
337
374
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.exitFullScreen.html
|
|
@@ -357,6 +394,11 @@ declare module '../../index' {
|
|
|
357
394
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.play.html
|
|
358
395
|
*/
|
|
359
396
|
play(option?: LivePlayerContext.PlayOption): void
|
|
397
|
+
/** 重连投屏设备。仅支持在 tap 事件回调内调用。
|
|
398
|
+
* @supported weapp
|
|
399
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.reconnectCasting.html
|
|
400
|
+
*/
|
|
401
|
+
reconnectCasting(option?: LivePlayerContext.ReconnectCastingOption): void
|
|
360
402
|
/** 进入全屏
|
|
361
403
|
* @supported weapp
|
|
362
404
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.requestFullScreen.html
|
|
@@ -381,11 +423,21 @@ declare module '../../index' {
|
|
|
381
423
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.snapshot.html
|
|
382
424
|
*/
|
|
383
425
|
snapshot(option?: LivePlayerContext.SnapshotOption): void
|
|
426
|
+
/** 开始投屏, 拉起半屏搜索设备。仅支持在 tap 事件回调内调用
|
|
427
|
+
* @supported weapp
|
|
428
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.startCasting.html
|
|
429
|
+
*/
|
|
430
|
+
startCasting(option?: LivePlayerContext.StartCastingOption): void
|
|
384
431
|
/** 停止
|
|
385
432
|
* @supported weapp
|
|
386
433
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.stop.html
|
|
387
434
|
*/
|
|
388
435
|
stop(option?: LivePlayerContext.StopOption): void
|
|
436
|
+
/** 切换投屏设备。仅支持在 tap 事件回调内调用。
|
|
437
|
+
* @supported weapp
|
|
438
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/media/live/LivePlayerContext.switchCasting.html
|
|
439
|
+
*/
|
|
440
|
+
switchCasting(option?: LivePlayerContext.SwitchCastingOption): void
|
|
389
441
|
}
|
|
390
442
|
|
|
391
443
|
interface TaroStatic {
|
|
@@ -60,61 +60,58 @@ declare module '../../index' {
|
|
|
60
60
|
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
61
61
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
62
62
|
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
63
|
-
/**
|
|
63
|
+
/** 设置 H5 端是否使用jsonp方式获取数据
|
|
64
64
|
* @default false
|
|
65
65
|
* @supported h5
|
|
66
66
|
*/
|
|
67
|
-
jsonp?: boolean
|
|
68
|
-
/** 设置 jsonp 请求 url 是否需要被缓存
|
|
67
|
+
jsonp?: boolean
|
|
68
|
+
/** 设置 H5 端 jsonp 请求 url 是否需要被缓存
|
|
69
|
+
* @default false
|
|
69
70
|
* @supported h5
|
|
70
71
|
*/
|
|
71
|
-
jsonpCache?:
|
|
72
|
-
/**
|
|
72
|
+
jsonpCache?: boolean
|
|
73
|
+
/** 设置 H5 端是否允许跨域请求
|
|
73
74
|
* @default "same-origin"
|
|
74
75
|
* @supported h5
|
|
75
76
|
*/
|
|
76
77
|
mode?: keyof CorsMode
|
|
77
|
-
/**
|
|
78
|
+
/** 设置 H5 端是否携带 Cookie
|
|
78
79
|
* @default "omit"
|
|
79
80
|
* @supported h5
|
|
80
81
|
*/
|
|
81
82
|
credentials?: keyof Credentials
|
|
82
|
-
/**
|
|
83
|
+
/** 设置 H5 端缓存模式
|
|
83
84
|
* @default "default"
|
|
84
85
|
* @supported h5
|
|
85
86
|
*/
|
|
86
87
|
cache?: keyof Cache
|
|
87
|
-
/**
|
|
88
|
+
/** 设置 H5 端请求重试次数
|
|
88
89
|
* @default 2
|
|
89
90
|
* @supported h5
|
|
90
91
|
*/
|
|
91
92
|
retryTimes?: number
|
|
92
|
-
/**
|
|
93
|
+
/** 设置 H5 端请求的兜底接口
|
|
93
94
|
* @supported h5
|
|
94
95
|
*/
|
|
95
96
|
backup?: string | string[]
|
|
96
|
-
/**
|
|
97
|
-
* @supported h5
|
|
98
|
-
*/
|
|
99
|
-
signal?: AbortSignal
|
|
100
|
-
/** 设置请求响应的数据校验函数,若返回 false,则请求兜底接口,若无兜底接口,则报请求失败
|
|
97
|
+
/** 设置 H5 端请求响应的数据校验函数,若返回 false,则请求兜底接口,若无兜底接口,则报请求失败
|
|
101
98
|
* @supported h5
|
|
102
99
|
*/
|
|
103
100
|
dataCheck?(): boolean
|
|
104
|
-
/**
|
|
101
|
+
/** 设置 H5 端请求是否使用缓存
|
|
105
102
|
* @default false
|
|
106
103
|
* @supported h5
|
|
107
104
|
*/
|
|
108
105
|
useStore?: boolean
|
|
109
|
-
/**
|
|
106
|
+
/** 设置 H5 端请求缓存校验的 key
|
|
110
107
|
* @supported h5
|
|
111
108
|
*/
|
|
112
109
|
storeCheckKey?: string
|
|
113
|
-
/**
|
|
110
|
+
/** 设置 H5 端请求缓存签名
|
|
114
111
|
* @supported h5
|
|
115
112
|
*/
|
|
116
113
|
storeSign?: string
|
|
117
|
-
/**
|
|
114
|
+
/** 设置 H5 端请求校验函数,一般不需要设置
|
|
118
115
|
* @supported h5
|
|
119
116
|
*/
|
|
120
117
|
storeCheck?(): boolean
|