@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
package/types/api/qq/index.d.ts
CHANGED
|
@@ -21,9 +21,148 @@ declare module '../../index' {
|
|
|
21
21
|
type MediaType = 'photo' | 'video'
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
namespace getQQRunData {
|
|
25
|
+
interface Option {
|
|
26
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
27
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
28
|
+
/** 接口调用失败的回调函数 */
|
|
29
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
30
|
+
/** 接口调用成功的回调函数 */
|
|
31
|
+
success?: (result: SuccessCallbackResult) => void
|
|
32
|
+
}
|
|
33
|
+
interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
|
|
34
|
+
/**
|
|
35
|
+
* 包括敏感数据在内的完整用户信息的加密数据,详细见加密数据解密算法。
|
|
36
|
+
*/
|
|
37
|
+
encryptedData: string
|
|
38
|
+
/**
|
|
39
|
+
* 加密算法的初始向量,详细见加密数据解密算法
|
|
40
|
+
*/
|
|
41
|
+
iv: string
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
namespace setOfficialDress {
|
|
46
|
+
interface Option {
|
|
47
|
+
/** 方法名,设置头像填"setAvatar",其他方法后续开放 */
|
|
48
|
+
action: string
|
|
49
|
+
/** openid,给自己设置头像填"self" */
|
|
50
|
+
uin: string
|
|
51
|
+
/** 物品id */
|
|
52
|
+
item_id?: string
|
|
53
|
+
/** 设置头像"setAvatar"此处不用填 */
|
|
54
|
+
busi_info?: string
|
|
55
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
56
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
57
|
+
/** 接口调用失败的回调函数 */
|
|
58
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
59
|
+
/** 接口调用成功的回调函数 */
|
|
60
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
namespace setCustomDress {
|
|
65
|
+
interface Option {
|
|
66
|
+
/** 方法名,设置头像填"uploadAvatar",其他方法后续开放 */
|
|
67
|
+
action: string
|
|
68
|
+
/** 素材路径,必须为本地文件,路径为 wxfile:// 的形式 */
|
|
69
|
+
path: string
|
|
70
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
71
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
72
|
+
/** 接口调用失败的回调函数 */
|
|
73
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
74
|
+
/** 接口调用成功的回调函数 */
|
|
75
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
namespace updateQQApp {
|
|
80
|
+
interface Option {
|
|
81
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
82
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
83
|
+
/** 接口调用失败的回调函数 */
|
|
84
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
85
|
+
/** 接口调用成功的回调函数 */
|
|
86
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
namespace addRecentColorSign {
|
|
91
|
+
interface Option {
|
|
92
|
+
/**
|
|
93
|
+
* 做为点击最近彩签打开的小程序页面的启动参数,如 a=1&b=2
|
|
94
|
+
* 默认值:当前页面的查询参数
|
|
95
|
+
*/
|
|
96
|
+
query?: string
|
|
97
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
98
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
99
|
+
/** 接口调用失败的回调函数 */
|
|
100
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
101
|
+
/** 接口调用成功的回调函数 */
|
|
102
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
namespace getGuildInfo {
|
|
107
|
+
interface Option {
|
|
108
|
+
/** 频道id */
|
|
109
|
+
open_guild_id: string
|
|
110
|
+
/** 子频道Id */
|
|
111
|
+
channel_id?: string
|
|
112
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
113
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
114
|
+
/** 接口调用失败的回调函数 */
|
|
115
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
116
|
+
/** 接口调用成功的回调函数 */
|
|
117
|
+
success?: (res: SuccessCallbackResult) => void
|
|
118
|
+
}
|
|
119
|
+
interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
|
|
120
|
+
/** 加密之后的数据,需要解密 */
|
|
121
|
+
encryptedData: string
|
|
122
|
+
/** 对称解密算法初始向量(base64) */
|
|
123
|
+
iv: string
|
|
124
|
+
/** 签名(base64) */
|
|
125
|
+
signature: string
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
namespace applyAddToMyApps {
|
|
130
|
+
interface Option {
|
|
131
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
132
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
133
|
+
/** 接口调用失败的回调函数 */
|
|
134
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
135
|
+
/** 接口调用成功的回调函数 */
|
|
136
|
+
success?: (res: SuccessCallbackResult) => void
|
|
137
|
+
}
|
|
138
|
+
interface SuccessCallbackResult {
|
|
139
|
+
/** true 代表用户选择了同意 */
|
|
140
|
+
confirm: boolean
|
|
141
|
+
/** true 代表用户选择了不同意 */
|
|
142
|
+
cancel: boolean
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
namespace isAddedToMyApps {
|
|
147
|
+
interface Option {
|
|
148
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
149
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
150
|
+
/** 接口调用失败的回调函数 */
|
|
151
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
152
|
+
/** 接口调用成功的回调函数 */
|
|
153
|
+
success?: (res: SuccessCallbackResult) => void
|
|
154
|
+
}
|
|
155
|
+
interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
|
|
156
|
+
/** true 代表用户已经添加,false 则还没添加 */
|
|
157
|
+
isAdded: boolean
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
24
161
|
interface TaroStatic {
|
|
25
162
|
/**
|
|
26
163
|
* 此接口可打开手Q说说发表界面,并将文字内容和图片/视频内容传递到手Q说说发表界面。
|
|
164
|
+
* @supported qq
|
|
165
|
+
* @example
|
|
27
166
|
* ```tsx
|
|
28
167
|
* Taro.openQzonePublish({
|
|
29
168
|
* footnote: '使用同款滤镜',
|
|
@@ -41,9 +180,175 @@ declare module '../../index' {
|
|
|
41
180
|
* ]
|
|
42
181
|
* })
|
|
43
182
|
* ```
|
|
44
|
-
* @supported qq
|
|
45
183
|
* @see https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_openQzonePublish.html
|
|
46
184
|
*/
|
|
47
185
|
openQzonePublish(option: openQzonePublish.Option): void
|
|
186
|
+
/**
|
|
187
|
+
* 获取用户过去三十天QQ运动步数。需要先调用 qq.login 接口。步数信息会在用户主动进入小程序时更新。
|
|
188
|
+
* @supported qq
|
|
189
|
+
* @example
|
|
190
|
+
* ```tsx
|
|
191
|
+
* Taro.getQQRunData({
|
|
192
|
+
* success(res) {
|
|
193
|
+
* // 拿 encryptedData 到开发者后台解密开放数据
|
|
194
|
+
* const encryptedData = res.encryptedData
|
|
195
|
+
* }
|
|
196
|
+
* })
|
|
197
|
+
* ```
|
|
198
|
+
*
|
|
199
|
+
* **开放数据 JSON 结构**
|
|
200
|
+
* 敏感数据有两种获取方式,一是使用 加密数据解密算法 。 获取得到的开放数据为以下 json 结构:
|
|
201
|
+
*
|
|
202
|
+
* ```json
|
|
203
|
+
* {
|
|
204
|
+
* "stepInfoList": [
|
|
205
|
+
* {
|
|
206
|
+
* "timestamp": 1445866601,
|
|
207
|
+
* "step": 100
|
|
208
|
+
* },
|
|
209
|
+
* {
|
|
210
|
+
* "timestamp": 1445876601,
|
|
211
|
+
* "step": 120
|
|
212
|
+
* }
|
|
213
|
+
* ]
|
|
214
|
+
* }
|
|
215
|
+
* ```
|
|
216
|
+
* * stepInfoList 中,每一项结构如下:
|
|
217
|
+
*
|
|
218
|
+
* | 属性 | 类型 | 说明 |
|
|
219
|
+
* | --- | ---- | --- |
|
|
220
|
+
* | timestamp | number | 时间戳,表示数据对应的时间 |
|
|
221
|
+
* | step | number | QQ运动步数 |
|
|
222
|
+
*
|
|
223
|
+
* @see https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_sport.html
|
|
224
|
+
*/
|
|
225
|
+
getQQRunData(option: getQQRunData.Option): void
|
|
226
|
+
/**
|
|
227
|
+
* QQ美化平台内测阶段,仅被邀请的商户可使用此接口。
|
|
228
|
+
* @supported qq
|
|
229
|
+
* @example
|
|
230
|
+
* ```tsx
|
|
231
|
+
* Taro.setOfficialDress({
|
|
232
|
+
* action: "setAvatar",
|
|
233
|
+
* uin: "self",
|
|
234
|
+
* item_id: "2740",
|
|
235
|
+
* success(res) {
|
|
236
|
+
* console.log("success"+res);
|
|
237
|
+
* },
|
|
238
|
+
* fail(res) {
|
|
239
|
+
* console.log("fail"+res);
|
|
240
|
+
* }
|
|
241
|
+
* })
|
|
242
|
+
* ```
|
|
243
|
+
* @see https://q.qq.com/wiki/develop/miniprogram/API/open_port/personalize.html#qq-setofficialdress
|
|
244
|
+
*/
|
|
245
|
+
setOfficialDress(option: setOfficialDress.Option): void
|
|
246
|
+
/**
|
|
247
|
+
* QQ美化平台内测阶段,仅被邀请的商户可使用此接口。
|
|
248
|
+
* @supported qq
|
|
249
|
+
* @example
|
|
250
|
+
* ```tsx
|
|
251
|
+
* Taro.setCustomDress({
|
|
252
|
+
* action: "uploadAvatar",
|
|
253
|
+
* path:"wxfile://images/1.png"
|
|
254
|
+
* success(res) {
|
|
255
|
+
* console.log("success"+res);
|
|
256
|
+
* },
|
|
257
|
+
* fail(res) {
|
|
258
|
+
* console.log("fail"+res);
|
|
259
|
+
* }
|
|
260
|
+
* })
|
|
261
|
+
* ```
|
|
262
|
+
* @see https://q.qq.com/wiki/develop/miniprogram/API/open_port/personalize.html#qq-setcustomdress
|
|
263
|
+
*/
|
|
264
|
+
setCustomDress(option: setCustomDress.Option): void
|
|
265
|
+
/**
|
|
266
|
+
* 更新 QQ 版本
|
|
267
|
+
* @supported qq
|
|
268
|
+
* @example
|
|
269
|
+
* ```tsx
|
|
270
|
+
* Taro.updateQQApp({
|
|
271
|
+
* success: function(res) {
|
|
272
|
+
* console.log('updateQQApp success',res)
|
|
273
|
+
* },
|
|
274
|
+
* fail: function(err) {
|
|
275
|
+
* console.log('updateQQApp fail',err)
|
|
276
|
+
* },
|
|
277
|
+
* complete: function(res) {
|
|
278
|
+
* console.log('updateQQApp info',res)
|
|
279
|
+
* }
|
|
280
|
+
* })
|
|
281
|
+
* ```
|
|
282
|
+
* @see https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_updateQQ.html#qq-updateqqapp
|
|
283
|
+
*/
|
|
284
|
+
updateQQApp(option: updateQQApp.Option): void
|
|
285
|
+
/**
|
|
286
|
+
* 添加当前小程序页面到最近浏览彩签,需要授权基础库 1.20.0 开始支持。
|
|
287
|
+
* 提示:在手 Q 8.9.0 前的版本,当系统未授予手 Q 悬浮穿权限时,每次调用该接口都会弹出系统授权窗口。自手 Q 8.9.0 起交互调整如下:
|
|
288
|
+
* 1. 系统没有授予手 Q 悬浮窗权限时,接口执行 fail 回调函数并附带 ”No floating window permission“的错误信息,开发者可针对此信息在业务代码里弹窗提示用户手动授予手 Q 悬浮窗权限。
|
|
289
|
+
* 2. 安卓系统部分机型存在获取悬浮窗权限不准确情况。
|
|
290
|
+
* @supported qq
|
|
291
|
+
* @example
|
|
292
|
+
* ```tsx
|
|
293
|
+
* Taro.addRecentColorSign({
|
|
294
|
+
* query: 'a=1&b=2',
|
|
295
|
+
* success(res) {
|
|
296
|
+
* console.log('addRecentColorSign success: ', res)
|
|
297
|
+
* },
|
|
298
|
+
* fail(err) {
|
|
299
|
+
* console.log('addRecentColorSign fail: ', err)
|
|
300
|
+
* },
|
|
301
|
+
* complete(res) {
|
|
302
|
+
* console.log('addRecentColorSign complete: ', res)
|
|
303
|
+
* }
|
|
304
|
+
* })
|
|
305
|
+
* ```
|
|
306
|
+
* @see https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_addColorSign.html#qq-addrecentcolorsign
|
|
307
|
+
*/
|
|
308
|
+
addRecentColorSign(option: addRecentColorSign.Option): void
|
|
309
|
+
/**
|
|
310
|
+
* 获取频道信息与当前人身份(FOR 机器人服务入口)
|
|
311
|
+
* @supported qq
|
|
312
|
+
* @see https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_guild.html
|
|
313
|
+
*/
|
|
314
|
+
getGuildInfo(option: getGuildInfo.Option): void
|
|
315
|
+
/**
|
|
316
|
+
* 申请用户将本小程序添加到下拉页面中“我的小程序”当中,手Q8.9.13及以上版本支持
|
|
317
|
+
* @supported qq
|
|
318
|
+
* @example
|
|
319
|
+
* ```tsx
|
|
320
|
+
* Taro.applyAddToMyApps({
|
|
321
|
+
* success(res) {
|
|
322
|
+
* if (res.confirm) {
|
|
323
|
+
* // 用户同意添加
|
|
324
|
+
* }
|
|
325
|
+
* if (res.cancel) {
|
|
326
|
+
* // 用户不同意添加
|
|
327
|
+
* }
|
|
328
|
+
* // 原则上,confirm和cancel是互斥的
|
|
329
|
+
* }
|
|
330
|
+
* })
|
|
331
|
+
* ```
|
|
332
|
+
* @see https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_addToMyApps.html#qq-applyaddtomyapps
|
|
333
|
+
*/
|
|
334
|
+
applyAddToMyApps(option: applyAddToMyApps.Option): void
|
|
335
|
+
/**
|
|
336
|
+
* 查询用户是否已经将本小程序添加到下拉页面中“我的小程序”当中,手Q8.9.13及以上版本支持,建议使用qq.applyAddToMyApps之前先调用qq.isAddedToMyApps来作前置判断
|
|
337
|
+
* @supported qq
|
|
338
|
+
* @example
|
|
339
|
+
* ```tsx
|
|
340
|
+
* Taro.isAddedToMyApps({
|
|
341
|
+
* success(res) {
|
|
342
|
+
* if (res.isAdded) {
|
|
343
|
+
* // 用户已经添加
|
|
344
|
+
* } else {
|
|
345
|
+
* // 用户还未添加
|
|
346
|
+
* }
|
|
347
|
+
* }
|
|
348
|
+
* })
|
|
349
|
+
* ```
|
|
350
|
+
* @see https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_addToMyApps.html#qq-isaddedtomyapps
|
|
351
|
+
*/
|
|
352
|
+
isAddedToMyApps(option: isAddedToMyApps.Option): void
|
|
48
353
|
}
|
|
49
354
|
}
|
|
@@ -117,7 +117,7 @@ declare module '../../index' {
|
|
|
117
117
|
|
|
118
118
|
interface TaroStatic {
|
|
119
119
|
/** 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面
|
|
120
|
-
* @supported weapp, h5, rn, tt, harmony
|
|
120
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
121
121
|
* @example
|
|
122
122
|
* ```json
|
|
123
123
|
* {
|
|
@@ -143,7 +143,7 @@ declare module '../../index' {
|
|
|
143
143
|
switchTab(option: switchTab.Option): Promise<TaroGeneral.CallbackResult>
|
|
144
144
|
|
|
145
145
|
/** 关闭所有页面,打开到应用内的某个页面
|
|
146
|
-
* @supported weapp, h5, rn, tt, harmony
|
|
146
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
147
147
|
* @example
|
|
148
148
|
* ```tsx
|
|
149
149
|
* Taro.reLaunch({
|
|
@@ -155,7 +155,7 @@ declare module '../../index' {
|
|
|
155
155
|
reLaunch(option: reLaunch.Option): Promise<TaroGeneral.CallbackResult>
|
|
156
156
|
|
|
157
157
|
/** 关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面。
|
|
158
|
-
* @supported weapp, h5, rn, tt, harmony
|
|
158
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
159
159
|
* @h5 未针对 tabbar 页面做限制处理
|
|
160
160
|
* @example
|
|
161
161
|
* ```tsx
|
|
@@ -168,7 +168,7 @@ declare module '../../index' {
|
|
|
168
168
|
redirectTo(option: redirectTo.Option): Promise<TaroGeneral.CallbackResult>
|
|
169
169
|
|
|
170
170
|
/** 保留当前页面,跳转到应用内的某个页面。但是不能跳到 tabbar 页面。使用 Taro.navigateBack 可以返回到原页面。小程序中页面栈最多十层。
|
|
171
|
-
* @supported weapp, h5, rn, tt, harmony
|
|
171
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
172
172
|
* @h5 未针对 tabbar 页面做限制处理
|
|
173
173
|
* @example
|
|
174
174
|
* ```tsx
|
|
@@ -195,7 +195,7 @@ declare module '../../index' {
|
|
|
195
195
|
navigateTo(option: navigateTo.Option): Promise<TaroGeneral.CallbackResult>
|
|
196
196
|
|
|
197
197
|
/** 关闭当前页面,返回上一页面或多级页面。可通过 getCurrentPages 获取当前的页面栈,决定需要返回几层。
|
|
198
|
-
* @supported weapp, h5, rn, tt, harmony
|
|
198
|
+
* @supported weapp, h5, rn, tt, harmony, harmony_hybrid
|
|
199
199
|
* @h5 若入参 delta 大于现有页面数时,返回应用打开的第一个页面(如果想要返回首页请使用 reLaunch 方法)。
|
|
200
200
|
* @example
|
|
201
201
|
* ```tsx
|
|
@@ -153,7 +153,7 @@ declare module '../../index' {
|
|
|
153
153
|
|
|
154
154
|
interface TaroStatic {
|
|
155
155
|
/** Taro.setStorage 的同步版本
|
|
156
|
-
* @supported weapp, alipay, swan, jd, qq, tt, h5
|
|
156
|
+
* @supported weapp, alipay, swan, jd, qq, tt, h5, harmony_hybrid
|
|
157
157
|
* @example
|
|
158
158
|
* ```tsx
|
|
159
159
|
* Taro.setStorage({
|
|
@@ -177,7 +177,7 @@ declare module '../../index' {
|
|
|
177
177
|
): void
|
|
178
178
|
|
|
179
179
|
/** 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。
|
|
180
|
-
* @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony
|
|
180
|
+
* @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony, harmony_hybrid
|
|
181
181
|
* @example
|
|
182
182
|
* ```tsx
|
|
183
183
|
* Taro.setStorage({
|
|
@@ -204,7 +204,7 @@ declare module '../../index' {
|
|
|
204
204
|
): void
|
|
205
205
|
|
|
206
206
|
/** Taro.removeStorage 的同步版本
|
|
207
|
-
* @supported weapp, alipay, swan, jd, qq, tt, h5
|
|
207
|
+
* @supported weapp, alipay, swan, jd, qq, tt, h5, harmony_hybrid
|
|
208
208
|
* @example
|
|
209
209
|
* ```tsx
|
|
210
210
|
* try {
|
|
@@ -221,7 +221,7 @@ declare module '../../index' {
|
|
|
221
221
|
): void
|
|
222
222
|
|
|
223
223
|
/** 从本地缓存中移除指定 key
|
|
224
|
-
* @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony
|
|
224
|
+
* @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony, harmony_hybrid
|
|
225
225
|
* @example
|
|
226
226
|
* ```tsx
|
|
227
227
|
* Taro.removeStorage({
|
|
@@ -236,7 +236,7 @@ declare module '../../index' {
|
|
|
236
236
|
removeStorage(option: removeStorage.Option): Promise<TaroGeneral.CallbackResult>
|
|
237
237
|
|
|
238
238
|
/** Taro.getStorage 的同步版本
|
|
239
|
-
* @supported weapp, alipay, swan, jd, qq, tt, h5
|
|
239
|
+
* @supported weapp, alipay, swan, jd, qq, tt, h5, harmony_hybrid
|
|
240
240
|
* @example
|
|
241
241
|
* ```tsx
|
|
242
242
|
* try {
|
|
@@ -256,7 +256,7 @@ declare module '../../index' {
|
|
|
256
256
|
): T
|
|
257
257
|
|
|
258
258
|
/** Taro.getStorageInfo 的同步版本
|
|
259
|
-
* @supported weapp, alipay, swan, jd, qq, tt, h5,
|
|
259
|
+
* @supported weapp, alipay, swan, jd, qq, tt, h5, harmony_hybrid
|
|
260
260
|
* @example
|
|
261
261
|
* ```tsx
|
|
262
262
|
* try {
|
|
@@ -273,7 +273,7 @@ declare module '../../index' {
|
|
|
273
273
|
getStorageInfoSync(): getStorageInfoSync.Option
|
|
274
274
|
|
|
275
275
|
/** 异步获取当前storage的相关信息
|
|
276
|
-
* @supported weapp, alipay, swan, jd, qq, tt, h5, rn
|
|
276
|
+
* @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony_hybrid
|
|
277
277
|
* @example
|
|
278
278
|
* ```tsx
|
|
279
279
|
* Taro.getStorageInfo({
|
|
@@ -289,7 +289,7 @@ declare module '../../index' {
|
|
|
289
289
|
getStorageInfo(option?: getStorageInfo.Option): Promise<TaroGeneral.CallbackResult>
|
|
290
290
|
|
|
291
291
|
/** 从本地缓存中异步获取指定 key 的内容
|
|
292
|
-
* @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony
|
|
292
|
+
* @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony, harmony_hybrid
|
|
293
293
|
* @example
|
|
294
294
|
* ```tsx
|
|
295
295
|
* Taro.getStorage({
|
|
@@ -313,7 +313,7 @@ declare module '../../index' {
|
|
|
313
313
|
): void
|
|
314
314
|
|
|
315
315
|
/** Taro.clearStorage 的同步版本
|
|
316
|
-
* @supported weapp, alipay, swan, jd, qq, tt, h5
|
|
316
|
+
* @supported weapp, alipay, swan, jd, qq, tt, h5, harmony_hybrid
|
|
317
317
|
* @example
|
|
318
318
|
* ```tsx
|
|
319
319
|
* try {
|
|
@@ -327,7 +327,7 @@ declare module '../../index' {
|
|
|
327
327
|
clearStorageSync(): void
|
|
328
328
|
|
|
329
329
|
/** 清理本地数据缓存
|
|
330
|
-
* @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony
|
|
330
|
+
* @supported weapp, alipay, swan, jd, qq, tt, h5, rn, harmony, harmony_hybrid
|
|
331
331
|
* @example
|
|
332
332
|
* ```tsx
|
|
333
333
|
* Taro.clearStorage()
|