@tarojs/taro 4.0.0-canary.8 → 4.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/package.json +38 -17
- package/types/api/base/debug.d.ts +8 -8
- package/types/api/base/env.d.ts +2 -2
- package/types/api/base/index.d.ts +3 -3
- package/types/api/base/performance.d.ts +1 -1
- package/types/api/base/system.d.ts +6 -6
- package/types/api/base/weapp/app-event.d.ts +10 -10
- package/types/api/base/weapp/life-cycle.d.ts +1 -1
- package/types/api/canvas/index.d.ts +367 -63
- package/types/api/device/battery.d.ts +1 -1
- package/types/api/device/clipboard.d.ts +2 -2
- package/types/api/device/keyboard.d.ts +1 -1
- package/types/api/device/network.d.ts +3 -3
- package/types/api/device/phone.d.ts +1 -1
- package/types/api/device/screen.d.ts +2 -2
- package/types/api/files/index.d.ts +7 -7
- package/types/api/framework/index.d.ts +2 -2
- package/types/api/location/index.d.ts +4 -4
- package/types/api/media/audio.d.ts +21 -12
- package/types/api/media/background-audio.d.ts +1 -1
- package/types/api/media/image.d.ts +10 -10
- package/types/api/media/video.d.ts +11 -11
- package/types/api/navigate/index.d.ts +1 -1
- package/types/api/network/download.d.ts +5 -5
- package/types/api/network/request.d.ts +8 -8
- package/types/api/network/upload.d.ts +7 -7
- package/types/api/network/websocket.d.ts +8 -8
- package/types/api/open-api/account.d.ts +1 -1
- package/types/api/open-api/address.d.ts +13 -5
- package/types/api/open-api/authorize.d.ts +1 -1
- package/types/api/open-api/channels.d.ts +16 -0
- package/types/api/open-api/device-voip.d.ts +40 -0
- package/types/api/open-api/invoice.d.ts +1 -1
- package/types/api/open-api/login.d.ts +15 -2
- package/types/api/open-api/privacy.d.ts +8 -0
- package/types/api/open-api/settings.d.ts +3 -2
- package/types/api/open-api/sticker.d.ts +83 -0
- package/types/api/open-api/subscribe-message.d.ts +148 -6
- package/types/api/open-api/user-info.d.ts +6 -1
- package/types/api/qq/index.d.ts +306 -1
- package/types/api/route/index.d.ts +5 -5
- package/types/api/storage/index.d.ts +10 -10
- package/types/api/swan/bookshelf.d.ts +307 -0
- package/types/api/swan/download-package.d.ts +80 -0
- package/types/api/swan/index.d.ts +151 -0
- package/types/api/swan/pay.d.ts +139 -0
- package/types/api/taro.extend.d.ts +3 -2
- package/types/api/taro.hooks.d.ts +9 -9
- package/types/api/ui/animation.d.ts +32 -32
- package/types/api/ui/custom-component.d.ts +1 -1
- package/types/api/ui/fonts.d.ts +1 -1
- 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 +2 -2
- package/types/api/ui/pull-down-refresh.d.ts +2 -2
- package/types/api/ui/scroll.d.ts +1 -1
- 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 +30 -24
- package/types/compile/compiler.d.ts +6 -2
- package/types/compile/config/h5.d.ts +9 -4
- package/types/compile/config/harmony.d.ts +43 -7
- package/types/compile/config/index.d.ts +1 -0
- package/types/compile/config/mini.d.ts +2 -16
- package/types/compile/config/project.d.ts +26 -8
- package/types/compile/config/rn.d.ts +22 -1
- package/types/compile/index.d.ts +8 -0
- package/types/compile/viteCompilerContext.d.ts +7 -3
- package/types/global.d.ts +2 -1
- package/types/index.d.ts +91 -46
- package/types/taro.api.d.ts +22 -14
- package/types/taro.component.d.ts +3 -0
- package/types/taro.config.d.ts +13 -4
- package/types/taro.lifecycle.d.ts +3 -0
- package/types/taro.runtime.d.ts +9 -0
|
@@ -47,6 +47,7 @@ declare module '../index' {
|
|
|
47
47
|
[TaroGeneral.ENV_TYPE.RN]: TaroGeneral.ENV_TYPE.RN
|
|
48
48
|
[TaroGeneral.ENV_TYPE.HARMONY]: TaroGeneral.ENV_TYPE.HARMONY
|
|
49
49
|
[TaroGeneral.ENV_TYPE.QUICKAPP]: TaroGeneral.ENV_TYPE.QUICKAPP
|
|
50
|
+
[TaroGeneral.ENV_TYPE.HARMONYHYBRID]: TaroGeneral.ENV_TYPE.HARMONYHYBRID
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
namespace interceptorify {
|
|
@@ -99,7 +100,7 @@ declare module '../index' {
|
|
|
99
100
|
}): void
|
|
100
101
|
|
|
101
102
|
/** 小程序获取和 Taro 相关的 App 信息
|
|
102
|
-
* @supported weapp, alipay, jd, qq, swan, tt, h5, harmony
|
|
103
|
+
* @supported weapp, alipay, jd, qq, swan, tt, h5, harmony, harmony_hybrid
|
|
103
104
|
*/
|
|
104
105
|
getAppInfo(): getAppInfo.AppInfo
|
|
105
106
|
|
|
@@ -146,7 +147,7 @@ declare module '../index' {
|
|
|
146
147
|
Current: getCurrentInstance.Current
|
|
147
148
|
|
|
148
149
|
/** Vue3 插件,用于设置 `getApp()` 中的全局变量
|
|
149
|
-
* @supported weapp, alipay, h5, rn, jd, qq, swan, tt, quickapp
|
|
150
|
+
* @supported weapp, alipay, h5, rn, jd, qq, swan, tt, quickapp, harmony_hybrid
|
|
150
151
|
* @example
|
|
151
152
|
* ```js
|
|
152
153
|
* // 使用插件
|
|
@@ -46,7 +46,7 @@ declare module '../index' {
|
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* 当前是 tab 页时,tab 被点击时的回调。
|
|
49
|
-
* @supported weapp, h5, rn
|
|
49
|
+
* @supported weapp, h5, rn, harmony_hybrid
|
|
50
50
|
*/
|
|
51
51
|
useTabItemTap(callback: (payload: TabItemTapObject) => void): void
|
|
52
52
|
|
|
@@ -73,45 +73,45 @@ declare module '../index' {
|
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* 小程序初始化完成时的回调。
|
|
76
|
-
* @supported weapp, h5
|
|
76
|
+
* @supported weapp, h5, harmony_hybrid
|
|
77
77
|
*/
|
|
78
78
|
useLaunch(callback: (options: getLaunchOptionsSync.LaunchOptions) => void): void
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* 小程序发生脚本错误或 API 调用报错时触发的回调。
|
|
82
|
-
* @supported weapp, h5
|
|
82
|
+
* @supported weapp, h5, harmony_hybrid
|
|
83
83
|
*/
|
|
84
84
|
useError(callback: (error: string) => void): void
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* 小程序有未处理的 Promise reject 时触发。也可以使用 Taro.onUnhandledRejection 绑定监听。
|
|
88
|
-
* @supported weapp, alipay, h5
|
|
88
|
+
* @supported weapp, alipay, h5, harmony_hybrid
|
|
89
89
|
*/
|
|
90
90
|
useUnhandledRejection(callback: (error: { reason: Error, promise: Promise<Error> }) => void): void
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* 小程序要打开的页面不存在时触发的回调。
|
|
94
|
-
* @supported weapp, h5
|
|
94
|
+
* @supported weapp, h5, harmony_hybrid
|
|
95
95
|
* @h5 多页面模式不支持该方法
|
|
96
96
|
*/
|
|
97
97
|
usePageNotFound(callback: (res: { path: string, query: Record<any, any>, isEntryPage: boolean, [key: string]: any }) => void): void
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* 页面加载完成时的回调。
|
|
101
|
-
* @supported weapp, h5
|
|
101
|
+
* @supported weapp, h5, harmony_hybrid
|
|
102
102
|
*/
|
|
103
103
|
useLoad<T extends {} = Record<string, any>>(callback: (param: T) => void): void
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* 页面卸载时的回调。
|
|
107
|
-
* @supported weapp, h5
|
|
107
|
+
* @supported weapp, h5, harmony_hybrid
|
|
108
108
|
*/
|
|
109
109
|
useUnload(callback: () => void): void
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
112
|
* 页面初次渲染完成的回调。
|
|
113
113
|
* 此时页面已经准备妥当,可以和视图层进行交互。
|
|
114
|
-
* @supported weapp, h5
|
|
114
|
+
* @supported weapp, h5, harmony_hybrid
|
|
115
115
|
*/
|
|
116
116
|
useReady(callback: () => void): void
|
|
117
117
|
|
|
@@ -135,7 +135,7 @@ declare module '../index' {
|
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* 下拉中断时的回调。
|
|
138
|
-
* @supported alipay, h5
|
|
138
|
+
* @supported alipay, h5, harmony_hybrid
|
|
139
139
|
*/
|
|
140
140
|
usePullIntercept(callback: () => void): void
|
|
141
141
|
}
|
|
@@ -38,34 +38,34 @@ declare module '../../index' {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/** 动画对象
|
|
41
|
-
* @supported weapp, h5, tt
|
|
41
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
46
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
53
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
58
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
63
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
68
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
76
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
90
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
98
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
106
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
114
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
124
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
136
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
144
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
152
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
160
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
170
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
178
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
186
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
196
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
208
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
216
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
224
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
232
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
240
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
248
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
256
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
264
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
272
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
280
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt
|
|
288
|
+
* @supported weapp, h5, tt, harmony_hybrid
|
|
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, tt, h5, harmony
|
|
413
|
+
* @supported weapp, tt, h5, harmony, harmony_hybrid
|
|
414
414
|
* @example
|
|
415
415
|
* ```tsx
|
|
416
416
|
* var animation = Taro.createAnimation({
|
|
@@ -7,7 +7,7 @@ declare module '../../index' {
|
|
|
7
7
|
* **说明**
|
|
8
8
|
* 因为自定义组件中的 setData 和 triggerEvent 等接口本身是同步的操作,当这几个接口被连续调用时,都是在一个同步流程中执行完的,因此若逻辑不当可能会导致出错。
|
|
9
9
|
* 一个极端的案例:当父组件的 setData 引发了子组件的 triggerEvent,进而使得父组件又进行了一次 setData,期间有通过 wx:if 语句对子组件进行卸载,就有可能引发奇怪的错误,所以对于不需要在一个同步流程内完成的逻辑,可以使用此接口延迟到下一个时间片再执行。
|
|
10
|
-
* @supported weapp, h5
|
|
10
|
+
* @supported weapp, h5, harmony_hybrid
|
|
11
11
|
* @example
|
|
12
12
|
* ```tsx
|
|
13
13
|
* this.setData({ number: 1 }) // 直接在当前同步流程中执行
|
package/types/api/ui/fonts.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ declare module '../../index' {
|
|
|
59
59
|
* 3. 字体链接必须是同源下的,或开启了cors支持,小程序的域名是`servicewechat.com`
|
|
60
60
|
* 4. canvas等原生组件不支持使用接口添加的字体
|
|
61
61
|
* 5. 工具里提示 Failed to load font 可以忽略
|
|
62
|
-
* @supported weapp, alipay, h5
|
|
62
|
+
* @supported weapp, alipay, h5, harmony_hybrid
|
|
63
63
|
* @h5 不支持 global (默认全局加载)
|
|
64
64
|
* @alipay source 地址格式为 `url('https://...')`,而不是单纯 URL 地址
|
|
65
65
|
* @example
|
|
@@ -160,7 +160,7 @@ declare module '../../index' {
|
|
|
160
160
|
* **注意**
|
|
161
161
|
* - Taro.showLoading 和 Taro.showToast 同时只能显示一个
|
|
162
162
|
* - Taro.showToast 应与 Taro.hideToast 配对使用
|
|
163
|
-
* @supported weapp, h5, rn, tt, harmony
|
|
163
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
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, h5, rn, tt, harmony
|
|
180
|
+
* @supported weapp, swan, h5, rn, tt, harmony, harmony_hybrid
|
|
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, h5, rn, tt
|
|
204
|
+
* @supported weapp, h5, rn, tt, harmony_hybrid
|
|
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, h5, rn, tt, harmony
|
|
223
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
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, h5, rn, tt,
|
|
241
|
+
* @supported weapp, h5, rn, tt, harmony_hybrid
|
|
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, h5, rn, tt
|
|
247
|
+
* @supported weapp, h5, rn, tt, harmony_hybrid
|
|
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, tt
|
|
24
|
+
* @supported weapp, tt, harmony_hybrid
|
|
25
25
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/menu/wx.getMenuButtonBoundingClientRect.html
|
|
26
26
|
*/
|
|
27
27
|
getMenuButtonBoundingClientRect(): getMenuButtonBoundingClientRect.Rect
|
|
@@ -85,7 +85,7 @@ declare module '../../index' {
|
|
|
85
85
|
showNavigationBarLoading(option?: showNavigationBarLoading.Option): void
|
|
86
86
|
|
|
87
87
|
/** 动态设置当前页面的标题
|
|
88
|
-
* @supported weapp, alipay, tt, h5, rn, harmony
|
|
88
|
+
* @supported weapp, alipay, tt, h5, rn, harmony, harmony_hybrid
|
|
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, tt, h5, rn, harmony
|
|
100
|
+
* @supported weapp, tt, h5, rn, harmony, harmony_hybrid
|
|
101
101
|
* @h5 不支持 animation 参数
|
|
102
102
|
* @rn 不支持 animation 参数
|
|
103
103
|
* @example
|
|
@@ -25,7 +25,7 @@ declare module '../../index' {
|
|
|
25
25
|
|
|
26
26
|
interface TaroStatic {
|
|
27
27
|
/** 停止当前页面下拉刷新。
|
|
28
|
-
* @supported weapp, h5, rn, tt, harmony
|
|
28
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
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, tt, harmony
|
|
40
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
41
41
|
* @rn 无动画效果
|
|
42
42
|
* @example
|
|
43
43
|
* ```tsx
|
package/types/api/ui/scroll.d.ts
CHANGED
|
@@ -99,7 +99,7 @@ declare module '../../index' {
|
|
|
99
99
|
* - 后代选择器:.the-ancestor .the-descendant
|
|
100
100
|
* - 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant
|
|
101
101
|
* - 多选择器的并集:#a-node, .some-other-nodes
|
|
102
|
-
* @supported weapp, h5, rn, tt, harmony
|
|
102
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
103
103
|
* @example
|
|
104
104
|
* ```tsx
|
|
105
105
|
* Taro.pageScrollTo({
|
|
@@ -121,19 +121,19 @@ declare module '../../index' {
|
|
|
121
121
|
|
|
122
122
|
interface TaroStatic {
|
|
123
123
|
/** 显示 tabBar 某一项的右上角的红点
|
|
124
|
-
* @supported weapp, h5, rn, tt, harmony
|
|
124
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
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, tt, harmony
|
|
130
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
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, tt
|
|
136
|
+
* @supported weapp, h5, rn, tt, harmony_hybrid
|
|
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, tt, harmony
|
|
151
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
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, tt, harmony
|
|
166
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
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, tt, harmony
|
|
179
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
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, tt, harmony
|
|
185
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
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, tt, harmony
|
|
191
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
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, h5, rn
|
|
47
|
+
* @supported weapp, h5, rn, harmony_hybrid
|
|
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, h5, rn
|
|
56
|
+
* @supported weapp, h5, rn, harmony_hybrid
|
|
57
57
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/window/wx.offWindowResize.html
|
|
58
58
|
*/
|
|
59
59
|
offWindowResize(
|