@tarojs/taro 3.5.0-alpha.8 → 3.5.0-beta.1

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.
Files changed (57) hide show
  1. package/index.js +3 -4
  2. package/package.json +4 -5
  3. package/types/api/base/debug.d.ts +1 -1
  4. package/types/api/base/index.d.ts +3 -3
  5. package/types/api/base/performance.d.ts +5 -5
  6. package/types/api/base/system.d.ts +2 -2
  7. package/types/api/base/update.d.ts +6 -6
  8. package/types/api/base/weapp/app-event.d.ts +10 -10
  9. package/types/api/base/weapp/life-cycle.d.ts +1 -1
  10. package/types/api/data-analysis/index.d.ts +1 -1
  11. package/types/api/device/accelerometer.d.ts +3 -3
  12. package/types/api/device/calendar.d.ts +1 -1
  13. package/types/api/device/clipboard.d.ts +2 -2
  14. package/types/api/device/compass.d.ts +3 -3
  15. package/types/api/device/gyroscope.d.ts +4 -4
  16. package/types/api/device/keyboard.d.ts +1 -1
  17. package/types/api/device/memory.d.ts +1 -1
  18. package/types/api/device/network.d.ts +2 -2
  19. package/types/api/device/phone.d.ts +1 -1
  20. package/types/api/device/scan.d.ts +1 -1
  21. package/types/api/device/screen.d.ts +5 -5
  22. package/types/api/device/vibrate.d.ts +2 -2
  23. package/types/api/device/wifi.d.ts +3 -3
  24. package/types/api/ext/index.d.ts +2 -2
  25. package/types/api/files/index.d.ts +32 -32
  26. package/types/api/framework/index.d.ts +1 -1
  27. package/types/api/location/index.d.ts +9 -9
  28. package/types/api/media/audio.d.ts +1 -1
  29. package/types/api/media/background-audio.d.ts +1 -1
  30. package/types/api/media/camera.d.ts +8 -8
  31. package/types/api/media/image.d.ts +5 -5
  32. package/types/api/media/map.d.ts +15 -15
  33. package/types/api/media/recorder.d.ts +9 -9
  34. package/types/api/media/video.d.ts +2 -2
  35. package/types/api/navigate/index.d.ts +2 -2
  36. package/types/api/network/download.d.ts +5 -5
  37. package/types/api/network/request.d.ts +3 -3
  38. package/types/api/network/upload.d.ts +5 -5
  39. package/types/api/network/websocket.d.ts +6 -6
  40. package/types/api/open-api/address.d.ts +1 -1
  41. package/types/api/open-api/authorize.d.ts +1 -1
  42. package/types/api/open-api/settings.d.ts +2 -2
  43. package/types/api/open-api/subscribe-message.d.ts +2 -2
  44. package/types/api/open-api/user-info.d.ts +2 -2
  45. package/types/api/route/index.d.ts +5 -5
  46. package/types/api/share/index.d.ts +2 -2
  47. package/types/api/storage/index.d.ts +10 -10
  48. package/types/api/ui/animation.d.ts +36 -100
  49. package/types/api/ui/interaction.d.ts +6 -6
  50. package/types/api/ui/menu.d.ts +1 -1
  51. package/types/api/ui/navigation-bar.d.ts +5 -5
  52. package/types/api/ui/pull-down-refresh.d.ts +2 -2
  53. package/types/api/ui/scroll.d.ts +4 -2
  54. package/types/api/ui/tab-bar.d.ts +8 -8
  55. package/types/api/wxml/index.d.ts +16 -16
  56. package/types/compile.d.ts +0 -4
  57. package/types/taro.component.d.ts +7 -0
@@ -38,34 +38,34 @@ declare module '../../index' {
38
38
  }
39
39
 
40
40
  /** 动画对象
41
- * @supported weapp, h5
41
+ * @supported weapp, h5, tt
42
42
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.html
43
43
  */
44
44
  interface Animation {
45
45
  /** 导出动画队列。**export 方法每次调用后会清掉之前的动画操作**。
46
- * @supported weapp, h5
46
+ * @supported weapp, h5, tt
47
47
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.export.html
48
48
  */
49
49
  export(): {
50
50
  actions: TaroGeneral.IAnyObject[]
51
51
  }
52
52
  /** 表示一组动画完成。可以在一组动画中调用任意多个动画方法,一组动画中的所有动画会同时开始,一组动画完成后才会进行下一组动画。
53
- * @supported weapp, h5
53
+ * @supported weapp, h5, tt
54
54
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.step.html
55
55
  */
56
56
  step(option?: Animation.StepOption): Animation
57
57
  /** 同 [transform-function matrix](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix)
58
- * @supported weapp, h5
58
+ * @supported weapp, h5, tt
59
59
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.matrix.html
60
60
  */
61
61
  matrix(a: number, b: number, c: number, d: number, tx: number, ty: number): Animation
62
62
  /** 同 [transform-function matrix3d](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d)
63
- * @supported weapp, h5
63
+ * @supported weapp, h5, tt
64
64
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.matrix3d.html
65
65
  */
66
66
  matrix3d(a1: number, b1: number, c1: number, d1: number, a2: number, b2: number, c2: number, d2: number, a3: number, b3: number, c3: number, d3: number, a4: number, b4: number, c4: number, d4: number): Animation
67
67
  /** 从原点顺时针旋转一个角度
68
- * @supported weapp, h5
68
+ * @supported weapp, h5, tt
69
69
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotate.html
70
70
  */
71
71
  rotate(
@@ -73,7 +73,7 @@ declare module '../../index' {
73
73
  angle: number,
74
74
  ): Animation
75
75
  /** 从 固定 轴顺时针旋转一个角度
76
- * @supported weapp, h5
76
+ * @supported weapp, h5, tt
77
77
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotate3d.html
78
78
  */
79
79
  rotate3d(
@@ -87,7 +87,7 @@ declare module '../../index' {
87
87
  angle?: number,
88
88
  ): Animation
89
89
  /** 从 X 轴顺时针旋转一个角度
90
- * @supported weapp, h5
90
+ * @supported weapp, h5, tt
91
91
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateX.html
92
92
  */
93
93
  rotateX(
@@ -95,7 +95,7 @@ declare module '../../index' {
95
95
  angle: number,
96
96
  ): Animation
97
97
  /** 从 Y 轴顺时针旋转一个角度
98
- * @supported weapp, h5
98
+ * @supported weapp, h5, tt
99
99
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateY.html
100
100
  */
101
101
  rotateY(
@@ -103,7 +103,7 @@ declare module '../../index' {
103
103
  angle: number,
104
104
  ): Animation
105
105
  /** 从 Z 轴顺时针旋转一个角度
106
- * @supported weapp, h5
106
+ * @supported weapp, h5, tt
107
107
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateZ.html
108
108
  */
109
109
  rotateZ(
@@ -111,7 +111,7 @@ declare module '../../index' {
111
111
  angle: number,
112
112
  ): Animation
113
113
  /** 缩放
114
- * @supported weapp, h5
114
+ * @supported weapp, h5, tt
115
115
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scale.html
116
116
  */
117
117
  scale(
@@ -121,7 +121,7 @@ declare module '../../index' {
121
121
  sy?: number,
122
122
  ): Animation
123
123
  /** 缩放
124
- * @supported weapp, h5
124
+ * @supported weapp, h5, tt
125
125
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scale3d.html
126
126
  */
127
127
  scale3d(
@@ -133,7 +133,7 @@ declare module '../../index' {
133
133
  sz: number,
134
134
  ): Animation
135
135
  /** 缩放 X 轴
136
- * @supported weapp, h5
136
+ * @supported weapp, h5, tt
137
137
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleX.html
138
138
  */
139
139
  scaleX(
@@ -141,7 +141,7 @@ declare module '../../index' {
141
141
  scale: number,
142
142
  ): Animation
143
143
  /** 缩放 Y 轴
144
- * @supported weapp, h5
144
+ * @supported weapp, h5, tt
145
145
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleY.html
146
146
  */
147
147
  scaleY(
@@ -149,7 +149,7 @@ declare module '../../index' {
149
149
  scale: number,
150
150
  ): Animation
151
151
  /** 缩放 Z 轴
152
- * @supported weapp, h5
152
+ * @supported weapp, h5, tt
153
153
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleZ.html
154
154
  */
155
155
  scaleZ(
@@ -157,7 +157,7 @@ declare module '../../index' {
157
157
  scale: number,
158
158
  ): Animation
159
159
  /** 对 X、Y 轴坐标进行倾斜
160
- * @supported weapp, h5
160
+ * @supported weapp, h5, tt
161
161
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skew.html
162
162
  */
163
163
  skew(
@@ -167,7 +167,7 @@ declare module '../../index' {
167
167
  ay: number,
168
168
  ): Animation
169
169
  /** 对 X 轴坐标进行倾斜
170
- * @supported weapp, h5
170
+ * @supported weapp, h5, tt
171
171
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skewX.html
172
172
  */
173
173
  skewX(
@@ -175,7 +175,7 @@ declare module '../../index' {
175
175
  angle: number,
176
176
  ): Animation
177
177
  /** 对 Y 轴坐标进行倾斜
178
- * @supported weapp, h5
178
+ * @supported weapp, h5, tt
179
179
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skewY.html
180
180
  */
181
181
  skewY(
@@ -183,7 +183,7 @@ declare module '../../index' {
183
183
  angle: number,
184
184
  ): Animation
185
185
  /** 平移变换
186
- * @supported weapp, h5
186
+ * @supported weapp, h5, tt
187
187
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translate.html
188
188
  */
189
189
  translate(
@@ -193,7 +193,7 @@ declare module '../../index' {
193
193
  ty?: number,
194
194
  ): Animation
195
195
  /** 对 xyz 坐标进行平移变换
196
- * @supported weapp, h5
196
+ * @supported weapp, h5, tt
197
197
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translate3d.html
198
198
  */
199
199
  translate3d(
@@ -205,7 +205,7 @@ declare module '../../index' {
205
205
  tz?: number,
206
206
  ): Animation
207
207
  /** 对 X 轴平移
208
- * @supported weapp, h5
208
+ * @supported weapp, h5, tt
209
209
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateX.html
210
210
  */
211
211
  translateX(
@@ -213,7 +213,7 @@ declare module '../../index' {
213
213
  translation: number,
214
214
  ): Animation
215
215
  /** 对 Y 轴平移
216
- * @supported weapp, h5
216
+ * @supported weapp, h5, tt
217
217
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateY.html
218
218
  */
219
219
  translateY(
@@ -221,7 +221,7 @@ declare module '../../index' {
221
221
  translation: number,
222
222
  ): Animation
223
223
  /** 对 Z 轴平移
224
- * @supported weapp, h5
224
+ * @supported weapp, h5, tt
225
225
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateZ.html
226
226
  */
227
227
  translateZ(
@@ -229,7 +229,7 @@ declare module '../../index' {
229
229
  translation: number,
230
230
  ): Animation
231
231
  /** 设置透明度
232
- * @supported weapp, h5
232
+ * @supported weapp, h5, tt
233
233
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.opacity.html
234
234
  */
235
235
  opacity(
@@ -237,7 +237,7 @@ declare module '../../index' {
237
237
  value: number,
238
238
  ): Animation
239
239
  /** 设置背景色
240
- * @supported weapp, h5
240
+ * @supported weapp, h5, tt
241
241
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.backgroundColor.html
242
242
  */
243
243
  backgroundColor(
@@ -245,7 +245,7 @@ declare module '../../index' {
245
245
  value: string,
246
246
  ): Animation
247
247
  /** 设置宽度
248
- * @supported weapp, h5
248
+ * @supported weapp, h5, tt
249
249
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.width.html
250
250
  */
251
251
  width(
@@ -253,7 +253,7 @@ declare module '../../index' {
253
253
  value: number | string,
254
254
  ): Animation
255
255
  /** 设置高度
256
- * @supported weapp, h5
256
+ * @supported weapp, h5, tt
257
257
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.height.html
258
258
  */
259
259
  height(
@@ -261,7 +261,7 @@ declare module '../../index' {
261
261
  value: number | string,
262
262
  ): Animation
263
263
  /** 设置 left 值
264
- * @supported weapp, h5
264
+ * @supported weapp, h5, tt
265
265
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.left.html
266
266
  */
267
267
  left(
@@ -269,7 +269,7 @@ declare module '../../index' {
269
269
  value: number | string,
270
270
  ): Animation
271
271
  /** 设置 right 值
272
- * @supported weapp, h5
272
+ * @supported weapp, h5, tt
273
273
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.right.html
274
274
  */
275
275
  right(
@@ -277,7 +277,7 @@ declare module '../../index' {
277
277
  value: number | string,
278
278
  ): Animation
279
279
  /** 设置 top 值
280
- * @supported weapp, h5
280
+ * @supported weapp, h5, tt
281
281
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.top.html
282
282
  */
283
283
  top(
@@ -285,7 +285,7 @@ declare module '../../index' {
285
285
  value: number | string,
286
286
  ): Animation
287
287
  /** 设置 bottom 值
288
- * @supported weapp, h5
288
+ * @supported weapp, h5, tt
289
289
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.bottom.html
290
290
  */
291
291
  bottom(
@@ -386,78 +386,14 @@ declare module '../../index' {
386
386
  translateY?: number | string
387
387
  /** Z 方向位移,即 CSS transform translateZ */
388
388
  translateZ?: number | string
389
- }
390
-
391
- /** @ignore */
392
- interface ClearAnimationOptions {
393
- /** 基点位置,即 CSS transform-origin */
394
- transformOrigin?: boolean
395
- /** 背景颜色,即 CSS background-color */
396
- backgroundColor?: boolean
397
- /** 底边位置,即 CSS bottom */
398
- bottom?: boolean
399
- /** 高度,即 CSS height */
400
- height?: boolean
401
- /** 左边位置,即 CSS left */
402
- left?: boolean
403
- /** 宽度,即 CSS width */
404
- width?: boolean
405
- /** 不透明度,即 CSS opacity */
406
- opacity?: boolean
407
- /** 右边位置,即 CSS right */
408
- right?: boolean
409
- /** 顶边位置,即 CSS top */
410
- top?: boolean
411
- /** 变换矩阵,即 CSS transform matrix */
412
- matrix?: boolean
413
- /** 三维变换矩阵,即 CSS transform matrix3d */
414
- matrix3d?: boolean
415
- /** 旋转,即 CSS transform rotate */
416
- rotate?: boolean
417
- /** 三维旋转,即 CSS transform rotate3d */
418
- rotate3d?: boolean
419
- /** X 方向旋转,即 CSS transform rotateX */
420
- rotateX?: boolean
421
- /** Y 方向旋转,即 CSS transform rotateY */
422
- rotateY?: boolean
423
- /** Z 方向旋转,即 CSS transform rotateZ */
424
- rotateZ?: boolean
425
- /** 缩放,即 CSS transform scale */
426
- scale?: boolean
427
- /** 三维缩放,即 CSS transform scale3d */
428
- scale3d?: boolean
429
- /** X 方向缩放,即 CSS transform scaleX */
430
- scaleX?: boolean
431
- /** Y 方向缩放,即 CSS transform scaleY */
432
- scaleY?: boolean
433
- /** Z 方向缩放,即 CSS transform scaleZ */
434
- scaleZ?: boolean
435
- /** 倾斜,即 CSS transform skew */
436
- skew?: boolean
437
- /** X 方向倾斜,即 CSS transform skewX */
438
- skewX?: boolean
439
- /** Y 方向倾斜,即 CSS transform skewY */
440
- skewY?: boolean
441
- /** 位移,即 CSS transform translate */
442
- translate?: boolean
443
- /** 三维位移,即 CSS transform translate3d */
444
- translate3d?: boolean
445
- /** X 方向位移,即 CSS transform translateX */
446
- translateX?: boolean
447
- /** Y 方向位移,即 CSS transform translateY */
448
- translateY?: boolean
449
- /** Z 方向位移,即 CSS transform translateZ */
450
- translateZ?: boolean
451
- }
452
-
453
- /** @ignore */
454
- interface ScrollTimelineKeyframe {
455
389
  composite?: 'replace' | 'add' | 'accumulate' | 'auto'
456
390
  easing?: string
457
- offset?: number | null
458
- [property: string]: string | number | null | undefined
391
+ [property: string]: any
459
392
  }
460
393
 
394
+ /** @ignore */
395
+ type ClearAnimationOptions = Record<keyof KeyFrame, boolean>
396
+
461
397
  /** @ignore */
462
398
  interface ScrollTimelineOption {
463
399
  /** 指定滚动元素的选择器(只支持 scroll-view),该元素滚动时会驱动动画的进度 */
@@ -474,7 +410,7 @@ declare module '../../index' {
474
410
 
475
411
  interface TaroStatic {
476
412
  /** 创建一个动画实例 [animation](../Animation)。调用实例的方法来描述动画。最后通过动画实例的 export 方法导出动画数据传递给组件的 animation 属性。
477
- * @supported weapp, h5
413
+ * @supported weapp, h5, tt
478
414
  * @example
479
415
  * ```tsx
480
416
  * var animation = Taro.createAnimation({
@@ -152,7 +152,7 @@ declare module '../../index' {
152
152
  * **注意**
153
153
  * - Taro.showLoading 和 Taro.showToast 同时只能显示一个
154
154
  * - Taro.showToast 应与 Taro.hideToast 配对使用
155
- * @supported weapp, h5, rn
155
+ * @supported weapp, h5, rn, tt
156
156
  * @example
157
157
  * ```tsx
158
158
  * Taro.showToast({
@@ -169,7 +169,7 @@ declare module '../../index' {
169
169
  * **注意**
170
170
  * - Android 6.7.2 以下版本,点击取消或蒙层时,回调 fail, errMsg 为 "fail cancel";
171
171
  * - Android 6.7.2 及以上版本 和 iOS 点击蒙层不会关闭模态弹窗,所以尽量避免使用「取消」分支中实现业务逻辑
172
- * @supported weapp, h5, rn
172
+ * @supported weapp, h5, rn, tt
173
173
  * @example
174
174
  * ```tsx
175
175
  * Taro.showModal({
@@ -193,7 +193,7 @@ declare module '../../index' {
193
193
  * **注意**
194
194
  * - Taro.showLoading 和 Taro.showToast 同时只能显示一个
195
195
  * - Taro.showLoading 应与 Taro.hideLoading 配对使用
196
- * @supported weapp, h5, rn
196
+ * @supported weapp, h5, rn, tt
197
197
  * @example
198
198
  * ```tsx
199
199
  * Taro.showLoading({
@@ -212,7 +212,7 @@ declare module '../../index' {
212
212
  * **注意**
213
213
  * - Android 6.7.2 以下版本,点击取消或蒙层时,回调 fail, errMsg 为 "fail cancel";
214
214
  * - Android 6.7.2 及以上版本 和 iOS 点击蒙层不会关闭模态弹窗,所以尽量避免使用「取消」分支中实现业务逻辑
215
- * @supported weapp, h5, rn
215
+ * @supported weapp, h5, rn, tt
216
216
  * @example
217
217
  * ```tsx
218
218
  * Taro.showActionSheet({
@@ -230,13 +230,13 @@ declare module '../../index' {
230
230
  showActionSheet(option: showActionSheet.Option): Promise<showActionSheet.SuccessCallbackResult>
231
231
 
232
232
  /** 隐藏消息提示框
233
- * @supported weapp, h5, rn
233
+ * @supported weapp, h5, rn, tt
234
234
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.hideToast.html
235
235
  */
236
236
  hideToast(option?: hideToast.Option): void
237
237
 
238
238
  /** 隐藏 loading 提示框
239
- * @supported weapp, h5, rn
239
+ * @supported weapp, h5, rn, tt
240
240
  * @example
241
241
  * ```tsx
242
242
  * Taro.showLoading({
@@ -21,7 +21,7 @@ declare module '../../index' {
21
21
 
22
22
  interface TaroStatic {
23
23
  /** 获取菜单按钮(右上角胶囊按钮)的布局位置信息。坐标信息以屏幕左上角为原点。
24
- * @supported weapp
24
+ * @supported weapp, tt
25
25
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/menu/wx.getMenuButtonBoundingClientRect.html
26
26
  */
27
27
  getMenuButtonBoundingClientRect(): getMenuButtonBoundingClientRect.Rect
@@ -79,13 +79,13 @@ declare module '../../index' {
79
79
 
80
80
  interface TaroStatic {
81
81
  /** 在当前页面显示导航条加载动画
82
- * @supported weapp, rn
82
+ * @supported weapp, rn, tt
83
83
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/navigation-bar/wx.showNavigationBarLoading.html
84
84
  */
85
85
  showNavigationBarLoading(option?: showNavigationBarLoading.Option): void
86
86
 
87
87
  /** 动态设置当前页面的标题
88
- * @supported weapp, h5, rn
88
+ * @supported weapp, h5, rn, tt
89
89
  * @example
90
90
  * ```tsx
91
91
  * Taro.setNavigationBarTitle({
@@ -97,7 +97,7 @@ declare module '../../index' {
97
97
  setNavigationBarTitle(option: setNavigationBarTitle.Option): Promise<TaroGeneral.CallbackResult>
98
98
 
99
99
  /** 设置页面导航条颜色
100
- * @supported weapp, h5, rn
100
+ * @supported weapp, h5, rn, tt
101
101
  * @h5 不支持 animation 参数
102
102
  * @rn 不支持 animation 参数
103
103
  * @example
@@ -116,13 +116,13 @@ declare module '../../index' {
116
116
  setNavigationBarColor(option: setNavigationBarColor.Option): Promise<TaroGeneral.CallbackResult>
117
117
 
118
118
  /** 在当前页面隐藏导航条加载动画
119
- * @supported weapp, rn
119
+ * @supported weapp, rn, tt
120
120
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/navigation-bar/wx.hideNavigationBarLoading.html
121
121
  */
122
122
  hideNavigationBarLoading(option?: hideNavigationBarLoading.Option): void
123
123
 
124
124
  /** 隐藏返回首页按钮。微信7.0.7版本起,当用户打开的小程序最底层页面是非首页时,默认展示“返回首页”按钮,开发者可在页面 onShow 中调用 hideHomeButton 进行隐藏。
125
- * @supported weapp
125
+ * @supported weapp, tt
126
126
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/navigation-bar/wx.hideHomeButton.html
127
127
  */
128
128
  hideHomeButton(option?: hideHomeButton.Option): Promise<TaroGeneral.CallbackResult>
@@ -25,7 +25,7 @@ declare module '../../index' {
25
25
 
26
26
  interface TaroStatic {
27
27
  /** 停止当前页面下拉刷新。
28
- * @supported weapp, h5, rn
28
+ * @supported weapp, h5, rn, tt
29
29
  * @example
30
30
  * ```tsx
31
31
  * onPullDownRefresh: function (){
@@ -37,7 +37,7 @@ declare module '../../index' {
37
37
  stopPullDownRefresh(option?: stopPullDownRefresh.Option): void
38
38
 
39
39
  /** 开始下拉刷新。调用后触发下拉刷新动画,效果与用户手动下拉刷新一致。
40
- * @supported weapp, h5, rn
40
+ * @supported weapp, h5, rn, tt
41
41
  * @rn 无动画效果
42
42
  * @example
43
43
  * ```tsx
@@ -13,6 +13,8 @@ declare module '../../index' {
13
13
  scrollTop?: number
14
14
  /** 选择器, css selector */
15
15
  selector?: string
16
+ /** 偏移距离,需要和 selector 参数搭配使用,可以滚动到 selector 加偏移距离的位置,单位 px */
17
+ offsetTop?: number
16
18
  /** 接口调用成功的回调函数 */
17
19
  success?: (res: TaroGeneral.CallbackResult) => void
18
20
  }
@@ -58,7 +60,7 @@ declare module '../../index' {
58
60
  scrollTo(object: ScrollViewContext.scrollTo.Option): void
59
61
 
60
62
  /** 滚动至指定位置
61
- * @supported weapp
63
+ * @supported weapp, tt
62
64
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/scroll/ScrollViewContext.scrollIntoView.html
63
65
  */
64
66
  scrollIntoView(
@@ -96,7 +98,7 @@ declare module '../../index' {
96
98
  * - 后代选择器:.the-ancestor .the-descendant
97
99
  * - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant
98
100
  * - 多选择器的并集:#a-node, .some-other-nodes
99
- * @supported weapp, h5, rn
101
+ * @supported weapp, h5, rn, tt
100
102
  * @example
101
103
  * ```tsx
102
104
  * Taro.pageScrollTo({
@@ -121,19 +121,19 @@ declare module '../../index' {
121
121
 
122
122
  interface TaroStatic {
123
123
  /** 显示 tabBar 某一项的右上角的红点
124
- * @supported weapp, h5, rn
124
+ * @supported weapp, h5, rn, tt
125
125
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.showTabBarRedDot.html
126
126
  */
127
127
  showTabBarRedDot(option: showTabBarRedDot.Option): Promise<TaroGeneral.CallbackResult>
128
128
 
129
129
  /** 显示 tabBar
130
- * @supported weapp, h5, rn
130
+ * @supported weapp, h5, rn, tt
131
131
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.showTabBar.html
132
132
  */
133
133
  showTabBar(option?: showTabBar.Option): Promise<TaroGeneral.CallbackResult>
134
134
 
135
135
  /** 动态设置 tabBar 的整体样式
136
- * @supported weapp, h5, rn
136
+ * @supported weapp, h5, rn, tt
137
137
  * @example
138
138
  * ```tsx
139
139
  * Taro.setTabBarStyle({
@@ -148,7 +148,7 @@ declare module '../../index' {
148
148
  setTabBarStyle(option?: setTabBarStyle.Option): Promise<TaroGeneral.CallbackResult>
149
149
 
150
150
  /** 动态设置 tabBar 某一项的内容,`2.7.0` 起图片支持临时文件和网络文件。
151
- * @supported weapp, h5, rn
151
+ * @supported weapp, h5, rn, tt
152
152
  * @example
153
153
  * ```tsx
154
154
  * Taro.setTabBarItem({
@@ -163,7 +163,7 @@ declare module '../../index' {
163
163
  setTabBarItem(option: setTabBarItem.Option): Promise<TaroGeneral.CallbackResult>
164
164
 
165
165
  /** 为 tabBar 某一项的右上角添加文本
166
- * @supported weapp, h5, rn
166
+ * @supported weapp, h5, rn, tt
167
167
  * @example
168
168
  * ```tsx
169
169
  * Taro.setTabBarBadge({
@@ -176,19 +176,19 @@ declare module '../../index' {
176
176
  setTabBarBadge(option: setTabBarBadge.Option): Promise<TaroGeneral.CallbackResult>
177
177
 
178
178
  /** 移除 tabBar 某一项右上角的文本
179
- * @supported weapp, h5, rn
179
+ * @supported weapp, h5, rn, tt
180
180
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.removeTabBarBadge.html
181
181
  */
182
182
  removeTabBarBadge(option: removeTabBarBadge.Option): Promise<TaroGeneral.CallbackResult>
183
183
 
184
184
  /** 隐藏 tabBar 某一项的右上角的红点
185
- * @supported weapp, h5, rn
185
+ * @supported weapp, h5, rn, tt
186
186
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.hideTabBarRedDot.html
187
187
  */
188
188
  hideTabBarRedDot(option: hideTabBarRedDot.Option): Promise<TaroGeneral.CallbackResult>
189
189
 
190
190
  /** 隐藏 tabBar
191
- * @supported weapp, h5, rn
191
+ * @supported weapp, h5, rn, tt
192
192
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.hideTabBar.html
193
193
  */
194
194
  hideTabBar(option?: hideTabBar.Option): Promise<TaroGeneral.CallbackResult>