@tarojs/taro 3.5.0-alpha.14 → 3.5.0-alpha.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/index.js +3 -4
- package/package.json +7 -8
- package/types/api/base/debug.d.ts +1 -1
- package/types/api/base/index.d.ts +3 -3
- package/types/api/base/performance.d.ts +5 -5
- package/types/api/base/system.d.ts +2 -2
- package/types/api/base/update.d.ts +6 -6
- package/types/api/base/weapp/app-event.d.ts +56 -17
- package/types/api/base/weapp/life-cycle.d.ts +7 -7
- package/types/api/canvas/index.d.ts +1 -1
- package/types/api/data-analysis/index.d.ts +1 -1
- package/types/api/device/accelerometer.d.ts +3 -3
- package/types/api/device/calendar.d.ts +1 -1
- package/types/api/device/clipboard.d.ts +2 -2
- package/types/api/device/compass.d.ts +3 -3
- package/types/api/device/gyroscope.d.ts +4 -4
- package/types/api/device/keyboard.d.ts +1 -1
- package/types/api/device/memory.d.ts +1 -1
- package/types/api/device/network.d.ts +2 -2
- package/types/api/device/phone.d.ts +1 -1
- package/types/api/device/scan.d.ts +1 -1
- package/types/api/device/screen.d.ts +5 -5
- package/types/api/device/vibrate.d.ts +6 -2
- package/types/api/device/wifi.d.ts +3 -3
- package/types/api/ext/index.d.ts +2 -2
- package/types/api/files/index.d.ts +32 -32
- package/types/api/framework/index.d.ts +5 -4
- package/types/api/location/index.d.ts +45 -9
- package/types/api/media/audio.d.ts +1 -1
- package/types/api/media/background-audio.d.ts +1 -1
- package/types/api/media/camera.d.ts +8 -8
- package/types/api/media/image.d.ts +5 -5
- package/types/api/media/map.d.ts +15 -15
- package/types/api/media/recorder.d.ts +9 -9
- package/types/api/media/video.d.ts +2 -2
- package/types/api/navigate/index.d.ts +2 -2
- package/types/api/network/download.d.ts +27 -8
- package/types/api/network/request.d.ts +3 -3
- package/types/api/network/upload.d.ts +19 -8
- package/types/api/network/websocket.d.ts +6 -6
- package/types/api/open-api/address.d.ts +1 -1
- package/types/api/open-api/authorize.d.ts +1 -1
- package/types/api/open-api/settings.d.ts +2 -2
- package/types/api/open-api/subscribe-message.d.ts +2 -2
- package/types/api/open-api/user-info.d.ts +2 -2
- package/types/api/route/index.d.ts +5 -5
- package/types/api/share/index.d.ts +2 -2
- package/types/api/storage/index.d.ts +10 -10
- package/types/api/ui/animation.d.ts +34 -36
- package/types/api/ui/interaction.d.ts +6 -6
- package/types/api/ui/menu.d.ts +1 -1
- package/types/api/ui/navigation-bar.d.ts +5 -5
- package/types/api/ui/pull-down-refresh.d.ts +2 -2
- package/types/api/ui/scroll.d.ts +4 -2
- package/types/api/ui/tab-bar.d.ts +8 -8
- package/types/api/wxml/index.d.ts +16 -16
- package/types/compile.d.ts +18 -4
- package/types/global.d.ts +1 -1
- package/types/taro.component.d.ts +12 -63
- package/types/taro.config.d.ts +29 -0
- package/types/taro.extend.d.ts +24 -20
- package/types/taro.hooks.d.ts +55 -3
- package/types/taro.lifecycle.d.ts +21 -14
- package/LICENSE +0 -21
|
@@ -104,7 +104,7 @@ declare module '../../index' {
|
|
|
104
104
|
|
|
105
105
|
interface TaroStatic {
|
|
106
106
|
/** Taro.setStorage 的同步版本
|
|
107
|
-
* @supported weapp, h5
|
|
107
|
+
* @supported weapp, h5, tt
|
|
108
108
|
* @example
|
|
109
109
|
* ```tsx
|
|
110
110
|
* Taro.setStorage({
|
|
@@ -128,7 +128,7 @@ declare module '../../index' {
|
|
|
128
128
|
): void
|
|
129
129
|
|
|
130
130
|
/** 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。
|
|
131
|
-
* @supported weapp, h5, rn
|
|
131
|
+
* @supported weapp, h5, rn, tt
|
|
132
132
|
* @example
|
|
133
133
|
* ```tsx
|
|
134
134
|
* Taro.setStorage({
|
|
@@ -155,7 +155,7 @@ declare module '../../index' {
|
|
|
155
155
|
): void
|
|
156
156
|
|
|
157
157
|
/** Taro.removeStorage 的同步版本
|
|
158
|
-
* @supported weapp, h5
|
|
158
|
+
* @supported weapp, h5, tt
|
|
159
159
|
* @example
|
|
160
160
|
* ```tsx
|
|
161
161
|
* try {
|
|
@@ -172,7 +172,7 @@ declare module '../../index' {
|
|
|
172
172
|
): void
|
|
173
173
|
|
|
174
174
|
/** 从本地缓存中移除指定 key
|
|
175
|
-
* @supported weapp, h5, rn
|
|
175
|
+
* @supported weapp, h5, rn, tt
|
|
176
176
|
* @example
|
|
177
177
|
* ```tsx
|
|
178
178
|
* Taro.removeStorage({
|
|
@@ -187,7 +187,7 @@ declare module '../../index' {
|
|
|
187
187
|
removeStorage(option: removeStorage.Option): Promise<TaroGeneral.CallbackResult>
|
|
188
188
|
|
|
189
189
|
/** Taro.getStorage 的同步版本
|
|
190
|
-
* @supported weapp, h5
|
|
190
|
+
* @supported weapp, h5, tt
|
|
191
191
|
* @example
|
|
192
192
|
* ```tsx
|
|
193
193
|
* try {
|
|
@@ -207,7 +207,7 @@ declare module '../../index' {
|
|
|
207
207
|
): T
|
|
208
208
|
|
|
209
209
|
/** Taro.getStorageInfo 的同步版本
|
|
210
|
-
* @supported weapp, h5
|
|
210
|
+
* @supported weapp, h5, rn, tt
|
|
211
211
|
* @example
|
|
212
212
|
* ```tsx
|
|
213
213
|
* try {
|
|
@@ -224,7 +224,7 @@ declare module '../../index' {
|
|
|
224
224
|
getStorageInfoSync(): getStorageInfoSync.Option
|
|
225
225
|
|
|
226
226
|
/** 异步获取当前storage的相关信息
|
|
227
|
-
* @supported weapp, h5, rn
|
|
227
|
+
* @supported weapp, h5, rn, tt
|
|
228
228
|
* @example
|
|
229
229
|
* ```tsx
|
|
230
230
|
* Taro.getStorageInfo({
|
|
@@ -240,7 +240,7 @@ declare module '../../index' {
|
|
|
240
240
|
getStorageInfo(option?: getStorageInfo.Option): Promise<TaroGeneral.CallbackResult>
|
|
241
241
|
|
|
242
242
|
/** 从本地缓存中异步获取指定 key 的内容
|
|
243
|
-
* @supported weapp, h5, rn
|
|
243
|
+
* @supported weapp, h5, rn, tt
|
|
244
244
|
* @example
|
|
245
245
|
* ```tsx
|
|
246
246
|
* Taro.getStorage({
|
|
@@ -264,7 +264,7 @@ declare module '../../index' {
|
|
|
264
264
|
): void
|
|
265
265
|
|
|
266
266
|
/** Taro.clearStorage 的同步版本
|
|
267
|
-
* @supported weapp, h5
|
|
267
|
+
* @supported weapp, h5, tt
|
|
268
268
|
* @example
|
|
269
269
|
* ```tsx
|
|
270
270
|
* try {
|
|
@@ -278,7 +278,7 @@ declare module '../../index' {
|
|
|
278
278
|
clearStorageSync(): void
|
|
279
279
|
|
|
280
280
|
/** 清理本地数据缓存
|
|
281
|
-
* @supported weapp, h5, rn
|
|
281
|
+
* @supported weapp, h5, rn, tt
|
|
282
282
|
* @example
|
|
283
283
|
* ```tsx
|
|
284
284
|
* Taro.clearStorage()
|
|
@@ -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(
|
|
@@ -391,10 +391,8 @@ declare module '../../index' {
|
|
|
391
391
|
[property: string]: any
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
}
|
|
397
|
-
|
|
394
|
+
/** @ignore */
|
|
395
|
+
type ClearAnimationOptions = Record<keyof KeyFrame, boolean>
|
|
398
396
|
|
|
399
397
|
/** @ignore */
|
|
400
398
|
interface ScrollTimelineOption {
|
|
@@ -412,7 +410,7 @@ declare module '../../index' {
|
|
|
412
410
|
|
|
413
411
|
interface TaroStatic {
|
|
414
412
|
/** 创建一个动画实例 [animation](../Animation)。调用实例的方法来描述动画。最后通过动画实例的 export 方法导出动画数据传递给组件的 animation 属性。
|
|
415
|
-
* @supported weapp, h5
|
|
413
|
+
* @supported weapp, h5, tt
|
|
416
414
|
* @example
|
|
417
415
|
* ```tsx
|
|
418
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({
|
package/types/api/ui/menu.d.ts
CHANGED
|
@@ -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
|
package/types/api/ui/scroll.d.ts
CHANGED
|
@@ -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>
|