@tarojs/taro 3.4.4 → 3.4.5
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 +5 -5
- package/types/api/ad/index.d.ts +2 -2
- package/types/api/canvas/index.d.ts +9 -9
- package/types/api/device/network.d.ts +1 -1
- package/types/api/location/index.d.ts +10 -4
- package/types/api/network/request.d.ts +1 -1
- package/types/api/open-api/authorize.d.ts +1 -1
- package/types/api/ui/animation.d.ts +1 -1
- package/types/api/worker/index.d.ts +1 -1
- package/types/api/wxml/index.d.ts +1 -1
- package/types/taro.extend.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.5",
|
|
4
4
|
"description": "Taro framework",
|
|
5
5
|
"homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
|
|
6
6
|
"main": "index.js",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"author": "O2Team",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@tarojs/api": "3.4.
|
|
28
|
-
"@tarojs/runtime": "3.4.
|
|
29
|
-
"@tarojs/taro-h5": "3.4.
|
|
27
|
+
"@tarojs/api": "3.4.5",
|
|
28
|
+
"@tarojs/runtime": "3.4.5",
|
|
29
|
+
"@tarojs/taro-h5": "3.4.5"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "789e873f7b9477124b44a900cd4f6a2810e4e06a"
|
|
32
32
|
}
|
package/types/api/ad/index.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ declare module '../../index' {
|
|
|
97
97
|
type OnLoadCallback = (res: TaroGeneral.CallbackResult) => void
|
|
98
98
|
interface OnErrorCallbackResult extends TaroGeneral.CallbackResult {
|
|
99
99
|
/** 错误码
|
|
100
|
-
* @see
|
|
100
|
+
* @see /docs/apis/General#aderrcode
|
|
101
101
|
*/
|
|
102
102
|
errCode: keyof TaroGeneral.AdErrCode
|
|
103
103
|
/** 错误信息 */
|
|
@@ -160,7 +160,7 @@ declare module '../../index' {
|
|
|
160
160
|
namespace RewardedVideoAd {
|
|
161
161
|
interface OnErrorCallbackResult extends TaroGeneral.CallbackResult {
|
|
162
162
|
/** 错误码
|
|
163
|
-
* @see
|
|
163
|
+
* @see /docs/apis/General#aderrcode
|
|
164
164
|
*/
|
|
165
165
|
errCode: keyof TaroGeneral.AdErrCode
|
|
166
166
|
/** 错误信息 */
|
|
@@ -3,9 +3,9 @@ import Taro from '../../index'
|
|
|
3
3
|
declare module '../../index' {
|
|
4
4
|
namespace canvasToTempFilePath {
|
|
5
5
|
interface Option {
|
|
6
|
-
/** 画布标识,传入 [canvas](/docs/components/canvas
|
|
6
|
+
/** 画布标识,传入 [canvas](/docs/components/canvas) 组件实例 (canvas type="2d" 时使用该属性)。 */
|
|
7
7
|
canvas?: CanvasProps
|
|
8
|
-
/** 画布标识,传入 [canvas](/docs/components/canvas
|
|
8
|
+
/** 画布标识,传入 [canvas](/docs/components/canvas) 组件的 canvas-id */
|
|
9
9
|
canvasId?: string
|
|
10
10
|
/** 图片的质量,目前仅对 jpg 有效。取值范围为 (0, 1],不在范围内时当作 1.0 处理。 */
|
|
11
11
|
quality?: number
|
|
@@ -75,7 +75,7 @@ declare module '../../index' {
|
|
|
75
75
|
}
|
|
76
76
|
namespace canvasPutImageData {
|
|
77
77
|
interface Option {
|
|
78
|
-
/** 画布标识,传入 [canvas](/docs/components/canvas
|
|
78
|
+
/** 画布标识,传入 [canvas](/docs/components/canvas) 组件的 canvas-id 属性。 */
|
|
79
79
|
canvasId: string
|
|
80
80
|
/** 图像像素点数据,一维数组,每四项表示一个像素点的 rgba */
|
|
81
81
|
data: Uint8ClampedArray
|
|
@@ -97,7 +97,7 @@ declare module '../../index' {
|
|
|
97
97
|
}
|
|
98
98
|
namespace canvasGetImageData {
|
|
99
99
|
interface Option {
|
|
100
|
-
/** 画布标识,传入 [canvas](/docs/components/canvas
|
|
100
|
+
/** 画布标识,传入 [canvas](/docs/components/canvas) 组件的 `canvas-id` 属性。 */
|
|
101
101
|
canvasId: string
|
|
102
102
|
/** 将要被提取的图像数据矩形区域的高度 */
|
|
103
103
|
height: number
|
|
@@ -1736,9 +1736,9 @@ declare module '../../index' {
|
|
|
1736
1736
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/canvas/wx.createCanvasContext.html
|
|
1737
1737
|
*/
|
|
1738
1738
|
createCanvasContext(
|
|
1739
|
-
/** 要获取上下文的 [canvas](/docs/components/canvas
|
|
1739
|
+
/** 要获取上下文的 [canvas](/docs/components/canvas) 组件 canvas-id 属性 */
|
|
1740
1740
|
canvasId: string,
|
|
1741
|
-
/** 在自定义组件下,当前组件实例的this,表示在这个自定义组件下查找拥有 canvas-id 的 [canvas](/docs/components/canvas
|
|
1741
|
+
/** 在自定义组件下,当前组件实例的this,表示在这个自定义组件下查找拥有 canvas-id 的 [canvas](/docs/components/canvas) ,如果省略则不在任何自定义组件内查找 */
|
|
1742
1742
|
component?: TaroGeneral.IAnyObject,
|
|
1743
1743
|
): CanvasContext
|
|
1744
1744
|
|
|
@@ -1767,7 +1767,7 @@ declare module '../../index' {
|
|
|
1767
1767
|
*/
|
|
1768
1768
|
canvasToTempFilePath(
|
|
1769
1769
|
option: canvasToTempFilePath.Option,
|
|
1770
|
-
/** 在自定义组件下,当前组件实例的this,以操作组件内 [canvas](/docs/components/canvas
|
|
1770
|
+
/** 在自定义组件下,当前组件实例的this,以操作组件内 [canvas](/docs/components/canvas) 组件 */
|
|
1771
1771
|
component?: TaroGeneral.IAnyObject,
|
|
1772
1772
|
): Promise<canvasToTempFilePath.SuccessCallbackResult>
|
|
1773
1773
|
|
|
@@ -1789,7 +1789,7 @@ declare module '../../index' {
|
|
|
1789
1789
|
*/
|
|
1790
1790
|
canvasPutImageData(
|
|
1791
1791
|
option: canvasPutImageData.Option,
|
|
1792
|
-
/** 在自定义组件下,当前组件实例的this,以操作组件内 [canvas](/docs/components/canvas
|
|
1792
|
+
/** 在自定义组件下,当前组件实例的this,以操作组件内 [canvas](/docs/components/canvas) 组件 */
|
|
1793
1793
|
component?: TaroGeneral.IAnyObject,
|
|
1794
1794
|
): Promise<TaroGeneral.CallbackResult>
|
|
1795
1795
|
|
|
@@ -1815,7 +1815,7 @@ declare module '../../index' {
|
|
|
1815
1815
|
*/
|
|
1816
1816
|
canvasGetImageData(
|
|
1817
1817
|
option: canvasGetImageData.Option,
|
|
1818
|
-
/** 在自定义组件下,当前组件实例的this,以操作组件内 [canvas](/docs/components/canvas
|
|
1818
|
+
/** 在自定义组件下,当前组件实例的this,以操作组件内 [canvas](/docs/components/canvas) 组件 */
|
|
1819
1819
|
component?: TaroGeneral.IAnyObject,
|
|
1820
1820
|
): Promise<canvasGetImageData.SuccessCallbackResult>
|
|
1821
1821
|
}
|
|
@@ -139,7 +139,7 @@ declare module '../../index' {
|
|
|
139
139
|
* @example
|
|
140
140
|
* ```tsx
|
|
141
141
|
* Taro.getNetworkType({
|
|
142
|
-
* success: function (res)
|
|
142
|
+
* success: function (res) {
|
|
143
143
|
* // 返回网络类型, 有效值:
|
|
144
144
|
* // wifi/2g/3g/4g/unknown(Android下不常见的网络类型)/none(无网络)
|
|
145
145
|
* var networkType = res.networkType
|
|
@@ -87,16 +87,22 @@ declare module '../../index' {
|
|
|
87
87
|
|
|
88
88
|
namespace chooseLocation {
|
|
89
89
|
interface Option {
|
|
90
|
-
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
91
|
-
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
92
|
-
/** 接口调用失败的回调函数 */
|
|
93
|
-
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
94
90
|
/** 目标地纬度 */
|
|
95
91
|
latitude?: number
|
|
96
92
|
/** 目标地经度 */
|
|
97
93
|
longitude?: number
|
|
94
|
+
/** 地图选点组件参数
|
|
95
|
+
* @supported h5
|
|
96
|
+
* @h5 仅支持 H5 使用
|
|
97
|
+
* @see https://lbs.qq.com/webApi/component/componentGuide/componentPicker
|
|
98
|
+
*/
|
|
99
|
+
mapOpts?: Record<string, unknown>
|
|
98
100
|
/** 接口调用成功的回调函数 */
|
|
99
101
|
success?: (result: SuccessCallbackResult) => void
|
|
102
|
+
/** 接口调用失败的回调函数 */
|
|
103
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
104
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
105
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
100
106
|
}
|
|
101
107
|
|
|
102
108
|
interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
|
|
@@ -367,7 +367,7 @@ declare module '../../index' {
|
|
|
367
367
|
* ```
|
|
368
368
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/network/request/wx.request.html
|
|
369
369
|
*/
|
|
370
|
-
request<T = any, U = any>(option: request.Option<T,U>): RequestTask<T>
|
|
370
|
+
request<T = any, U = any>(option: request.Option<T, U>): RequestTask<T>
|
|
371
371
|
|
|
372
372
|
/** 可以使用拦截器在请求发出前或发出后做一些额外操作。
|
|
373
373
|
*
|
|
@@ -473,7 +473,7 @@ declare module '../../index' {
|
|
|
473
473
|
}
|
|
474
474
|
|
|
475
475
|
interface TaroStatic {
|
|
476
|
-
/** 创建一个动画实例 [animation](
|
|
476
|
+
/** 创建一个动画实例 [animation](../Animation)。调用实例的方法来描述动画。最后通过动画实例的 export 方法导出动画数据传递给组件的 animation 属性。
|
|
477
477
|
* @supported weapp, h5
|
|
478
478
|
* @example
|
|
479
479
|
* ```tsx
|
|
@@ -60,7 +60,7 @@ declare module '../../index' {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
interface TaroStatic {
|
|
63
|
-
/** 创建一个 Worker 线程。目前限制最多只能创建一个 Worker,创建下一个 Worker 前请先调用 [Worker.terminate](/docs/apis/worker
|
|
63
|
+
/** 创建一个 Worker 线程。目前限制最多只能创建一个 Worker,创建下一个 Worker 前请先调用 [Worker.terminate](/docs/apis/worker/#terminate)
|
|
64
64
|
* @supported weapp
|
|
65
65
|
* @example
|
|
66
66
|
* ```tsx
|
|
@@ -268,7 +268,7 @@ declare module '../../index' {
|
|
|
268
268
|
/** 回调函数 */
|
|
269
269
|
callback?: NodesRef.FieldsCallback,
|
|
270
270
|
): SelectorQuery
|
|
271
|
-
/** 获取 Node 节点实例。目前支持 [Canvas](/docs/components/canvas
|
|
271
|
+
/** 获取 Node 节点实例。目前支持 [Canvas](/docs/components/canvas) 的获取。
|
|
272
272
|
* @supported weapp, h5
|
|
273
273
|
* @example
|
|
274
274
|
* ```tsx
|