@tarojs/taro 3.3.16 → 3.3.17

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.3.16",
3
+ "version": "3.3.17",
4
4
  "description": "Taro framework",
5
5
  "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
6
6
  "main": "index.js",
@@ -26,9 +26,9 @@
26
26
  "author": "O2Team",
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
- "@tarojs/api": "3.3.16",
30
- "@tarojs/runtime": "3.3.16",
31
- "@tarojs/taro-h5": "3.3.16"
29
+ "@tarojs/api": "3.3.17",
30
+ "@tarojs/runtime": "3.3.17",
31
+ "@tarojs/taro-h5": "3.3.17"
32
32
  },
33
- "gitHead": "75d3de695c98fab79998612ef87567a68ea981a7"
33
+ "gitHead": "3f3ce5f66d370b1982a30e4a5f2c8eb383652063"
34
34
  }
@@ -1374,7 +1374,7 @@ declare module '../../index' {
1374
1374
  /** 阴影的模糊级别 */
1375
1375
  shadowBlur: number
1376
1376
  /** 阴影的颜色 */
1377
- shadowColor: number
1377
+ shadowColor: string
1378
1378
  /** 阴影相对于形状在水平方向的偏移 */
1379
1379
  shadowOffsetX: number
1380
1380
  /** 阴影相对于形状在竖直方向的偏移 */
@@ -94,7 +94,7 @@ declare module '../../index' {
94
94
  ): void
95
95
 
96
96
  /** 取消监听罗盘数据变化事件,参数为空,则取消所有的事件监听。
97
- * @supported weapp
97
+ * @supported weapp, h5
98
98
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/compass/wx.offCompassChange.html
99
99
  */
100
100
  offCompassChange(
@@ -122,6 +122,8 @@ declare module '../../index' {
122
122
  sourceType?: Array<keyof sourceType>
123
123
  /** 接口调用成功的回调函数 */
124
124
  success?: (result: SuccessCallbackResult) => void
125
+ /** 用来上传的input元素ID(仅h5端)@supported h5 */
126
+ imageId?: string
125
127
  }
126
128
  /** 图片的尺寸 */
127
129
  interface sizeType {
@@ -191,6 +191,6 @@ declare module '../../index' {
191
191
  * ```
192
192
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.chooseVideo.html
193
193
  */
194
- chooseVideo(option: chooseVideo.Option): Promise<void>
194
+ chooseVideo(option: chooseVideo.Option): Promise<chooseVideo.SuccessCallbackResult>
195
195
  }
196
196
  }
@@ -58,6 +58,12 @@ declare module '../../index' {
58
58
  /** 已经下载的数据长度,单位 Bytes */
59
59
  totalBytesWritten: number
60
60
  }
61
+
62
+ type DownloadTaskPromise = Promise<DownloadTask> & {
63
+ headersReceive: DownloadTask['onHeadersReceived'],
64
+ progress: DownloadTask['onProgressUpdate'],
65
+ abort: DownloadTask['abort']
66
+ }
61
67
  }
62
68
 
63
69
  interface DownloadTask {
@@ -121,6 +127,6 @@ declare module '../../index' {
121
127
  * ```
122
128
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/download/wx.downloadFile.html
123
129
  */
124
- downloadFile(option: downloadFile.Option): DownloadTask
130
+ downloadFile(option: downloadFile.Option): DownloadTask.DownloadTaskPromise
125
131
  }
126
132
  }
@@ -67,6 +67,12 @@ declare module '../../index' {
67
67
  /** 已经上传的数据长度,单位 Bytes */
68
68
  totalBytesSent: number
69
69
  }
70
+
71
+ type UploadTaskPromise = Promise<UploadTask> & {
72
+ headersReceive: UploadTask['onHeadersReceived'],
73
+ progress: UploadTask['onProgressUpdate'],
74
+ abort: UploadTask['abort']
75
+ }
70
76
  }
71
77
 
72
78
  /** 一个可以监听上传进度变化事件,以及取消上传任务的对象
@@ -166,6 +172,6 @@ declare module '../../index' {
166
172
  * ```
167
173
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/wx.uploadFile.html
168
174
  */
169
- uploadFile(option: uploadFile.Option): Promise<uploadFile.SuccessCallbackResult & UploadTask> & UploadTask
175
+ uploadFile(option: uploadFile.Option): UploadTask.UploadTaskPromise
170
176
  }
171
177
  }
@@ -79,6 +79,8 @@ declare module '../../index' {
79
79
 
80
80
  namespace showActionSheet {
81
81
  interface Option {
82
+ /** 警示文案 */
83
+ alertText?: string
82
84
  /** 按钮的文字数组,数组长度最大为 6 */
83
85
  itemList: string[]
84
86
  /** 接口调用结束的回调函数(调用成功、失败都会执行) */
@@ -236,6 +236,10 @@ declare module './index' {
236
236
  }
237
237
 
238
238
  interface AppConfig {
239
+ /**
240
+ * 小程序默认启动首页,未指定 entryPagePath 时,数组的第一项代表小程序的初始页面(首页)。
241
+ */
242
+ entryPagePath?: string
239
243
  /**
240
244
  * 接受一个数组,每一项都是字符串,来指定小程序由哪些页面组成,数组的第一项代表小程序的初始页面
241
245
  */
@@ -54,6 +54,10 @@ declare module './index' {
54
54
  }
55
55
 
56
56
  interface TaroStatic {
57
+ Events: {
58
+ new (): TaroGeneral.Events
59
+ }
60
+
57
61
  // eventCenter
58
62
  eventCenter: TaroGeneral.Events
59
63