@spcsn/taro 0.1.1 → 1.0.0
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/README.md +13 -6
- package/dist/index.js +223 -1
- package/dist/index.js.map +1 -1
- package/package.json +25 -56
- package/types/api/ad/index.d.ts +3 -6
- package/types/api/base/debug.d.ts +8 -8
- package/types/api/base/env.d.ts +3 -3
- 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 +8 -16
- package/types/api/base/update.d.ts +6 -6
- package/types/api/base/weapp/app-event.d.ts +12 -12
- package/types/api/base/weapp/life-cycle.d.ts +1 -1
- package/types/api/canvas/index.d.ts +71 -72
- package/types/api/data-analysis/index.d.ts +1 -1
- package/types/api/device/accelerometer.d.ts +4 -4
- package/types/api/device/accessibility.d.ts +1 -1
- package/types/api/device/battery.d.ts +2 -2
- package/types/api/device/bluetooth-ble.d.ts +14 -14
- package/types/api/device/bluetooth-peripheral.d.ts +15 -15
- package/types/api/device/bluetooth.d.ts +11 -11
- package/types/api/device/calendar.d.ts +2 -2
- package/types/api/device/clipboard.d.ts +2 -4
- package/types/api/device/compass.d.ts +4 -4
- package/types/api/device/gyroscope.d.ts +4 -4
- package/types/api/device/iBeacon.d.ts +7 -7
- package/types/api/device/keyboard.d.ts +3 -3
- package/types/api/device/memory.d.ts +2 -2
- package/types/api/device/motion.d.ts +4 -4
- package/types/api/device/network.d.ts +5 -20
- package/types/api/device/nfc.d.ts +17 -17
- 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 +6 -6
- package/types/api/device/sms.d.ts +1 -1
- package/types/api/device/vibrate.d.ts +2 -2
- package/types/api/device/wifi.d.ts +10 -10
- package/types/api/ext/index.d.ts +2 -2
- package/types/api/files/index.d.ts +46 -46
- package/types/api/framework/index.d.ts +2 -2
- package/types/api/location/index.d.ts +38 -45
- package/types/api/media/audio.d.ts +30 -30
- package/types/api/media/background-audio.d.ts +1 -1
- package/types/api/media/camera.d.ts +12 -25
- package/types/api/media/image.d.ts +8 -13
- package/types/api/media/map.d.ts +15 -15
- package/types/api/media/recorder.d.ts +11 -11
- package/types/api/media/video.d.ts +19 -21
- package/types/api/navigate/index.d.ts +2 -2
- package/types/api/network/download.d.ts +7 -8
- package/types/api/network/request.d.ts +14 -33
- package/types/api/network/upload.d.ts +7 -9
- package/types/api/network/websocket.d.ts +14 -14
- package/types/api/open-api/account.d.ts +1 -1
- package/types/api/open-api/address.d.ts +5 -5
- package/types/api/open-api/authorize.d.ts +1 -1
- package/types/api/open-api/login.d.ts +5 -5
- package/types/api/open-api/settings.d.ts +2 -2
- package/types/api/open-api/subscribe-message.d.ts +15 -15
- package/types/api/open-api/user-info.d.ts +2 -3
- package/types/api/payment/index.d.ts +1 -1
- package/types/api/route/index.d.ts +5 -8
- package/types/api/share/index.d.ts +3 -3
- package/types/api/storage/background-fetch.d.ts +6 -9
- package/types/api/storage/index.d.ts +11 -11
- package/types/api/taro.extend.d.ts +7 -24
- package/types/api/taro.hooks.d.ts +8 -33
- package/types/api/ui/animation.d.ts +33 -36
- package/types/api/ui/background.d.ts +2 -4
- package/types/api/ui/custom-component.d.ts +1 -1
- package/types/api/ui/fonts.d.ts +1 -10
- 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 -7
- package/types/api/ui/pull-down-refresh.d.ts +2 -3
- package/types/api/ui/scroll.d.ts +3 -4
- package/types/api/ui/tab-bar.d.ts +8 -8
- package/types/api/ui/window.d.ts +2 -2
- package/types/api/wxml/index.d.ts +19 -23
- package/types/compile/compiler.d.ts +4 -10
- package/types/compile/config/index.d.ts +0 -3
- package/types/compile/config/mini.d.ts +17 -39
- package/types/compile/config/plugin.d.ts +14 -4
- package/types/compile/config/project.d.ts +23 -61
- package/types/compile/config/util.d.ts +18 -73
- package/types/compile/index.d.ts +16 -1
- package/types/compile/viteCompilerContext.d.ts +18 -52
- package/types/global.d.ts +1 -12
- package/types/index.d.ts +0 -11
- package/types/taro.api.d.ts +0 -9
- package/types/taro.component.d.ts +0 -2
- package/types/taro.config.d.ts +0 -120
- package/types/taro.runtime.d.ts +7 -3
- package/types/api/alipay/index.d.ts +0 -69
- package/types/api/qq/index.d.ts +0 -354
- package/types/api/swan/bookshelf.d.ts +0 -307
- package/types/api/swan/download-package.d.ts +0 -80
- package/types/api/swan/index.d.ts +0 -251
- package/types/api/swan/pay.d.ts +0 -139
- package/types/compile/config/h5.d.ts +0 -134
- package/types/compile/config/harmony.d.ts +0 -118
- package/types/compile/config/rn.d.ts +0 -85
|
@@ -13,10 +13,7 @@ declare module '../../index' {
|
|
|
13
13
|
delay?: number
|
|
14
14
|
/** @default "50% 50% 0" */
|
|
15
15
|
transformOrigin?: string
|
|
16
|
-
/**
|
|
17
|
-
* 单位
|
|
18
|
-
* @supported h5
|
|
19
|
-
*/
|
|
16
|
+
/** 单位 */
|
|
20
17
|
unit?: string
|
|
21
18
|
}
|
|
22
19
|
interface TimingFunction {
|
|
@@ -38,34 +35,34 @@ declare module '../../index' {
|
|
|
38
35
|
}
|
|
39
36
|
|
|
40
37
|
/** 动画对象
|
|
41
|
-
* @supported weapp
|
|
38
|
+
* @supported weapp
|
|
42
39
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.html
|
|
43
40
|
*/
|
|
44
41
|
interface Animation {
|
|
45
42
|
/** 导出动画队列。**export 方法每次调用后会清掉之前的动画操作**。
|
|
46
|
-
* @supported weapp
|
|
43
|
+
* @supported weapp
|
|
47
44
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.export.html
|
|
48
45
|
*/
|
|
49
46
|
export(): {
|
|
50
47
|
actions: TaroGeneral.IAnyObject[]
|
|
51
48
|
}
|
|
52
49
|
/** 表示一组动画完成。可以在一组动画中调用任意多个动画方法,一组动画中的所有动画会同时开始,一组动画完成后才会进行下一组动画。
|
|
53
|
-
* @supported weapp
|
|
50
|
+
* @supported weapp
|
|
54
51
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.step.html
|
|
55
52
|
*/
|
|
56
53
|
step(option?: Animation.StepOption): Animation
|
|
57
54
|
/** 同 [transform-function matrix](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix)
|
|
58
|
-
* @supported weapp
|
|
55
|
+
* @supported weapp
|
|
59
56
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.matrix.html
|
|
60
57
|
*/
|
|
61
58
|
matrix(a: number, b: number, c: number, d: number, tx: number, ty: number): Animation
|
|
62
59
|
/** 同 [transform-function matrix3d](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d)
|
|
63
|
-
* @supported weapp
|
|
60
|
+
* @supported weapp
|
|
64
61
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.matrix3d.html
|
|
65
62
|
*/
|
|
66
63
|
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
64
|
/** 从原点顺时针旋转一个角度
|
|
68
|
-
* @supported weapp
|
|
65
|
+
* @supported weapp
|
|
69
66
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotate.html
|
|
70
67
|
*/
|
|
71
68
|
rotate(
|
|
@@ -73,7 +70,7 @@ declare module '../../index' {
|
|
|
73
70
|
angle: number,
|
|
74
71
|
): Animation
|
|
75
72
|
/** 从 固定 轴顺时针旋转一个角度
|
|
76
|
-
* @supported weapp
|
|
73
|
+
* @supported weapp
|
|
77
74
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotate3d.html
|
|
78
75
|
*/
|
|
79
76
|
rotate3d(
|
|
@@ -87,7 +84,7 @@ declare module '../../index' {
|
|
|
87
84
|
angle?: number,
|
|
88
85
|
): Animation
|
|
89
86
|
/** 从 X 轴顺时针旋转一个角度
|
|
90
|
-
* @supported weapp
|
|
87
|
+
* @supported weapp
|
|
91
88
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateX.html
|
|
92
89
|
*/
|
|
93
90
|
rotateX(
|
|
@@ -95,7 +92,7 @@ declare module '../../index' {
|
|
|
95
92
|
angle: number,
|
|
96
93
|
): Animation
|
|
97
94
|
/** 从 Y 轴顺时针旋转一个角度
|
|
98
|
-
* @supported weapp
|
|
95
|
+
* @supported weapp
|
|
99
96
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateY.html
|
|
100
97
|
*/
|
|
101
98
|
rotateY(
|
|
@@ -103,7 +100,7 @@ declare module '../../index' {
|
|
|
103
100
|
angle: number,
|
|
104
101
|
): Animation
|
|
105
102
|
/** 从 Z 轴顺时针旋转一个角度
|
|
106
|
-
* @supported weapp
|
|
103
|
+
* @supported weapp
|
|
107
104
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateZ.html
|
|
108
105
|
*/
|
|
109
106
|
rotateZ(
|
|
@@ -111,7 +108,7 @@ declare module '../../index' {
|
|
|
111
108
|
angle: number,
|
|
112
109
|
): Animation
|
|
113
110
|
/** 缩放
|
|
114
|
-
* @supported weapp
|
|
111
|
+
* @supported weapp
|
|
115
112
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scale.html
|
|
116
113
|
*/
|
|
117
114
|
scale(
|
|
@@ -121,7 +118,7 @@ declare module '../../index' {
|
|
|
121
118
|
sy?: number,
|
|
122
119
|
): Animation
|
|
123
120
|
/** 缩放
|
|
124
|
-
* @supported weapp
|
|
121
|
+
* @supported weapp
|
|
125
122
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scale3d.html
|
|
126
123
|
*/
|
|
127
124
|
scale3d(
|
|
@@ -133,7 +130,7 @@ declare module '../../index' {
|
|
|
133
130
|
sz: number,
|
|
134
131
|
): Animation
|
|
135
132
|
/** 缩放 X 轴
|
|
136
|
-
* @supported weapp
|
|
133
|
+
* @supported weapp
|
|
137
134
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleX.html
|
|
138
135
|
*/
|
|
139
136
|
scaleX(
|
|
@@ -141,7 +138,7 @@ declare module '../../index' {
|
|
|
141
138
|
scale: number,
|
|
142
139
|
): Animation
|
|
143
140
|
/** 缩放 Y 轴
|
|
144
|
-
* @supported weapp
|
|
141
|
+
* @supported weapp
|
|
145
142
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleY.html
|
|
146
143
|
*/
|
|
147
144
|
scaleY(
|
|
@@ -149,7 +146,7 @@ declare module '../../index' {
|
|
|
149
146
|
scale: number,
|
|
150
147
|
): Animation
|
|
151
148
|
/** 缩放 Z 轴
|
|
152
|
-
* @supported weapp
|
|
149
|
+
* @supported weapp
|
|
153
150
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleZ.html
|
|
154
151
|
*/
|
|
155
152
|
scaleZ(
|
|
@@ -157,7 +154,7 @@ declare module '../../index' {
|
|
|
157
154
|
scale: number,
|
|
158
155
|
): Animation
|
|
159
156
|
/** 对 X、Y 轴坐标进行倾斜
|
|
160
|
-
* @supported weapp
|
|
157
|
+
* @supported weapp
|
|
161
158
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skew.html
|
|
162
159
|
*/
|
|
163
160
|
skew(
|
|
@@ -167,7 +164,7 @@ declare module '../../index' {
|
|
|
167
164
|
ay: number,
|
|
168
165
|
): Animation
|
|
169
166
|
/** 对 X 轴坐标进行倾斜
|
|
170
|
-
* @supported weapp
|
|
167
|
+
* @supported weapp
|
|
171
168
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skewX.html
|
|
172
169
|
*/
|
|
173
170
|
skewX(
|
|
@@ -175,7 +172,7 @@ declare module '../../index' {
|
|
|
175
172
|
angle: number,
|
|
176
173
|
): Animation
|
|
177
174
|
/** 对 Y 轴坐标进行倾斜
|
|
178
|
-
* @supported weapp
|
|
175
|
+
* @supported weapp
|
|
179
176
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skewY.html
|
|
180
177
|
*/
|
|
181
178
|
skewY(
|
|
@@ -183,7 +180,7 @@ declare module '../../index' {
|
|
|
183
180
|
angle: number,
|
|
184
181
|
): Animation
|
|
185
182
|
/** 平移变换
|
|
186
|
-
* @supported weapp
|
|
183
|
+
* @supported weapp
|
|
187
184
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translate.html
|
|
188
185
|
*/
|
|
189
186
|
translate(
|
|
@@ -193,7 +190,7 @@ declare module '../../index' {
|
|
|
193
190
|
ty?: number,
|
|
194
191
|
): Animation
|
|
195
192
|
/** 对 xyz 坐标进行平移变换
|
|
196
|
-
* @supported weapp
|
|
193
|
+
* @supported weapp
|
|
197
194
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translate3d.html
|
|
198
195
|
*/
|
|
199
196
|
translate3d(
|
|
@@ -205,7 +202,7 @@ declare module '../../index' {
|
|
|
205
202
|
tz?: number,
|
|
206
203
|
): Animation
|
|
207
204
|
/** 对 X 轴平移
|
|
208
|
-
* @supported weapp
|
|
205
|
+
* @supported weapp
|
|
209
206
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateX.html
|
|
210
207
|
*/
|
|
211
208
|
translateX(
|
|
@@ -213,7 +210,7 @@ declare module '../../index' {
|
|
|
213
210
|
translation: number,
|
|
214
211
|
): Animation
|
|
215
212
|
/** 对 Y 轴平移
|
|
216
|
-
* @supported weapp
|
|
213
|
+
* @supported weapp
|
|
217
214
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateY.html
|
|
218
215
|
*/
|
|
219
216
|
translateY(
|
|
@@ -221,7 +218,7 @@ declare module '../../index' {
|
|
|
221
218
|
translation: number,
|
|
222
219
|
): Animation
|
|
223
220
|
/** 对 Z 轴平移
|
|
224
|
-
* @supported weapp
|
|
221
|
+
* @supported weapp
|
|
225
222
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateZ.html
|
|
226
223
|
*/
|
|
227
224
|
translateZ(
|
|
@@ -229,7 +226,7 @@ declare module '../../index' {
|
|
|
229
226
|
translation: number,
|
|
230
227
|
): Animation
|
|
231
228
|
/** 设置透明度
|
|
232
|
-
* @supported weapp
|
|
229
|
+
* @supported weapp
|
|
233
230
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.opacity.html
|
|
234
231
|
*/
|
|
235
232
|
opacity(
|
|
@@ -237,7 +234,7 @@ declare module '../../index' {
|
|
|
237
234
|
value: number,
|
|
238
235
|
): Animation
|
|
239
236
|
/** 设置背景色
|
|
240
|
-
* @supported weapp
|
|
237
|
+
* @supported weapp
|
|
241
238
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.backgroundColor.html
|
|
242
239
|
*/
|
|
243
240
|
backgroundColor(
|
|
@@ -245,7 +242,7 @@ declare module '../../index' {
|
|
|
245
242
|
value: string,
|
|
246
243
|
): Animation
|
|
247
244
|
/** 设置宽度
|
|
248
|
-
* @supported weapp
|
|
245
|
+
* @supported weapp
|
|
249
246
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.width.html
|
|
250
247
|
*/
|
|
251
248
|
width(
|
|
@@ -253,7 +250,7 @@ declare module '../../index' {
|
|
|
253
250
|
value: number | string,
|
|
254
251
|
): Animation
|
|
255
252
|
/** 设置高度
|
|
256
|
-
* @supported weapp
|
|
253
|
+
* @supported weapp
|
|
257
254
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.height.html
|
|
258
255
|
*/
|
|
259
256
|
height(
|
|
@@ -261,7 +258,7 @@ declare module '../../index' {
|
|
|
261
258
|
value: number | string,
|
|
262
259
|
): Animation
|
|
263
260
|
/** 设置 left 值
|
|
264
|
-
* @supported weapp
|
|
261
|
+
* @supported weapp
|
|
265
262
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.left.html
|
|
266
263
|
*/
|
|
267
264
|
left(
|
|
@@ -269,7 +266,7 @@ declare module '../../index' {
|
|
|
269
266
|
value: number | string,
|
|
270
267
|
): Animation
|
|
271
268
|
/** 设置 right 值
|
|
272
|
-
* @supported weapp
|
|
269
|
+
* @supported weapp
|
|
273
270
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.right.html
|
|
274
271
|
*/
|
|
275
272
|
right(
|
|
@@ -277,7 +274,7 @@ declare module '../../index' {
|
|
|
277
274
|
value: number | string,
|
|
278
275
|
): Animation
|
|
279
276
|
/** 设置 top 值
|
|
280
|
-
* @supported weapp
|
|
277
|
+
* @supported weapp
|
|
281
278
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.top.html
|
|
282
279
|
*/
|
|
283
280
|
top(
|
|
@@ -285,7 +282,7 @@ declare module '../../index' {
|
|
|
285
282
|
value: number | string,
|
|
286
283
|
): Animation
|
|
287
284
|
/** 设置 bottom 值
|
|
288
|
-
* @supported weapp
|
|
285
|
+
* @supported weapp
|
|
289
286
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.bottom.html
|
|
290
287
|
*/
|
|
291
288
|
bottom(
|
|
@@ -410,7 +407,7 @@ declare module '../../index' {
|
|
|
410
407
|
|
|
411
408
|
interface TaroStatic {
|
|
412
409
|
/** 创建一个动画实例 [animation](../Animation)。调用实例的方法来描述动画。最后通过动画实例的 export 方法导出动画数据传递给组件的 animation 属性。
|
|
413
|
-
* @supported weapp
|
|
410
|
+
* @supported weapp
|
|
414
411
|
* @example
|
|
415
412
|
* ```tsx
|
|
416
413
|
* var animation = Taro.createAnimation({
|
|
@@ -37,8 +37,7 @@ declare module '../../index' {
|
|
|
37
37
|
|
|
38
38
|
interface TaroStatic {
|
|
39
39
|
/** 动态设置下拉背景字体、loading 图的样式
|
|
40
|
-
* @supported weapp
|
|
41
|
-
* @rn 仅 iOS
|
|
40
|
+
* @supported weapp
|
|
42
41
|
* @example
|
|
43
42
|
* ```tsx
|
|
44
43
|
* Taro.setBackgroundTextStyle({
|
|
@@ -50,8 +49,7 @@ declare module '../../index' {
|
|
|
50
49
|
setBackgroundTextStyle(option: setBackgroundTextStyle.Option): Promise<TaroGeneral.CallbackResult>
|
|
51
50
|
|
|
52
51
|
/** 动态设置窗口的背景色
|
|
53
|
-
* @supported weapp
|
|
54
|
-
* @rn 仅 Android
|
|
52
|
+
* @supported weapp
|
|
55
53
|
* @example
|
|
56
54
|
* ```tsx
|
|
57
55
|
* Taro.setBackgroundColor({
|
|
@@ -7,7 +7,7 @@ declare module '../../index' {
|
|
|
7
7
|
* **说明**
|
|
8
8
|
* 因为自定义组件中的 setData 和 triggerEvent 等接口本身是同步的操作,当这几个接口被连续调用时,都是在一个同步流程中执行完的,因此若逻辑不当可能会导致出错。
|
|
9
9
|
* 一个极端的案例:当父组件的 setData 引发了子组件的 triggerEvent,进而使得父组件又进行了一次 setData,期间有通过 wx:if 语句对子组件进行卸载,就有可能引发奇怪的错误,所以对于不需要在一个同步流程内完成的逻辑,可以使用此接口延迟到下一个时间片再执行。
|
|
10
|
-
* @supported weapp
|
|
10
|
+
* @supported weapp
|
|
11
11
|
* @example
|
|
12
12
|
* ```tsx
|
|
13
13
|
* this.setData({ number: 1 }) // 直接在当前同步流程中执行
|
package/types/api/ui/fonts.d.ts
CHANGED
|
@@ -27,23 +27,16 @@ declare module '../../index' {
|
|
|
27
27
|
}
|
|
28
28
|
/** 可选的字体描述符 */
|
|
29
29
|
interface DescOption {
|
|
30
|
-
/** @supported h5 */
|
|
31
30
|
ascentOverride?: string
|
|
32
|
-
/** @supported h5 */
|
|
33
31
|
descentOverride?: string
|
|
34
|
-
/** @supported h5 */
|
|
35
32
|
featureSettings?: string
|
|
36
|
-
/** @supported h5 */
|
|
37
33
|
lineGapOverride?: string
|
|
38
|
-
/** @supported h5 */
|
|
39
34
|
stretch?: string
|
|
40
35
|
/** 字体样式,可选值为 normal / italic / oblique */
|
|
41
36
|
style?: string
|
|
42
|
-
/** @supported h5 */
|
|
43
37
|
unicodeRange?: string
|
|
44
38
|
/** 设置小型大写字母的字体显示文本,可选值为 normal / small-caps / inherit */
|
|
45
39
|
variant?: string
|
|
46
|
-
/** @supported h5 */
|
|
47
40
|
variationSettings?: string
|
|
48
41
|
/** 字体粗细,可选值为 normal / bold / 100 / 200../ 900 */
|
|
49
42
|
weight?: string
|
|
@@ -59,9 +52,7 @@ declare module '../../index' {
|
|
|
59
52
|
* 3. 字体链接必须是同源下的,或开启了cors支持,小程序的域名是`servicewechat.com`
|
|
60
53
|
* 4. canvas等原生组件不支持使用接口添加的字体
|
|
61
54
|
* 5. 工具里提示 Failed to load font 可以忽略
|
|
62
|
-
* @supported weapp
|
|
63
|
-
* @h5 不支持 global (默认全局加载)
|
|
64
|
-
* @alipay source 地址格式为 `url('https://...')`,而不是单纯 URL 地址
|
|
55
|
+
* @supported weapp
|
|
65
56
|
* @example
|
|
66
57
|
* ```tsx
|
|
67
58
|
* Taro.loadFontFace({
|
|
@@ -160,7 +160,7 @@ declare module '../../index' {
|
|
|
160
160
|
* **注意**
|
|
161
161
|
* - Taro.showLoading 和 Taro.showToast 同时只能显示一个
|
|
162
162
|
* - Taro.showToast 应与 Taro.hideToast 配对使用
|
|
163
|
-
* @supported weapp
|
|
163
|
+
* @supported weapp
|
|
164
164
|
* @example
|
|
165
165
|
* ```tsx
|
|
166
166
|
* Taro.showToast({
|
|
@@ -177,7 +177,7 @@ declare module '../../index' {
|
|
|
177
177
|
* **注意**
|
|
178
178
|
* - Android 6.7.2 以下版本,点击取消或蒙层时,回调 fail, errMsg 为 "fail cancel";
|
|
179
179
|
* - Android 6.7.2 及以上版本 和 iOS 点击蒙层不会关闭模态弹窗,所以尽量避免使用「取消」分支中实现业务逻辑
|
|
180
|
-
* @supported weapp
|
|
180
|
+
* @supported weapp
|
|
181
181
|
* @example
|
|
182
182
|
* ```tsx
|
|
183
183
|
* Taro.showModal({
|
|
@@ -201,7 +201,7 @@ declare module '../../index' {
|
|
|
201
201
|
* **注意**
|
|
202
202
|
* - Taro.showLoading 和 Taro.showToast 同时只能显示一个
|
|
203
203
|
* - Taro.showLoading 应与 Taro.hideLoading 配对使用
|
|
204
|
-
* @supported weapp
|
|
204
|
+
* @supported weapp
|
|
205
205
|
* @example
|
|
206
206
|
* ```tsx
|
|
207
207
|
* Taro.showLoading({
|
|
@@ -220,7 +220,7 @@ declare module '../../index' {
|
|
|
220
220
|
* **注意**
|
|
221
221
|
* - Android 6.7.2 以下版本,点击取消或蒙层时,回调 fail, errMsg 为 "fail cancel";
|
|
222
222
|
* - Android 6.7.2 及以上版本 和 iOS 点击蒙层不会关闭模态弹窗,所以尽量避免使用「取消」分支中实现业务逻辑
|
|
223
|
-
* @supported weapp
|
|
223
|
+
* @supported weapp
|
|
224
224
|
* @example
|
|
225
225
|
* ```tsx
|
|
226
226
|
* Taro.showActionSheet({
|
|
@@ -238,13 +238,13 @@ declare module '../../index' {
|
|
|
238
238
|
showActionSheet(option: showActionSheet.Option): Promise<showActionSheet.SuccessCallbackResult>
|
|
239
239
|
|
|
240
240
|
/** 隐藏消息提示框
|
|
241
|
-
* @supported weapp
|
|
241
|
+
* @supported weapp
|
|
242
242
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.hideToast.html
|
|
243
243
|
*/
|
|
244
244
|
hideToast(option?: hideToast.Option): void
|
|
245
245
|
|
|
246
246
|
/** 隐藏 loading 提示框
|
|
247
|
-
* @supported weapp
|
|
247
|
+
* @supported weapp
|
|
248
248
|
* @example
|
|
249
249
|
* ```tsx
|
|
250
250
|
* 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
|
|
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
|
|
82
|
+
* @supported weapp
|
|
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
|
|
88
|
+
* @supported weapp
|
|
89
89
|
* @example
|
|
90
90
|
* ```tsx
|
|
91
91
|
* Taro.setNavigationBarTitle({
|
|
@@ -97,9 +97,7 @@ declare module '../../index' {
|
|
|
97
97
|
setNavigationBarTitle(option: setNavigationBarTitle.Option): Promise<TaroGeneral.CallbackResult>
|
|
98
98
|
|
|
99
99
|
/** 设置页面导航条颜色
|
|
100
|
-
* @supported weapp
|
|
101
|
-
* @h5 不支持 animation 参数
|
|
102
|
-
* @rn 不支持 animation 参数
|
|
100
|
+
* @supported weapp
|
|
103
101
|
* @example
|
|
104
102
|
* ```tsx
|
|
105
103
|
* Taro.setNavigationBarColor({
|
|
@@ -116,13 +114,13 @@ declare module '../../index' {
|
|
|
116
114
|
setNavigationBarColor(option: setNavigationBarColor.Option): Promise<TaroGeneral.CallbackResult>
|
|
117
115
|
|
|
118
116
|
/** 在当前页面隐藏导航条加载动画
|
|
119
|
-
* @supported weapp
|
|
117
|
+
* @supported weapp
|
|
120
118
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/navigation-bar/wx.hideNavigationBarLoading.html
|
|
121
119
|
*/
|
|
122
120
|
hideNavigationBarLoading(option?: hideNavigationBarLoading.Option): void
|
|
123
121
|
|
|
124
122
|
/** 隐藏返回首页按钮。微信7.0.7版本起,当用户打开的小程序最底层页面是非首页时,默认展示“返回首页”按钮,开发者可在页面 onShow 中调用 hideHomeButton 进行隐藏。
|
|
125
|
-
* @supported weapp
|
|
123
|
+
* @supported weapp
|
|
126
124
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/navigation-bar/wx.hideHomeButton.html
|
|
127
125
|
*/
|
|
128
126
|
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
|
|
28
|
+
* @supported weapp
|
|
29
29
|
* @example
|
|
30
30
|
* ```tsx
|
|
31
31
|
* onPullDownRefresh: function (){
|
|
@@ -37,8 +37,7 @@ declare module '../../index' {
|
|
|
37
37
|
stopPullDownRefresh(option?: stopPullDownRefresh.Option): void
|
|
38
38
|
|
|
39
39
|
/** 开始下拉刷新。调用后触发下拉刷新动画,效果与用户手动下拉刷新一致。
|
|
40
|
-
* @supported weapp
|
|
41
|
-
* @rn 无动画效果
|
|
40
|
+
* @supported weapp
|
|
42
41
|
* @example
|
|
43
42
|
* ```tsx
|
|
44
43
|
* Taro.startPullDownRefresh()
|
package/types/api/ui/scroll.d.ts
CHANGED
|
@@ -54,14 +54,13 @@ declare module '../../index' {
|
|
|
54
54
|
decelerationDisabled: boolean
|
|
55
55
|
|
|
56
56
|
/** 滚动至指定位置
|
|
57
|
-
* @supported weapp
|
|
58
|
-
* @h5 不支持 velocity 参数
|
|
57
|
+
* @supported weapp
|
|
59
58
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/scroll/ScrollViewContext.scrollTo.html
|
|
60
59
|
*/
|
|
61
60
|
scrollTo(object: ScrollViewContext.scrollTo.Option): void
|
|
62
61
|
|
|
63
62
|
/** 滚动至指定位置
|
|
64
|
-
* @supported weapp
|
|
63
|
+
* @supported weapp
|
|
65
64
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/scroll/ScrollViewContext.scrollIntoView.html
|
|
66
65
|
*/
|
|
67
66
|
scrollIntoView(
|
|
@@ -99,7 +98,7 @@ declare module '../../index' {
|
|
|
99
98
|
* - 后代选择器:.the-ancestor .the-descendant
|
|
100
99
|
* - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant
|
|
101
100
|
* - 多选择器的并集:#a-node, .some-other-nodes
|
|
102
|
-
* @supported weapp
|
|
101
|
+
* @supported weapp
|
|
103
102
|
* @example
|
|
104
103
|
* ```tsx
|
|
105
104
|
* Taro.pageScrollTo({
|
|
@@ -121,19 +121,19 @@ declare module '../../index' {
|
|
|
121
121
|
|
|
122
122
|
interface TaroStatic {
|
|
123
123
|
/** 显示 tabBar 某一项的右上角的红点
|
|
124
|
-
* @supported weapp
|
|
124
|
+
* @supported weapp
|
|
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
|
|
130
|
+
* @supported weapp
|
|
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
|
|
136
|
+
* @supported weapp
|
|
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
|
|
151
|
+
* @supported weapp
|
|
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
|
|
166
|
+
* @supported weapp
|
|
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
|
|
179
|
+
* @supported weapp
|
|
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
|
|
185
|
+
* @supported weapp
|
|
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
|
|
191
|
+
* @supported weapp
|
|
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>
|
package/types/api/ui/window.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ declare module '../../index' {
|
|
|
44
44
|
setWindowSize(option: setWindowSize.Option): Promise<TaroGeneral.CallbackResult>
|
|
45
45
|
|
|
46
46
|
/** 监听窗口尺寸变化事件
|
|
47
|
-
* @supported weapp
|
|
47
|
+
* @supported weapp
|
|
48
48
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/window/wx.onWindowResize.html
|
|
49
49
|
*/
|
|
50
50
|
onWindowResize(
|
|
@@ -53,7 +53,7 @@ declare module '../../index' {
|
|
|
53
53
|
): void
|
|
54
54
|
|
|
55
55
|
/** 取消监听窗口尺寸变化事件
|
|
56
|
-
* @supported weapp
|
|
56
|
+
* @supported weapp
|
|
57
57
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/window/wx.offWindowResize.html
|
|
58
58
|
*/
|
|
59
59
|
offWindowResize(
|