@tarojs/taro 3.5.0-beta.0 → 3.5.0-beta.3
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 +4 -4
- 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/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 +2 -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 +1 -1
- package/types/api/location/index.d.ts +9 -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 +5 -5
- package/types/api/network/request.d.ts +3 -3
- package/types/api/network/upload.d.ts +5 -5
- 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 +32 -32
- 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 +8 -0
- package/types/global.d.ts +1 -1
- package/types/taro.component.d.ts +1 -0
- package/types/taro.config.d.ts +16 -0
- package/types/taro.hooks.d.ts +34 -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(
|
|
@@ -410,7 +410,7 @@ declare module '../../index' {
|
|
|
410
410
|
|
|
411
411
|
interface TaroStatic {
|
|
412
412
|
/** 创建一个动画实例 [animation](../Animation)。调用实例的方法来描述动画。最后通过动画实例的 export 方法导出动画数据传递给组件的 animation 属性。
|
|
413
|
-
* @supported weapp, h5
|
|
413
|
+
* @supported weapp, h5, tt
|
|
414
414
|
* @example
|
|
415
415
|
* ```tsx
|
|
416
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>
|
|
@@ -18,12 +18,12 @@ declare module '../../index' {
|
|
|
18
18
|
*/
|
|
19
19
|
interface IntersectionObserver {
|
|
20
20
|
/** 停止监听。回调函数将不再触发
|
|
21
|
-
* @supported weapp
|
|
21
|
+
* @supported weapp, tt
|
|
22
22
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.disconnect.html
|
|
23
23
|
*/
|
|
24
24
|
disconnect(): void
|
|
25
25
|
/** 指定目标节点并开始监听相交状态变化情况
|
|
26
|
-
* @supported weapp
|
|
26
|
+
* @supported weapp, tt
|
|
27
27
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.observe.html
|
|
28
28
|
*/
|
|
29
29
|
observe(
|
|
@@ -33,7 +33,7 @@ declare module '../../index' {
|
|
|
33
33
|
callback: IntersectionObserver.ObserveCallback,
|
|
34
34
|
): void
|
|
35
35
|
/** 使用选择器指定一个节点,作为参照区域之一。
|
|
36
|
-
* @supported weapp
|
|
36
|
+
* @supported weapp, tt
|
|
37
37
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.relativeTo.html
|
|
38
38
|
*/
|
|
39
39
|
relativeTo(
|
|
@@ -43,7 +43,7 @@ declare module '../../index' {
|
|
|
43
43
|
margins?: IntersectionObserver.RelativeToMargins,
|
|
44
44
|
): IntersectionObserver
|
|
45
45
|
/** 指定页面显示区域作为参照区域之一
|
|
46
|
-
* @supported weapp
|
|
46
|
+
* @supported weapp, tt
|
|
47
47
|
* @example
|
|
48
48
|
* 下面的示例代码中,如果目标节点(用选择器 .target-class 指定)进入显示区域以下 100px 时,就会触发回调函数。
|
|
49
49
|
*
|
|
@@ -184,7 +184,7 @@ declare module '../../index' {
|
|
|
184
184
|
*/
|
|
185
185
|
interface NodesRef {
|
|
186
186
|
/** 添加节点的布局位置的查询请求。相对于显示区域,以像素为单位。其功能类似于 DOM 的 `getBoundingClientRect`。返回 `NodesRef` 对应的 `SelectorQuery`。
|
|
187
|
-
* @supported weapp, h5
|
|
187
|
+
* @supported weapp, h5, tt
|
|
188
188
|
* @example
|
|
189
189
|
* ```tsx
|
|
190
190
|
* Taro.createSelectorQuery().select('#the-id').boundingClientRect(function(rect){
|
|
@@ -220,7 +220,7 @@ declare module '../../index' {
|
|
|
220
220
|
callback?: NodesRef.BoundingClientRectCallback,
|
|
221
221
|
): SelectorQuery
|
|
222
222
|
/** 添加节点的 Context 对象查询请求。目前支持 [VideoContext](/docs/apis/media/video/VideoContext)、[CanvasContext](/docs/apis/canvas/CanvasContext)、[LivePlayerContext](/docs/apis/media/live/LivePlayerContext)、[EditorContext](/docs/apis/media/editor/EditorContext)和 [MapContext](/docs/apis/media/map/MapContext) 的获取。
|
|
223
|
-
* @supported weapp, h5
|
|
223
|
+
* @supported weapp, h5, tt
|
|
224
224
|
* @example
|
|
225
225
|
* ```tsx
|
|
226
226
|
* Taro.createSelectorQuery().select('.the-video-class').context(function (res) {
|
|
@@ -237,7 +237,7 @@ declare module '../../index' {
|
|
|
237
237
|
*
|
|
238
238
|
* **注意**
|
|
239
239
|
* computedStyle 的优先级高于 size,当同时在 computedStyle 里指定了 width/height 和传入了 size: true,则优先返回 computedStyle 获取到的 width/height。
|
|
240
|
-
* @supported weapp, h5
|
|
240
|
+
* @supported weapp, h5, tt
|
|
241
241
|
* @example
|
|
242
242
|
* ```tsx
|
|
243
243
|
* Taro.createSelectorQuery().select('#the-id').fields({
|
|
@@ -269,7 +269,7 @@ declare module '../../index' {
|
|
|
269
269
|
callback?: NodesRef.FieldsCallback,
|
|
270
270
|
): SelectorQuery
|
|
271
271
|
/** 获取 Node 节点实例。目前支持 [Canvas](/docs/components/canvas) 的获取。
|
|
272
|
-
* @supported weapp, h5
|
|
272
|
+
* @supported weapp, h5, tt
|
|
273
273
|
* @example
|
|
274
274
|
* ```tsx
|
|
275
275
|
* Taro.createSelectorQuery().select('.canvas').node(function(res){
|
|
@@ -283,7 +283,7 @@ declare module '../../index' {
|
|
|
283
283
|
callback?: NodesRef.NodeCallback,
|
|
284
284
|
): SelectorQuery
|
|
285
285
|
/** 添加节点的滚动位置查询请求。以像素为单位。节点必须是 `scroll-view` 或者 `viewport`,返回 `NodesRef` 对应的 `SelectorQuery`。
|
|
286
|
-
* @supported weapp, h5
|
|
286
|
+
* @supported weapp, h5, tt
|
|
287
287
|
* @example
|
|
288
288
|
* ```tsx
|
|
289
289
|
* Taro.createSelectorQuery().selectViewport().scrollOffset(function(res){
|
|
@@ -384,7 +384,7 @@ declare module '../../index' {
|
|
|
384
384
|
*/
|
|
385
385
|
interface SelectorQuery {
|
|
386
386
|
/** 执行所有的请求。请求结果按请求次序构成数组,在callback的第一个参数中返回。
|
|
387
|
-
* @supported weapp, h5
|
|
387
|
+
* @supported weapp, h5, tt
|
|
388
388
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.exec.html
|
|
389
389
|
*/
|
|
390
390
|
exec(
|
|
@@ -392,7 +392,7 @@ declare module '../../index' {
|
|
|
392
392
|
callback?: (...args: any[]) => any,
|
|
393
393
|
): NodesRef
|
|
394
394
|
/** 将选择器的选取范围更改为自定义组件 `component` 内。(初始时,选择器仅选取页面范围的节点,不会选取任何自定义组件中的节点)。
|
|
395
|
-
* @supported weapp, h5
|
|
395
|
+
* @supported weapp, h5, tt
|
|
396
396
|
* @example
|
|
397
397
|
* ```tsx
|
|
398
398
|
* Component({
|
|
@@ -423,7 +423,7 @@ declare module '../../index' {
|
|
|
423
423
|
* - 后代选择器:.the-ancestor .the-descendant
|
|
424
424
|
* - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant
|
|
425
425
|
* - 多选择器的并集:#a-node, .some-other-nodes
|
|
426
|
-
* @supported weapp, h5
|
|
426
|
+
* @supported weapp, h5, tt
|
|
427
427
|
* @example
|
|
428
428
|
* ```tsx
|
|
429
429
|
* Taro.createSelectorQuery().select('#the-id').fields({
|
|
@@ -459,7 +459,7 @@ declare module '../../index' {
|
|
|
459
459
|
* - 后代选择器:.the-ancestor .the-descendant
|
|
460
460
|
* - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant
|
|
461
461
|
* - 多选择器的并集:#a-node, .some-other-nodes
|
|
462
|
-
* @supported weapp, h5
|
|
462
|
+
* @supported weapp, h5, tt
|
|
463
463
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/SelectorQuery.selectAll.html
|
|
464
464
|
*/
|
|
465
465
|
selectAll(
|
|
@@ -467,7 +467,7 @@ declare module '../../index' {
|
|
|
467
467
|
selector: string,
|
|
468
468
|
): NodesRef
|
|
469
469
|
/** 选择显示区域。可用于获取显示区域的尺寸、滚动位置等信息。
|
|
470
|
-
* @supported weapp, h5
|
|
470
|
+
* @supported weapp, h5, tt
|
|
471
471
|
* @example
|
|
472
472
|
* ```tsx
|
|
473
473
|
* Taro.createSelectorQuery().selectViewport().scrollOffset(function (res) {
|
|
@@ -484,7 +484,7 @@ declare module '../../index' {
|
|
|
484
484
|
|
|
485
485
|
interface TaroStatic {
|
|
486
486
|
/** 返回一个 SelectorQuery 对象实例。在自定义组件或包含自定义组件的页面中,应使用 `this.createSelectorQuery()` 来代替。
|
|
487
|
-
* @supported weapp, h5
|
|
487
|
+
* @supported weapp, h5, tt
|
|
488
488
|
* @example
|
|
489
489
|
* ```tsx
|
|
490
490
|
* const query = Taro.createSelectorQuery()
|
|
@@ -500,7 +500,7 @@ declare module '../../index' {
|
|
|
500
500
|
createSelectorQuery(): SelectorQuery
|
|
501
501
|
|
|
502
502
|
/** 创建并返回一个 IntersectionObserver 对象实例。在自定义组件或包含自定义组件的页面中,应使用 `this.createIntersectionObserver([options])` 来代替。
|
|
503
|
-
* @supported weapp
|
|
503
|
+
* @supported weapp, tt
|
|
504
504
|
* @example
|
|
505
505
|
* ```tsx
|
|
506
506
|
* const observer = Taro.createIntersectionObserver(this, { thresholds: [0], observeAll: true })
|
package/types/compile.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import swc from '@swc/core'
|
|
1
2
|
export { Current } from '@tarojs/runtime'
|
|
2
3
|
import webpack from 'webpack'
|
|
3
4
|
import webpackDevServer from 'webpack-dev-server'
|
|
5
|
+
import HtmlWebpackPlugin from 'html-webpack-plugin'
|
|
4
6
|
|
|
5
7
|
export const enum TEMPLATE_TYPES {
|
|
6
8
|
WEAPP = '.wxml',
|
|
@@ -195,6 +197,7 @@ export interface IH5Config {
|
|
|
195
197
|
useHtmlComponents?: boolean
|
|
196
198
|
|
|
197
199
|
postcss?: IPostcssOption
|
|
200
|
+
htmlPluginOption?: HtmlWebpackPlugin.Options
|
|
198
201
|
}
|
|
199
202
|
|
|
200
203
|
type FeatureItem = {
|
|
@@ -367,6 +370,11 @@ interface IPrebundle {
|
|
|
367
370
|
force?: boolean
|
|
368
371
|
include?: string[]
|
|
369
372
|
exclude?: string[]
|
|
373
|
+
esbuild?: Record<string, any>
|
|
374
|
+
swc?: swc.Config
|
|
375
|
+
webpack?: {
|
|
376
|
+
provide?: any[]
|
|
377
|
+
}
|
|
370
378
|
}
|
|
371
379
|
interface ICompiler {
|
|
372
380
|
type: CompilerTypes
|
package/types/global.d.ts
CHANGED