@ray-js/api 1.7.83-beta.0 → 1.7.84
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/@types/AIStreamKit.d.ts +530 -10
- package/@types/BaseKit.d.ts +291 -233
- package/@types/BizKit.d.ts +499 -161
- package/@types/LightKit.d.ts +3 -3
- package/@types/MapKit.d.ts +24 -24
- package/@types/MiniKit.d.ts +117 -92
- package/@types/OutdoorKit.d.ts +61 -61
- package/@types/P2PKit.d.ts +25 -25
- package/@types/WearKit.d.ts +550 -26
- package/@types/api-extend.d.ts +1 -1
- package/lib/nativeRouters/device.d.ts +50 -15
- package/lib/nativeRouters/device.js +47 -15
- package/lib/nativeRouters/gw.d.ts +0 -3
- package/lib/nativeRouters/gw.js +0 -3
- package/lib/nativeRouters/outdoors.d.ts +12 -3
- package/lib/nativeRouters/outdoors.js +11 -3
- package/lib/nativeRouters/root.d.ts +33 -5
- package/lib/nativeRouters/root.js +32 -5
- package/package.json +5 -5
package/@types/BaseKit.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* BaseKit
|
|
3
3
|
*
|
|
4
|
-
* @version 3.38.
|
|
4
|
+
* @version 3.38.14
|
|
5
5
|
*/
|
|
6
6
|
declare namespace ty {
|
|
7
7
|
/**
|
|
8
8
|
* 停止监听加速度数据
|
|
9
9
|
* @public
|
|
10
10
|
* @since BaseKit 2.3.2
|
|
11
|
-
* @example
|
|
11
|
+
* @example
|
|
12
12
|
* ```tsx
|
|
13
13
|
* await ty.startAccelerometer({ interval: "normal" });
|
|
14
14
|
* await ty.stopAccelerometer();
|
|
@@ -41,7 +41,7 @@ declare namespace ty {
|
|
|
41
41
|
* 开始监听加速度数据,初始化事件回调方法
|
|
42
42
|
* @public
|
|
43
43
|
* @since BaseKit 2.3.2
|
|
44
|
-
* @example
|
|
44
|
+
* @example
|
|
45
45
|
* ```tsx
|
|
46
46
|
* await ty.startAccelerometer({ interval: "normal" });
|
|
47
47
|
* console.log("startAccelerometer success");
|
|
@@ -80,7 +80,7 @@ declare namespace ty {
|
|
|
80
80
|
* 获取当前无障碍模式
|
|
81
81
|
* @public
|
|
82
82
|
* @since BaseKit 3.31.18
|
|
83
|
-
* @example
|
|
83
|
+
* @example
|
|
84
84
|
* ```tsx
|
|
85
85
|
* ty.getAccessibilityMode({
|
|
86
86
|
* success(res) {
|
|
@@ -121,7 +121,7 @@ declare namespace ty {
|
|
|
121
121
|
* 获取当前无障碍模式
|
|
122
122
|
* @public
|
|
123
123
|
* @since BaseKit 3.31.18
|
|
124
|
-
* @example
|
|
124
|
+
* @example
|
|
125
125
|
* ```tsx
|
|
126
126
|
* ty.getAccessibilityMode({
|
|
127
127
|
* success(res) {
|
|
@@ -143,7 +143,7 @@ declare namespace ty {
|
|
|
143
143
|
* 获取音频文件时长信息
|
|
144
144
|
* @public
|
|
145
145
|
* @since BaseKit 2.4.3
|
|
146
|
-
* @example
|
|
146
|
+
* @example
|
|
147
147
|
* ```tsx
|
|
148
148
|
* ty.downloadFile({
|
|
149
149
|
* url: "https://airtake-public-data-1254153901.cos.ap-shanghai.myqcloud.com/ttttestfile/test-audio.m4a",
|
|
@@ -197,7 +197,7 @@ declare namespace ty {
|
|
|
197
197
|
* 权限请求方法
|
|
198
198
|
* @public
|
|
199
199
|
* @since BaseKit 2.0.1
|
|
200
|
-
* @example
|
|
200
|
+
* @example
|
|
201
201
|
* ```tsx
|
|
202
202
|
* ty.authorize({
|
|
203
203
|
* scope: "scope.writePhotosAlbum",
|
|
@@ -243,7 +243,7 @@ declare namespace ty {
|
|
|
243
243
|
* 查询权限状态
|
|
244
244
|
* @public
|
|
245
245
|
* @since BaseKit 2.0.1
|
|
246
|
-
* @example
|
|
246
|
+
* @example
|
|
247
247
|
* ```tsx
|
|
248
248
|
* ty.authorizeStatus({
|
|
249
249
|
* scope: "scope.writePhotosAlbum",
|
|
@@ -289,7 +289,7 @@ declare namespace ty {
|
|
|
289
289
|
* 获取用户的当前设置。返回值中只会出现小程序已经向用户请求过的权限
|
|
290
290
|
* @public
|
|
291
291
|
* @since BaseKit 3.12.0
|
|
292
|
-
* @example
|
|
292
|
+
* @example
|
|
293
293
|
* ```tsx
|
|
294
294
|
* ty.getSetting({
|
|
295
295
|
* success: data => {
|
|
@@ -333,7 +333,7 @@ declare namespace ty {
|
|
|
333
333
|
* 授权某个协议
|
|
334
334
|
* @public
|
|
335
335
|
* @since BaseKit 3.16.3
|
|
336
|
-
* @example
|
|
336
|
+
* @example
|
|
337
337
|
* ```tsx
|
|
338
338
|
* ty.authorizePolicy({
|
|
339
339
|
* type: "ai_algorithm",
|
|
@@ -395,7 +395,7 @@ declare namespace ty {
|
|
|
395
395
|
* 查询协议的授权状态
|
|
396
396
|
* @public
|
|
397
397
|
* @since BaseKit 3.16.3
|
|
398
|
-
* @example
|
|
398
|
+
* @example
|
|
399
399
|
* ```tsx
|
|
400
400
|
* ty.authorizePolicyStatus({
|
|
401
401
|
* type: "ai_algorithm",
|
|
@@ -470,7 +470,7 @@ declare namespace ty {
|
|
|
470
470
|
* 查询日历读写权限状态
|
|
471
471
|
* @public
|
|
472
472
|
* @since BaseKit 3.35.5
|
|
473
|
-
* @example
|
|
473
|
+
* @example
|
|
474
474
|
* ```tsx
|
|
475
475
|
* ty.calendarAuthorizeStatus({
|
|
476
476
|
* success: data => {
|
|
@@ -514,7 +514,7 @@ declare namespace ty {
|
|
|
514
514
|
* 跳转权限设置页
|
|
515
515
|
* @public
|
|
516
516
|
* @since BaseKit 3.35.5
|
|
517
|
-
* @example
|
|
517
|
+
* @example
|
|
518
518
|
* ```tsx
|
|
519
519
|
* ty.openAuthorizeSettings({
|
|
520
520
|
* success: data => {
|
|
@@ -552,7 +552,7 @@ declare namespace ty {
|
|
|
552
552
|
* 打开另一个小程序
|
|
553
553
|
* @public
|
|
554
554
|
* @since BaseKit 2.2.4
|
|
555
|
-
* @example
|
|
555
|
+
* @example
|
|
556
556
|
* ```tsx
|
|
557
557
|
* ty.navigateToMiniProgram({
|
|
558
558
|
* appId: "tyeavwo0j4oocvdrf1",
|
|
@@ -642,7 +642,7 @@ declare namespace ty {
|
|
|
642
642
|
* 判断API,回调,参数等是否在当前版本可用。
|
|
643
643
|
* @public
|
|
644
644
|
* @since BaseKit 3.15.1
|
|
645
|
-
* @example
|
|
645
|
+
* @example
|
|
646
646
|
* ```tsx
|
|
647
647
|
* const result = ty.canIUse("ty.getSystemInfo");
|
|
648
648
|
* console.log("canIUse ty.getSystemInfo:", result);
|
|
@@ -656,7 +656,7 @@ declare namespace ty {
|
|
|
656
656
|
* 判断API,回调,参数等是否在当前版本可用。
|
|
657
657
|
* @public
|
|
658
658
|
* @since BaseKit 3.15.3
|
|
659
|
-
* @example
|
|
659
|
+
* @example
|
|
660
660
|
* ```tsx
|
|
661
661
|
* const result = ty.canIUse("ty.getSystemInfo");
|
|
662
662
|
* console.log("canIUse ty.getSystemInfo:", result);
|
|
@@ -675,7 +675,7 @@ declare namespace ty {
|
|
|
675
675
|
* 获取视频缩略图
|
|
676
676
|
* @public
|
|
677
677
|
* @since BaseKit 3.14.2
|
|
678
|
-
* @example
|
|
678
|
+
* @example
|
|
679
679
|
* ```tsx
|
|
680
680
|
* // 抽取视频缩略图:先下载视频,用回调返回的协议路径 tempFilePath 调用即可
|
|
681
681
|
* ty.downloadFile({
|
|
@@ -758,7 +758,7 @@ declare namespace ty {
|
|
|
758
758
|
* 清空视频缩略图
|
|
759
759
|
* @public
|
|
760
760
|
* @since BaseKit 3.14.2
|
|
761
|
-
* @example
|
|
761
|
+
* @example
|
|
762
762
|
* ```tsx
|
|
763
763
|
* // 清空某视频的缩略图缓存:先下载视频并抽取缩略图生成缓存,再用同一 videoName 清空
|
|
764
764
|
* // (clear 只能清"已生成"的缩略图缓存,故需先 fetch 造出缓存,否则无目录可清)
|
|
@@ -818,7 +818,7 @@ declare namespace ty {
|
|
|
818
818
|
* 裁剪视频
|
|
819
819
|
* @public
|
|
820
820
|
* @since BaseKit 3.14.2
|
|
821
|
-
* @example
|
|
821
|
+
* @example
|
|
822
822
|
* ```tsx
|
|
823
823
|
* // 裁剪视频:先下载视频,用协议路径 tempFilePath 调用;level 1~4 对应分辨率档位(1=480*854)
|
|
824
824
|
* ty.downloadFile({
|
|
@@ -893,7 +893,7 @@ declare namespace ty {
|
|
|
893
893
|
* 开始监听罗盘数据
|
|
894
894
|
* @public
|
|
895
895
|
* @since BaseKit 2.3.2
|
|
896
|
-
* @example
|
|
896
|
+
* @example
|
|
897
897
|
* ```tsx
|
|
898
898
|
* // 开始监听罗盘传感器
|
|
899
899
|
* ty.startCompass({
|
|
@@ -928,7 +928,7 @@ declare namespace ty {
|
|
|
928
928
|
* 停止监听罗盘数据
|
|
929
929
|
* @public
|
|
930
930
|
* @since BaseKit 2.3.2
|
|
931
|
-
* @example
|
|
931
|
+
* @example
|
|
932
932
|
* ```tsx
|
|
933
933
|
* // 停止罗盘:先 startCompass 建立会话,成功后再 stopCompass 停止
|
|
934
934
|
* ty.startCompass({
|
|
@@ -968,7 +968,7 @@ declare namespace ty {
|
|
|
968
968
|
* 开始监听设备方向的变化。
|
|
969
969
|
* @public
|
|
970
970
|
* @since BaseKit 2.3.2
|
|
971
|
-
* @example
|
|
971
|
+
* @example
|
|
972
972
|
* ```tsx
|
|
973
973
|
* ty.startDeviceMotionListening({
|
|
974
974
|
* interval: "normal",
|
|
@@ -1014,7 +1014,7 @@ declare namespace ty {
|
|
|
1014
1014
|
* 停止监听设备方向的变化。
|
|
1015
1015
|
* @public
|
|
1016
1016
|
* @since BaseKit 2.3.2
|
|
1017
|
-
* @example
|
|
1017
|
+
* @example
|
|
1018
1018
|
* ```tsx
|
|
1019
1019
|
* // 停止监听设备方向:先 startDeviceMotionListening 初始化会话,成功后再 stop
|
|
1020
1020
|
* // (stop 依赖 start 初始化的 sensorManager,否则报 Sensor initialization fail)
|
|
@@ -1062,7 +1062,7 @@ declare namespace ty {
|
|
|
1062
1062
|
* 获取通用缓存路径
|
|
1063
1063
|
* @public
|
|
1064
1064
|
* @since BaseKit 2.2.3
|
|
1065
|
-
* @example
|
|
1065
|
+
* @example
|
|
1066
1066
|
* ```tsx
|
|
1067
1067
|
* ty.getTempDirectory({
|
|
1068
1068
|
* success: data => {
|
|
@@ -1106,7 +1106,7 @@ declare namespace ty {
|
|
|
1106
1106
|
* 写日志文件,需要APP配套使用检测设备网络功能进行日志上传查看。
|
|
1107
1107
|
* @public
|
|
1108
1108
|
* @since BaseKit 3.6.4
|
|
1109
|
-
* @example
|
|
1109
|
+
* @example
|
|
1110
1110
|
* ```tsx
|
|
1111
1111
|
* ty.writeLogFile({
|
|
1112
1112
|
* resId: "ttt-demo",
|
|
@@ -1174,7 +1174,7 @@ declare namespace ty {
|
|
|
1174
1174
|
* 获取该小程序下的 本地临时文件 或 本地缓存文件 信息
|
|
1175
1175
|
* @public
|
|
1176
1176
|
* @since BaseKit 3.12.0
|
|
1177
|
-
* @example
|
|
1177
|
+
* @example
|
|
1178
1178
|
* ```tsx
|
|
1179
1179
|
* // getFileInfo 读取临时/缓存文件信息;先在 Temp 写一个文件再取它的摘要。
|
|
1180
1180
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -1247,7 +1247,7 @@ declare namespace ty {
|
|
|
1247
1247
|
* 开始监听陀螺仪数据。
|
|
1248
1248
|
* @public
|
|
1249
1249
|
* @since BaseKit 2.3.2
|
|
1250
|
-
* @example
|
|
1250
|
+
* @example
|
|
1251
1251
|
* ```tsx
|
|
1252
1252
|
* // 开始监听陀螺仪,interval 为回调频率:game(~20ms) / ui(~60ms) / normal(~200ms)
|
|
1253
1253
|
* ty.startGyroscope({
|
|
@@ -1290,7 +1290,7 @@ declare namespace ty {
|
|
|
1290
1290
|
* 停止监听陀螺仪数据。
|
|
1291
1291
|
* @public
|
|
1292
1292
|
* @since BaseKit 2.3.2
|
|
1293
|
-
* @example
|
|
1293
|
+
* @example
|
|
1294
1294
|
* ```tsx
|
|
1295
1295
|
* // 停止陀螺仪:先 startGyroscope 建立会话,成功后再 stopGyroscope 停止
|
|
1296
1296
|
* ty.startGyroscope({
|
|
@@ -1331,7 +1331,7 @@ declare namespace ty {
|
|
|
1331
1331
|
* 初始化设备文件加密上传能力
|
|
1332
1332
|
* @public
|
|
1333
1333
|
* @since BaseKit 3.14.2
|
|
1334
|
-
* @example
|
|
1334
|
+
* @example
|
|
1335
1335
|
* ```tsx
|
|
1336
1336
|
* // 选中 7 寸屏设备。传非空 type 走"初始化密钥"新接口(不传 type 会走旧版取密钥接口、对该产品返回 1501)。
|
|
1337
1337
|
* // 成功回调返回 tckey(图片解密密钥)。
|
|
@@ -1401,7 +1401,7 @@ declare namespace ty {
|
|
|
1401
1401
|
* 打印机业务时,云端加解密方式改变,旧业务保留
|
|
1402
1402
|
* @public
|
|
1403
1403
|
* @since BaseKit 3.36.2
|
|
1404
|
-
* @example
|
|
1404
|
+
* @example
|
|
1405
1405
|
* ```tsx
|
|
1406
1406
|
* // 从当前账号选中支持加密上传的 7 寸屏设备。
|
|
1407
1407
|
* const { homeId } = await ty.home.getCurrentHomeInfo();
|
|
@@ -1451,7 +1451,7 @@ declare namespace ty {
|
|
|
1451
1451
|
* 上传文件 2.0
|
|
1452
1452
|
* @public
|
|
1453
1453
|
* @since BaseKit 3.36.2
|
|
1454
|
-
* @example
|
|
1454
|
+
* @example
|
|
1455
1455
|
* ```tsx
|
|
1456
1456
|
* // 选中 7 寸屏设备 → 相册选图 → V2 初始化 → V2 加密上传。
|
|
1457
1457
|
* const { homeId } = await ty.home.getCurrentHomeInfo();
|
|
@@ -1547,7 +1547,7 @@ declare namespace ty {
|
|
|
1547
1547
|
* 上传文件
|
|
1548
1548
|
* @public
|
|
1549
1549
|
* @since BaseKit 3.14.2
|
|
1550
|
-
* @example
|
|
1550
|
+
* @example
|
|
1551
1551
|
* ```tsx
|
|
1552
1552
|
* // 选中 7 寸屏设备 → 相册选图 → 初始化密钥 → 加密上传。
|
|
1553
1553
|
* const { homeId } = await ty.home.getCurrentHomeInfo();
|
|
@@ -1665,7 +1665,7 @@ declare namespace ty {
|
|
|
1665
1665
|
* 取消上传
|
|
1666
1666
|
* @public
|
|
1667
1667
|
* @since BaseKit 3.14.2
|
|
1668
|
-
* @example
|
|
1668
|
+
* @example
|
|
1669
1669
|
* ```tsx
|
|
1670
1670
|
* // taskId 是运行时值:选 7 寸屏 → 相册选图 → 初始化 → 发起上传拿到真实 taskId → 取消。
|
|
1671
1671
|
* const { homeId } = await ty.home.getCurrentHomeInfo();
|
|
@@ -1744,7 +1744,7 @@ declare namespace ty {
|
|
|
1744
1744
|
* 下载文件
|
|
1745
1745
|
* @public
|
|
1746
1746
|
* @since BaseKit 3.32.4
|
|
1747
|
-
* @example
|
|
1747
|
+
* @example
|
|
1748
1748
|
* ```tsx
|
|
1749
1749
|
* // 完整真实链路:选 7 寸屏 → init(传 type)拿 tckey → 相册选图 → 上传(从进度事件抓 cloudUrl/picId
|
|
1750
1750
|
* // 拼出该文件的云端记录)→ 用真实 tckey + fileList 下载解密。
|
|
@@ -1861,7 +1861,7 @@ declare namespace ty {
|
|
|
1861
1861
|
* V2 支持根据文件头 securityLevel 自动选择 CBC/GCM 解密
|
|
1862
1862
|
* @public
|
|
1863
1863
|
* @since BaseKit 3.36.2
|
|
1864
|
-
* @example
|
|
1864
|
+
* @example
|
|
1865
1865
|
* ```tsx
|
|
1866
1866
|
* // 完整真实链路(V2):选 7 寸屏 → V2 init → 相册选图 → V2 上传(从进度事件抓 cloudUrl/picId 拼出云端记录)
|
|
1867
1867
|
* // → V2 下载(从 V2 init 回调取设备密钥 tckey,显式传入)。
|
|
@@ -1976,7 +1976,7 @@ declare namespace ty {
|
|
|
1976
1976
|
* 取消下载
|
|
1977
1977
|
* @public
|
|
1978
1978
|
* @since BaseKit 3.32.4
|
|
1979
|
-
* @example
|
|
1979
|
+
* @example
|
|
1980
1980
|
* ```tsx
|
|
1981
1981
|
* // taskId 是运行时值:选 7 寸屏 → V2 init → 选图 → 上传抓 cloudUrl/picId → 发起真实下载拿到 taskId → 取消。
|
|
1982
1982
|
* const { homeId } = await ty.home.getCurrentHomeInfo();
|
|
@@ -2067,7 +2067,7 @@ declare namespace ty {
|
|
|
2067
2067
|
* 压缩图片
|
|
2068
2068
|
* @public
|
|
2069
2069
|
* @since BaseKit 3.14.2
|
|
2070
|
-
* @example
|
|
2070
|
+
* @example
|
|
2071
2071
|
* ```tsx
|
|
2072
2072
|
* // 从相册选真实图片,再压缩。
|
|
2073
2073
|
* ty.chooseImage({
|
|
@@ -2152,7 +2152,7 @@ declare namespace ty {
|
|
|
2152
2152
|
* 压缩视频
|
|
2153
2153
|
* @public
|
|
2154
2154
|
* @since BaseKit 3.24.3
|
|
2155
|
-
* @example
|
|
2155
|
+
* @example
|
|
2156
2156
|
* ```tsx
|
|
2157
2157
|
* // 从相册选真实视频,再压缩。
|
|
2158
2158
|
* ty.chooseMedia({
|
|
@@ -2237,7 +2237,7 @@ declare namespace ty {
|
|
|
2237
2237
|
* 图片裁剪
|
|
2238
2238
|
* @public
|
|
2239
2239
|
* @since BaseKit 3.14.2
|
|
2240
|
-
* @example
|
|
2240
|
+
* @example
|
|
2241
2241
|
* ```tsx
|
|
2242
2242
|
* // 从相册选真实图片,再裁剪。
|
|
2243
2243
|
* ty.chooseImage({
|
|
@@ -2309,7 +2309,7 @@ declare namespace ty {
|
|
|
2309
2309
|
* 关联API:[chooseMedia]
|
|
2310
2310
|
* @public
|
|
2311
2311
|
* @since BaseKit 2.0.1
|
|
2312
|
-
* @example
|
|
2312
|
+
* @example
|
|
2313
2313
|
* ```tsx
|
|
2314
2314
|
* // 从相册选择或拍照选图(会拉起系统选择器,需手动选择)
|
|
2315
2315
|
* ty.chooseImage({
|
|
@@ -2386,7 +2386,7 @@ declare namespace ty {
|
|
|
2386
2386
|
* 权限:[scope.camera, scope.writePhotosAlbum]
|
|
2387
2387
|
* @public
|
|
2388
2388
|
* @since BaseKit 2.5.0
|
|
2389
|
-
* @example
|
|
2389
|
+
* @example
|
|
2390
2390
|
* ```tsx
|
|
2391
2391
|
* // 拍摄或选择图片/视频(会拉起系统选择器,需手动选择)
|
|
2392
2392
|
* ty.chooseMedia({
|
|
@@ -2509,7 +2509,7 @@ declare namespace ty {
|
|
|
2509
2509
|
* 从本地相册选择图片或使用相机拍照(可裁剪)
|
|
2510
2510
|
* @public
|
|
2511
2511
|
* @since BaseKit 2.2.4
|
|
2512
|
-
* @example
|
|
2512
|
+
* @example
|
|
2513
2513
|
* ```tsx
|
|
2514
2514
|
* // 选择图片并裁剪(会拉起系统选择器,需手动选择)
|
|
2515
2515
|
* ty.chooseCropImage({
|
|
@@ -2557,7 +2557,7 @@ declare namespace ty {
|
|
|
2557
2557
|
* 在新页面中全屏预览图片。
|
|
2558
2558
|
* @public
|
|
2559
2559
|
* @since BaseKit 2.0.1
|
|
2560
|
-
* @example
|
|
2560
|
+
* @example
|
|
2561
2561
|
* ```tsx
|
|
2562
2562
|
* // 全屏预览网络图片
|
|
2563
2563
|
* ty.previewImage({
|
|
@@ -2606,7 +2606,7 @@ declare namespace ty {
|
|
|
2606
2606
|
* 启动拍照
|
|
2607
2607
|
* @public
|
|
2608
2608
|
* @since BaseKit 3.26.0
|
|
2609
|
-
* @example
|
|
2609
|
+
* @example
|
|
2610
2610
|
* ```tsx
|
|
2611
2611
|
* // 启动拍照页(会拉起相机,需手动拍照)
|
|
2612
2612
|
* ty.takePhoto({
|
|
@@ -2681,7 +2681,7 @@ declare namespace ty {
|
|
|
2681
2681
|
* 获取图片信息
|
|
2682
2682
|
* @public
|
|
2683
2683
|
* @since BaseKit 2.4.3
|
|
2684
|
-
* @example
|
|
2684
|
+
* @example
|
|
2685
2685
|
* ```tsx
|
|
2686
2686
|
* // 获取图片信息:src 支持网络/本地路径,这里直接用网络图片
|
|
2687
2687
|
* ty.getImageInfo({
|
|
@@ -2758,7 +2758,7 @@ declare namespace ty {
|
|
|
2758
2758
|
* 获取视频信息
|
|
2759
2759
|
* @public
|
|
2760
2760
|
* @since BaseKit 2.5.0
|
|
2761
|
-
* @example
|
|
2761
|
+
* @example
|
|
2762
2762
|
* ```tsx
|
|
2763
2763
|
* // 获取视频信息:先下载视频,用回调返回的协议路径 tempFilePath 调用
|
|
2764
2764
|
* ty.downloadFile({
|
|
@@ -2855,7 +2855,7 @@ declare namespace ty {
|
|
|
2855
2855
|
* 保存视频到系统相册,支持mp4视频格式,需要相册权限
|
|
2856
2856
|
* @public
|
|
2857
2857
|
* @since BaseKit 2.5.0
|
|
2858
|
-
* @example
|
|
2858
|
+
* @example
|
|
2859
2859
|
* ```tsx
|
|
2860
2860
|
* // 保存视频到系统相册(需相册权限):先下载视频,再用协议路径保存
|
|
2861
2861
|
* ty.downloadFile({
|
|
@@ -2916,7 +2916,7 @@ declare namespace ty {
|
|
|
2916
2916
|
* 保存图片到系统相册
|
|
2917
2917
|
* @public
|
|
2918
2918
|
* @since BaseKit 3.11.0
|
|
2919
|
-
* @example
|
|
2919
|
+
* @example
|
|
2920
2920
|
* ```tsx
|
|
2921
2921
|
* // 保存图片到系统相册(需相册权限):先下载图片,再用协议路径保存
|
|
2922
2922
|
* ty.downloadFile({
|
|
@@ -2971,7 +2971,7 @@ declare namespace ty {
|
|
|
2971
2971
|
* 裁剪图片选择
|
|
2972
2972
|
* @public
|
|
2973
2973
|
* @since BaseKit 3.11.3
|
|
2974
|
-
* @example
|
|
2974
|
+
* @example
|
|
2975
2975
|
* ```tsx
|
|
2976
2976
|
* // 裁剪图片:先下载图片,用协议路径裁剪到指定宽高(type 0:jpg 1:png)
|
|
2977
2977
|
* ty.downloadFile({
|
|
@@ -3042,7 +3042,7 @@ declare namespace ty {
|
|
|
3042
3042
|
* 获取图片的缩略图
|
|
3043
3043
|
* @public
|
|
3044
3044
|
* @since BaseKit 3.14.2
|
|
3045
|
-
* @example
|
|
3045
|
+
* @example
|
|
3046
3046
|
* ```tsx
|
|
3047
3047
|
* // 获取图片缩略图:先下载图片,再按指定宽高生成缩略图
|
|
3048
3048
|
* ty.downloadFile({
|
|
@@ -3107,7 +3107,7 @@ declare namespace ty {
|
|
|
3107
3107
|
* 复制app沙盒中的图片到小程序沙盒
|
|
3108
3108
|
* @public
|
|
3109
3109
|
* @since BaseKit 3.26.0
|
|
3110
|
-
* @example
|
|
3110
|
+
* @example
|
|
3111
3111
|
* ```tsx
|
|
3112
3112
|
* // 复制图片到小程序沙盒:先下载一张图片,用回调返回的协议路径作为源,复制后返回小程序沙盒路径
|
|
3113
3113
|
* ty.downloadFile({
|
|
@@ -3160,7 +3160,7 @@ declare namespace ty {
|
|
|
3160
3160
|
* 显示消息提示框
|
|
3161
3161
|
* @public
|
|
3162
3162
|
* @since BaseKit 2.0.1
|
|
3163
|
-
* @example
|
|
3163
|
+
* @example
|
|
3164
3164
|
* ```tsx
|
|
3165
3165
|
* // 显示消息提示框
|
|
3166
3166
|
* ty.showToast({
|
|
@@ -3227,7 +3227,7 @@ declare namespace ty {
|
|
|
3227
3227
|
* 显示模态对话框
|
|
3228
3228
|
* @public
|
|
3229
3229
|
* @since BaseKit 2.0.1
|
|
3230
|
-
* @example
|
|
3230
|
+
* @example
|
|
3231
3231
|
* ```tsx
|
|
3232
3232
|
* // 显示模态对话框,回调返回用户点击的是确定还是取消
|
|
3233
3233
|
* ty.showModal({
|
|
@@ -3339,7 +3339,7 @@ declare namespace ty {
|
|
|
3339
3339
|
* 显示 loading 提示框。需主动调用 thing.hideLoading 才能关闭提示框
|
|
3340
3340
|
* @public
|
|
3341
3341
|
* @since BaseKit 2.0.1
|
|
3342
|
-
* @example
|
|
3342
|
+
* @example
|
|
3343
3343
|
* ```tsx
|
|
3344
3344
|
* // 显示 loading 提示框,需主动调用 hideLoading 关闭
|
|
3345
3345
|
* ty.showLoading({
|
|
@@ -3387,7 +3387,7 @@ declare namespace ty {
|
|
|
3387
3387
|
* 显示操作菜单
|
|
3388
3388
|
* @public
|
|
3389
3389
|
* @since BaseKit 2.0.1
|
|
3390
|
-
* @example
|
|
3390
|
+
* @example
|
|
3391
3391
|
* ```tsx
|
|
3392
3392
|
* // 显示操作菜单,回调返回用户点击的按钮序号 tapIndex
|
|
3393
3393
|
* ty.showActionSheet({
|
|
@@ -3451,7 +3451,7 @@ declare namespace ty {
|
|
|
3451
3451
|
* 隐藏消息提示框
|
|
3452
3452
|
* @public
|
|
3453
3453
|
* @since BaseKit 2.0.1
|
|
3454
|
-
* @example
|
|
3454
|
+
* @example
|
|
3455
3455
|
* ```tsx
|
|
3456
3456
|
* // 隐藏消息提示框:先 showToast 显示,再 hideToast 主动隐藏
|
|
3457
3457
|
* ty.showToast({
|
|
@@ -3494,7 +3494,7 @@ declare namespace ty {
|
|
|
3494
3494
|
* 隐藏 loading 提示框
|
|
3495
3495
|
* @public
|
|
3496
3496
|
* @since BaseKit 2.0.1
|
|
3497
|
-
* @example
|
|
3497
|
+
* @example
|
|
3498
3498
|
* ```tsx
|
|
3499
3499
|
* // 隐藏 loading 提示框:先 showLoading 显示,再 hideLoading 主动隐藏
|
|
3500
3500
|
* ty.showLoading({
|
|
@@ -3536,7 +3536,7 @@ declare namespace ty {
|
|
|
3536
3536
|
* 获取当前设备方向
|
|
3537
3537
|
* @public
|
|
3538
3538
|
* @since BaseKit 3.26.6
|
|
3539
|
-
* @example
|
|
3539
|
+
* @example
|
|
3540
3540
|
* ```tsx
|
|
3541
3541
|
* // 获取当前设备方向,返回 portrait / landscape-left / landscape-right / unknown
|
|
3542
3542
|
* ty.getDeviceOrientation({
|
|
@@ -3579,7 +3579,7 @@ declare namespace ty {
|
|
|
3579
3579
|
* 获取当前设备方向
|
|
3580
3580
|
* @public
|
|
3581
3581
|
* @since BaseKit 3.26.6
|
|
3582
|
-
* @example
|
|
3582
|
+
* @example
|
|
3583
3583
|
* ```tsx
|
|
3584
3584
|
* // 获取当前设备方向,返回 portrait / landscape-left / landscape-right / unknown
|
|
3585
3585
|
* ty.getDeviceOrientation({
|
|
@@ -3603,7 +3603,7 @@ declare namespace ty {
|
|
|
3603
3603
|
* 拨打电话
|
|
3604
3604
|
* @public
|
|
3605
3605
|
* @since BaseKit 2.0.1
|
|
3606
|
-
* @example
|
|
3606
|
+
* @example
|
|
3607
3607
|
* ```tsx
|
|
3608
3608
|
* // 拨打电话,会拉起系统拨号界面
|
|
3609
3609
|
* ty.makePhoneCall({
|
|
@@ -3644,7 +3644,7 @@ declare namespace ty {
|
|
|
3644
3644
|
* 设置系统剪贴板的内容
|
|
3645
3645
|
* @public
|
|
3646
3646
|
* @since BaseKit 2.0.1
|
|
3647
|
-
* @example
|
|
3647
|
+
* @example
|
|
3648
3648
|
* ```tsx
|
|
3649
3649
|
* // 设置系统剪贴板内容(isSensitive 标记是否敏感信息,仅 Android 13+ 生效)
|
|
3650
3650
|
* ty.setClipboardData({
|
|
@@ -3695,7 +3695,7 @@ declare namespace ty {
|
|
|
3695
3695
|
* 获取系统剪贴板的内容
|
|
3696
3696
|
* @public
|
|
3697
3697
|
* @since BaseKit 2.0.1
|
|
3698
|
-
* @example
|
|
3698
|
+
* @example
|
|
3699
3699
|
* ```tsx
|
|
3700
3700
|
* // 获取系统剪贴板内容:先写入再读取,演示完整往返
|
|
3701
3701
|
* ty.setClipboardData({
|
|
@@ -3742,7 +3742,7 @@ declare namespace ty {
|
|
|
3742
3742
|
* 初始化闪光灯
|
|
3743
3743
|
* @public
|
|
3744
3744
|
* @since BaseKit 3.31.0
|
|
3745
|
-
* @example
|
|
3745
|
+
* @example
|
|
3746
3746
|
* ```tsx
|
|
3747
3747
|
* // 初始化闪光灯(开/关前需先初始化)
|
|
3748
3748
|
* ty.setupFlashLight({
|
|
@@ -3777,7 +3777,7 @@ declare namespace ty {
|
|
|
3777
3777
|
* 打开闪光灯
|
|
3778
3778
|
* @public
|
|
3779
3779
|
* @since BaseKit 3.31.0
|
|
3780
|
-
* @example
|
|
3780
|
+
* @example
|
|
3781
3781
|
* ```tsx
|
|
3782
3782
|
* // 打开闪光灯:先初始化再打开
|
|
3783
3783
|
* ty.setupFlashLight({
|
|
@@ -3817,7 +3817,7 @@ declare namespace ty {
|
|
|
3817
3817
|
* 关闭闪光灯
|
|
3818
3818
|
* @public
|
|
3819
3819
|
* @since BaseKit 3.31.0
|
|
3820
|
-
* @example
|
|
3820
|
+
* @example
|
|
3821
3821
|
* ```tsx
|
|
3822
3822
|
* // 关闭闪光灯:先初始化、打开,再关闭
|
|
3823
3823
|
* ty.setupFlashLight({
|
|
@@ -3862,7 +3862,7 @@ declare namespace ty {
|
|
|
3862
3862
|
* 闪光灯是否打开
|
|
3863
3863
|
* @public
|
|
3864
3864
|
* @since BaseKit 3.31.0
|
|
3865
|
-
* @example
|
|
3865
|
+
* @example
|
|
3866
3866
|
* ```tsx
|
|
3867
3867
|
* // 查询闪光灯是否打开:先初始化、打开,再查询(返回布尔值)
|
|
3868
3868
|
* ty.setupFlashLight({
|
|
@@ -3907,7 +3907,7 @@ declare namespace ty {
|
|
|
3907
3907
|
* 设置系统音量
|
|
3908
3908
|
* @public
|
|
3909
3909
|
* @since BaseKit 2.4.3
|
|
3910
|
-
* @example
|
|
3910
|
+
* @example
|
|
3911
3911
|
* ```tsx
|
|
3912
3912
|
* ty.updateVolume({
|
|
3913
3913
|
* value: 0.5,
|
|
@@ -3966,7 +3966,7 @@ declare namespace ty {
|
|
|
3966
3966
|
* 注意:Android是系统的音量是有区分的,该接口获取的是系统电话铃声的音量值。如需要获取其他系统音量值,请使用getCurrentVolumeByMode接口
|
|
3967
3967
|
* @public
|
|
3968
3968
|
* @since BaseKit 2.4.3
|
|
3969
|
-
* @example
|
|
3969
|
+
* @example
|
|
3970
3970
|
* ```tsx
|
|
3971
3971
|
* ty.getCurrentVolume({
|
|
3972
3972
|
* success: data => {
|
|
@@ -4011,7 +4011,7 @@ declare namespace ty {
|
|
|
4011
4011
|
* 注意:Android支持通过volumeMode参数获取不同系统声音的音量值。iOS仅有一个系统音量值,volumeMode不生效。
|
|
4012
4012
|
* @public
|
|
4013
4013
|
* @since BaseKit 3.3.3
|
|
4014
|
-
* @example
|
|
4014
|
+
* @example
|
|
4015
4015
|
* ```tsx
|
|
4016
4016
|
* ty.getCurrentVolumeByMode({
|
|
4017
4017
|
* volumeMode: 2,
|
|
@@ -4070,7 +4070,7 @@ declare namespace ty {
|
|
|
4070
4070
|
* 关联API:[onSystemVolumeChangeEvent, unRegisterSystemVolumeChange]
|
|
4071
4071
|
* @public
|
|
4072
4072
|
* @since BaseKit 2.5.0
|
|
4073
|
-
* @example
|
|
4073
|
+
* @example
|
|
4074
4074
|
* ```tsx
|
|
4075
4075
|
* ty.registerSystemVolumeChange({
|
|
4076
4076
|
* success: data => {
|
|
@@ -4109,7 +4109,7 @@ declare namespace ty {
|
|
|
4109
4109
|
* 关联API:[onSystemVolumeChangeEvent, registerSystemVolumeChange]
|
|
4110
4110
|
* @public
|
|
4111
4111
|
* @since BaseKit 2.5.0
|
|
4112
|
-
* @example
|
|
4112
|
+
* @example
|
|
4113
4113
|
* ```tsx
|
|
4114
4114
|
* ty.unRegisterSystemVolumeChange({
|
|
4115
4115
|
* success: data => {
|
|
@@ -4147,7 +4147,7 @@ declare namespace ty {
|
|
|
4147
4147
|
* 获取设备设置
|
|
4148
4148
|
* @public
|
|
4149
4149
|
* @since BaseKit 2.5.0
|
|
4150
|
-
* @example
|
|
4150
|
+
* @example
|
|
4151
4151
|
* ```tsx
|
|
4152
4152
|
* ty.getSystemSetting({
|
|
4153
4153
|
* success: data => {
|
|
@@ -4211,7 +4211,7 @@ declare namespace ty {
|
|
|
4211
4211
|
* 获取设备基础信息
|
|
4212
4212
|
* @public
|
|
4213
4213
|
* @since BaseKit 2.4.3
|
|
4214
|
-
* @example
|
|
4214
|
+
* @example
|
|
4215
4215
|
* ```tsx
|
|
4216
4216
|
* ty.getDeviceInfo({
|
|
4217
4217
|
* success: data => {
|
|
@@ -4280,7 +4280,7 @@ declare namespace ty {
|
|
|
4280
4280
|
* 获取系统信息
|
|
4281
4281
|
* @public
|
|
4282
4282
|
* @since BaseKit 2.0.1
|
|
4283
|
-
* @example
|
|
4283
|
+
* @example
|
|
4284
4284
|
* ```tsx
|
|
4285
4285
|
* ty.getSystemInfo({
|
|
4286
4286
|
* success: data => {
|
|
@@ -4487,7 +4487,7 @@ declare namespace ty {
|
|
|
4487
4487
|
* 获取系统信息
|
|
4488
4488
|
* @public
|
|
4489
4489
|
* @since BaseKit 2.0.1
|
|
4490
|
-
* @example
|
|
4490
|
+
* @example
|
|
4491
4491
|
* ```tsx
|
|
4492
4492
|
* ty.getSystemInfo({
|
|
4493
4493
|
* success: data => {
|
|
@@ -4676,7 +4676,7 @@ declare namespace ty {
|
|
|
4676
4676
|
* 注意:Android需要申请手机的位置权限、Wi-Fi状态权限、网络权限;iOS上不可用
|
|
4677
4677
|
* @public
|
|
4678
4678
|
* @since BaseKit 2.4.3
|
|
4679
|
-
* @example
|
|
4679
|
+
* @example
|
|
4680
4680
|
* ```tsx
|
|
4681
4681
|
* ty.getWifiList({
|
|
4682
4682
|
* success: data => {
|
|
@@ -4715,7 +4715,7 @@ declare namespace ty {
|
|
|
4715
4715
|
* 注意:Android需要申请手机的位置权限、Wi-Fi状态权限、网络权限;iOS上不可用
|
|
4716
4716
|
* @public
|
|
4717
4717
|
* @since BaseKit 2.4.3
|
|
4718
|
-
* @example
|
|
4718
|
+
* @example
|
|
4719
4719
|
* ```tsx
|
|
4720
4720
|
* ty.getConnectedWifi({
|
|
4721
4721
|
* partialInfo: false,
|
|
@@ -4790,7 +4790,7 @@ declare namespace ty {
|
|
|
4790
4790
|
* 跳转系统蓝牙设置页 (仅Android支持)
|
|
4791
4791
|
* @public
|
|
4792
4792
|
* @since BaseKit 2.4.3
|
|
4793
|
-
* @example
|
|
4793
|
+
* @example
|
|
4794
4794
|
* ```tsx
|
|
4795
4795
|
* ty.openSystemBluetoothSetting({
|
|
4796
4796
|
* success: data => {
|
|
@@ -4828,7 +4828,7 @@ declare namespace ty {
|
|
|
4828
4828
|
* 获取当前APP授权设置
|
|
4829
4829
|
* @public
|
|
4830
4830
|
* @since BaseKit 3.12.0
|
|
4831
|
-
* @example
|
|
4831
|
+
* @example
|
|
4832
4832
|
* ```tsx
|
|
4833
4833
|
* ty.getAppAuthorizeSetting({
|
|
4834
4834
|
* success: data => {
|
|
@@ -4917,7 +4917,7 @@ declare namespace ty {
|
|
|
4917
4917
|
* 获取手机电池电量
|
|
4918
4918
|
* @public
|
|
4919
4919
|
* @since BaseKit 3.22.0
|
|
4920
|
-
* @example
|
|
4920
|
+
* @example
|
|
4921
4921
|
* ```tsx
|
|
4922
4922
|
* ty.getBattery({
|
|
4923
4923
|
* success: data => {
|
|
@@ -4961,7 +4961,7 @@ declare namespace ty {
|
|
|
4961
4961
|
* 查询手机是否正在充电
|
|
4962
4962
|
* @public
|
|
4963
4963
|
* @since BaseKit 3.22.0
|
|
4964
|
-
* @example
|
|
4964
|
+
* @example
|
|
4965
4965
|
* ```tsx
|
|
4966
4966
|
* ty.deviceIsCharging({
|
|
4967
4967
|
* success: data => {
|
|
@@ -5005,7 +5005,7 @@ declare namespace ty {
|
|
|
5005
5005
|
* 获取网络类型
|
|
5006
5006
|
* @public
|
|
5007
5007
|
* @since BaseKit 2.0.1
|
|
5008
|
-
* @example
|
|
5008
|
+
* @example
|
|
5009
5009
|
* ```tsx
|
|
5010
5010
|
* // 获取当前网络类型与信号强度(signalStrength 仅 Android 支持)
|
|
5011
5011
|
* ty.getNetworkType({
|
|
@@ -5052,7 +5052,7 @@ declare namespace ty {
|
|
|
5052
5052
|
* 设置屏幕亮度
|
|
5053
5053
|
* @public
|
|
5054
5054
|
* @since BaseKit 2.3.2
|
|
5055
|
-
* @example
|
|
5055
|
+
* @example
|
|
5056
5056
|
* ```tsx
|
|
5057
5057
|
* ty.setScreenBrightness({
|
|
5058
5058
|
* value: 0.5,
|
|
@@ -5096,7 +5096,7 @@ declare namespace ty {
|
|
|
5096
5096
|
* 获取屏幕亮度
|
|
5097
5097
|
* @public
|
|
5098
5098
|
* @since BaseKit 2.3.2
|
|
5099
|
-
* @example
|
|
5099
|
+
* @example
|
|
5100
5100
|
* ```tsx
|
|
5101
5101
|
* ty.getScreenBrightness({
|
|
5102
5102
|
* success: data => {
|
|
@@ -5140,7 +5140,7 @@ declare namespace ty {
|
|
|
5140
5140
|
* 设置是否保持常亮状态
|
|
5141
5141
|
* @public
|
|
5142
5142
|
* @since BaseKit 2.3.2
|
|
5143
|
-
* @example
|
|
5143
|
+
* @example
|
|
5144
5144
|
* ```tsx
|
|
5145
5145
|
* // 屏幕常亮对照测试:先开启常亮,静置观察一段时间,再关闭恢复自动息屏。
|
|
5146
5146
|
*
|
|
@@ -5202,7 +5202,29 @@ declare namespace ty {
|
|
|
5202
5202
|
/**
|
|
5203
5203
|
* 开始录屏
|
|
5204
5204
|
* @public
|
|
5205
|
-
* @since BaseKit
|
|
5205
|
+
* @since BaseKit 3.38.14
|
|
5206
|
+
* @example
|
|
5207
|
+
* ```tsx
|
|
5208
|
+
* ty.startScreenRecording({
|
|
5209
|
+
* success: data => {
|
|
5210
|
+
* console.log(data.recordingId);
|
|
5211
|
+
* setTimeout(() => {
|
|
5212
|
+
* ty.stopScreenRecording({
|
|
5213
|
+
* recordingId: data.recordingId,
|
|
5214
|
+
* success: result => {
|
|
5215
|
+
* console.log(result);
|
|
5216
|
+
* },
|
|
5217
|
+
* fail: error => {
|
|
5218
|
+
* console.error(error);
|
|
5219
|
+
* },
|
|
5220
|
+
* });
|
|
5221
|
+
* }, 1500);
|
|
5222
|
+
* },
|
|
5223
|
+
* fail: error => {
|
|
5224
|
+
* console.error(error);
|
|
5225
|
+
* },
|
|
5226
|
+
* });
|
|
5227
|
+
* ```
|
|
5206
5228
|
* @platform iOS Android
|
|
5207
5229
|
*/
|
|
5208
5230
|
export function startScreenRecording(params?: {
|
|
@@ -5235,13 +5257,34 @@ declare namespace ty {
|
|
|
5235
5257
|
/**
|
|
5236
5258
|
* 结束录屏
|
|
5237
5259
|
* @public
|
|
5238
|
-
* @since BaseKit
|
|
5260
|
+
* @since BaseKit 3.38.14
|
|
5261
|
+
* @example
|
|
5262
|
+
* ```tsx
|
|
5263
|
+
* ty.startScreenRecording({
|
|
5264
|
+
* success: data => {
|
|
5265
|
+
* setTimeout(() => {
|
|
5266
|
+
* ty.stopScreenRecording({
|
|
5267
|
+
* recordingId: data.recordingId,
|
|
5268
|
+
* success: result => {
|
|
5269
|
+
* console.log(result);
|
|
5270
|
+
* },
|
|
5271
|
+
* fail: error => {
|
|
5272
|
+
* console.error(error);
|
|
5273
|
+
* },
|
|
5274
|
+
* });
|
|
5275
|
+
* }, 1500);
|
|
5276
|
+
* },
|
|
5277
|
+
* fail: error => {
|
|
5278
|
+
* console.error(error);
|
|
5279
|
+
* },
|
|
5280
|
+
* });
|
|
5281
|
+
* ```
|
|
5239
5282
|
* @platform iOS Android
|
|
5240
5283
|
*/
|
|
5241
5284
|
export function stopScreenRecording(params: {
|
|
5242
5285
|
/**
|
|
5243
5286
|
* 录屏会话 ID
|
|
5244
|
-
* @since BaseKit
|
|
5287
|
+
* @since BaseKit 3.38.14
|
|
5245
5288
|
*/
|
|
5246
5289
|
recordingId: string
|
|
5247
5290
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
@@ -5289,7 +5332,7 @@ declare namespace ty {
|
|
|
5289
5332
|
* 使手机发生较短时间的振动(30 ms)
|
|
5290
5333
|
* @public
|
|
5291
5334
|
* @since BaseKit 2.3.2
|
|
5292
|
-
* @example
|
|
5335
|
+
* @example
|
|
5293
5336
|
* ```tsx
|
|
5294
5337
|
* ty.vibrateShort({
|
|
5295
5338
|
* type: "heavy",
|
|
@@ -5333,7 +5376,7 @@ declare namespace ty {
|
|
|
5333
5376
|
* 使手机发生较长时间的振动(400 ms)
|
|
5334
5377
|
* @public
|
|
5335
5378
|
* @since BaseKit 2.3.2
|
|
5336
|
-
* @example
|
|
5379
|
+
* @example
|
|
5337
5380
|
* ```tsx
|
|
5338
5381
|
* ty.vibrateLong({
|
|
5339
5382
|
* success: data => {
|
|
@@ -5371,7 +5414,7 @@ declare namespace ty {
|
|
|
5371
5414
|
* Peek 触感振动,仅iOS支持
|
|
5372
5415
|
* @public
|
|
5373
5416
|
* @since BaseKit 3.22.0
|
|
5374
|
-
* @example
|
|
5417
|
+
* @example
|
|
5375
5418
|
* ```tsx
|
|
5376
5419
|
* ty.peekVibrate({
|
|
5377
5420
|
* success: data => {
|
|
@@ -5409,7 +5452,7 @@ declare namespace ty {
|
|
|
5409
5452
|
* Pop 触感振动,仅iOS支持
|
|
5410
5453
|
* @public
|
|
5411
5454
|
* @since BaseKit 3.22.0
|
|
5412
|
-
* @example
|
|
5455
|
+
* @example
|
|
5413
5456
|
* ```tsx
|
|
5414
5457
|
* ty.popVibrate({
|
|
5415
5458
|
* success: data => {
|
|
@@ -5447,7 +5490,7 @@ declare namespace ty {
|
|
|
5447
5490
|
* 连续3次 Peek 触感振动,仅iOS支持
|
|
5448
5491
|
* @public
|
|
5449
5492
|
* @since BaseKit 3.22.0
|
|
5450
|
-
* @example
|
|
5493
|
+
* @example
|
|
5451
5494
|
* ```tsx
|
|
5452
5495
|
* ty.peekVibrateContinuous({
|
|
5453
5496
|
* success: data => {
|
|
@@ -5485,7 +5528,7 @@ declare namespace ty {
|
|
|
5485
5528
|
* notification 触感振动,常用于成功、警告、失败等场景,仅iOS支持
|
|
5486
5529
|
* @public
|
|
5487
5530
|
* @since BaseKit 3.22.0
|
|
5488
|
-
* @example
|
|
5531
|
+
* @example
|
|
5489
5532
|
* ```tsx
|
|
5490
5533
|
* ty.notificationVibrate({
|
|
5491
5534
|
* type: "warning",
|
|
@@ -5529,7 +5572,7 @@ declare namespace ty {
|
|
|
5529
5572
|
* selection 触感振动,常用于选择场景,仅iOS支持
|
|
5530
5573
|
* @public
|
|
5531
5574
|
* @since BaseKit 3.22.0
|
|
5532
|
-
* @example
|
|
5575
|
+
* @example
|
|
5533
5576
|
* ```tsx
|
|
5534
5577
|
* ty.selectionVibrate({
|
|
5535
5578
|
* success: data => {
|
|
@@ -5567,7 +5610,7 @@ declare namespace ty {
|
|
|
5567
5610
|
* 开始录音, 提供振幅回调
|
|
5568
5611
|
* @public
|
|
5569
5612
|
* @since BaseKit 3.27.2
|
|
5570
|
-
* @example
|
|
5613
|
+
* @example
|
|
5571
5614
|
* ```tsx
|
|
5572
5615
|
* const manager = await ty.getRecorderManager();
|
|
5573
5616
|
*
|
|
@@ -5658,7 +5701,7 @@ declare namespace ty {
|
|
|
5658
5701
|
* 停止持续录音
|
|
5659
5702
|
* @public
|
|
5660
5703
|
* @since BaseKit 3.27.2
|
|
5661
|
-
* @example
|
|
5704
|
+
* @example
|
|
5662
5705
|
* ```tsx
|
|
5663
5706
|
* const manager = await ty.getRecorderManager();
|
|
5664
5707
|
*
|
|
@@ -5737,7 +5780,7 @@ declare namespace ty {
|
|
|
5737
5780
|
* 注意:Android返回的数据中,只有result字段可用,其他字段无意义。
|
|
5738
5781
|
* @public
|
|
5739
5782
|
* @since BaseKit 2.3.2
|
|
5740
|
-
* @example
|
|
5783
|
+
* @example
|
|
5741
5784
|
* ```tsx
|
|
5742
5785
|
* // 调起客户端扫码界面,扫码后回调返回内容与类型(Android 仅 result 字段有效)
|
|
5743
5786
|
* ty.scanCode({
|
|
@@ -5843,7 +5886,7 @@ declare namespace ty {
|
|
|
5843
5886
|
* 调起客户端确认登录页面
|
|
5844
5887
|
* @public
|
|
5845
5888
|
* @since BaseKit 3.17.2
|
|
5846
|
-
* @example
|
|
5889
|
+
* @example
|
|
5847
5890
|
* ```tsx
|
|
5848
5891
|
* // 调起客户端确认登录页面,content 为扫到的登录二维码内容;回调返回登录结果码(0 成功/1 取消/2 失败)
|
|
5849
5892
|
* ty.showScanLogin({
|
|
@@ -5895,7 +5938,7 @@ declare namespace ty {
|
|
|
5895
5938
|
* 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。
|
|
5896
5939
|
* @public
|
|
5897
5940
|
* @since BaseKit 2.0.1
|
|
5898
|
-
* @example
|
|
5941
|
+
* @example
|
|
5899
5942
|
* ```tsx
|
|
5900
5943
|
* // 将数据写入本地缓存指定 key(覆盖原内容)
|
|
5901
5944
|
* ty.setStorage({
|
|
@@ -5942,7 +5985,7 @@ declare namespace ty {
|
|
|
5942
5985
|
* 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。
|
|
5943
5986
|
* @public
|
|
5944
5987
|
* @since BaseKit 2.0.1
|
|
5945
|
-
* @example
|
|
5988
|
+
* @example
|
|
5946
5989
|
* ```tsx
|
|
5947
5990
|
* // 将数据写入本地缓存指定 key(覆盖原内容)
|
|
5948
5991
|
* ty.setStorage({
|
|
@@ -5960,7 +6003,7 @@ declare namespace ty {
|
|
|
5960
6003
|
* 从本地缓存中异步获取指定 key 的内容
|
|
5961
6004
|
* @public
|
|
5962
6005
|
* @since BaseKit 2.0.1
|
|
5963
|
-
* @example
|
|
6006
|
+
* @example
|
|
5964
6007
|
* ```tsx
|
|
5965
6008
|
* // 获取本地缓存指定 key 的内容:先写后读,演示完整往返
|
|
5966
6009
|
* ty.setStorage({
|
|
@@ -6014,7 +6057,7 @@ declare namespace ty {
|
|
|
6014
6057
|
* 从本地缓存中异步获取指定 key 的内容
|
|
6015
6058
|
* @public
|
|
6016
6059
|
* @since BaseKit 2.0.1
|
|
6017
|
-
* @example
|
|
6060
|
+
* @example
|
|
6018
6061
|
* ```tsx
|
|
6019
6062
|
* // 获取本地缓存指定 key 的内容:先写后读,演示完整往返
|
|
6020
6063
|
* ty.setStorage({
|
|
@@ -6039,7 +6082,7 @@ declare namespace ty {
|
|
|
6039
6082
|
* 清理本地数据缓存
|
|
6040
6083
|
* @public
|
|
6041
6084
|
* @since BaseKit 2.0.1
|
|
6042
|
-
* @example
|
|
6085
|
+
* @example
|
|
6043
6086
|
* ```tsx
|
|
6044
6087
|
* // 删除本地缓存指定 key:先写入再删除
|
|
6045
6088
|
* ty.setStorage({
|
|
@@ -6087,7 +6130,7 @@ declare namespace ty {
|
|
|
6087
6130
|
* 清理本地数据缓存
|
|
6088
6131
|
* @public
|
|
6089
6132
|
* @since BaseKit 2.0.1
|
|
6090
|
-
* @example
|
|
6133
|
+
* @example
|
|
6091
6134
|
* ```tsx
|
|
6092
6135
|
* // 删除本地缓存指定 key:先写入再删除
|
|
6093
6136
|
* ty.setStorage({
|
|
@@ -6111,7 +6154,7 @@ declare namespace ty {
|
|
|
6111
6154
|
* 清理本地数据缓存
|
|
6112
6155
|
* @public
|
|
6113
6156
|
* @since BaseKit 2.0.1
|
|
6114
|
-
* @example
|
|
6157
|
+
* @example
|
|
6115
6158
|
* ```tsx
|
|
6116
6159
|
* // 清空本地数据缓存
|
|
6117
6160
|
* ty.clearStorage({
|
|
@@ -6146,7 +6189,7 @@ declare namespace ty {
|
|
|
6146
6189
|
* 清理本地数据缓存
|
|
6147
6190
|
* @public
|
|
6148
6191
|
* @since BaseKit 2.0.1
|
|
6149
|
-
* @example
|
|
6192
|
+
* @example
|
|
6150
6193
|
* ```tsx
|
|
6151
6194
|
* // 清空本地数据缓存
|
|
6152
6195
|
* ty.clearStorage({
|
|
@@ -6162,7 +6205,7 @@ declare namespace ty {
|
|
|
6162
6205
|
* 异步获取当前storage的相关信息
|
|
6163
6206
|
* @public
|
|
6164
6207
|
* @since BaseKit 3.30.1
|
|
6165
|
-
* @example
|
|
6208
|
+
* @example
|
|
6166
6209
|
* ```tsx
|
|
6167
6210
|
* // 获取当前 storage 信息:所有 key、已用大小、限制大小(kb)
|
|
6168
6211
|
* ty.getStorageInfo({
|
|
@@ -6213,7 +6256,7 @@ declare namespace ty {
|
|
|
6213
6256
|
* 异步获取当前storage的相关信息
|
|
6214
6257
|
* @public
|
|
6215
6258
|
* @since BaseKit 3.30.1
|
|
6216
|
-
* @example
|
|
6259
|
+
* @example
|
|
6217
6260
|
* ```tsx
|
|
6218
6261
|
* // 获取当前 storage 信息:所有 key、已用大小、限制大小(kb)
|
|
6219
6262
|
* ty.getStorageInfo({
|
|
@@ -6245,7 +6288,7 @@ declare namespace ty {
|
|
|
6245
6288
|
* 将数据批量存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。
|
|
6246
6289
|
* @public
|
|
6247
6290
|
* @since BaseKit 3.30.1
|
|
6248
|
-
* @example
|
|
6291
|
+
* @example
|
|
6249
6292
|
* ```tsx
|
|
6250
6293
|
* // 批量写入本地缓存(kvList 为 key-value 列表)
|
|
6251
6294
|
* ty.batchSetStorage({
|
|
@@ -6289,7 +6332,7 @@ declare namespace ty {
|
|
|
6289
6332
|
* 将数据批量存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。
|
|
6290
6333
|
* @public
|
|
6291
6334
|
* @since BaseKit 3.30.1
|
|
6292
|
-
* @example
|
|
6335
|
+
* @example
|
|
6293
6336
|
* ```tsx
|
|
6294
6337
|
* // 批量写入本地缓存(kvList 为 key-value 列表)
|
|
6295
6338
|
* ty.batchSetStorage({
|
|
@@ -6311,7 +6354,7 @@ declare namespace ty {
|
|
|
6311
6354
|
* 从本地缓存中异步批量获取指定 key 的内容
|
|
6312
6355
|
* @public
|
|
6313
6356
|
* @since BaseKit 3.30.1
|
|
6314
|
-
* @example
|
|
6357
|
+
* @example
|
|
6315
6358
|
* ```tsx
|
|
6316
6359
|
* // 批量获取本地缓存:先批量写入再批量读取,演示完整往返
|
|
6317
6360
|
* ty.batchSetStorage({
|
|
@@ -6367,7 +6410,7 @@ declare namespace ty {
|
|
|
6367
6410
|
* 从本地缓存中异步批量获取指定 key 的内容
|
|
6368
6411
|
* @public
|
|
6369
6412
|
* @since BaseKit 3.30.1
|
|
6370
|
-
* @example
|
|
6413
|
+
* @example
|
|
6371
6414
|
* ```tsx
|
|
6372
6415
|
* // 批量获取本地缓存:先批量写入再批量读取,演示完整往返
|
|
6373
6416
|
* ty.batchSetStorage({
|
|
@@ -6399,7 +6442,7 @@ declare namespace ty {
|
|
|
6399
6442
|
* onAccessibilityModeChange 监听无障碍模式变化
|
|
6400
6443
|
* @public
|
|
6401
6444
|
* @since BaseKit 3.31.18
|
|
6402
|
-
* @example
|
|
6445
|
+
* @example
|
|
6403
6446
|
* ```tsx
|
|
6404
6447
|
* // Step 1: 先查询当前无障碍模式状态
|
|
6405
6448
|
* ty.getAccessibilityMode({
|
|
@@ -6425,7 +6468,7 @@ declare namespace ty {
|
|
|
6425
6468
|
* onAccessibilityModeChange 监听无障碍模式变化
|
|
6426
6469
|
* @public
|
|
6427
6470
|
* @since BaseKit 3.31.18
|
|
6428
|
-
* @example
|
|
6471
|
+
* @example
|
|
6429
6472
|
* ```tsx
|
|
6430
6473
|
* const listener = function (res) { console.log(res) }
|
|
6431
6474
|
* ty.onAccessibilityModeChange(listener)
|
|
@@ -6441,7 +6484,7 @@ declare namespace ty {
|
|
|
6441
6484
|
* 开始文件上传
|
|
6442
6485
|
* @public
|
|
6443
6486
|
* @since BaseKit 3.14.2
|
|
6444
|
-
* @example
|
|
6487
|
+
* @example
|
|
6445
6488
|
* ```tsx
|
|
6446
6489
|
* // 注册监听 + 触发一次真实上传(选 7 寸屏 → 相册选图 → V2 init → V2 上传),上传开始时事件触发。
|
|
6447
6490
|
* const { homeId } = await ty.home.getCurrentHomeInfo();
|
|
@@ -6484,7 +6527,7 @@ declare namespace ty {
|
|
|
6484
6527
|
* 开始文件上传
|
|
6485
6528
|
* @public
|
|
6486
6529
|
* @since BaseKit 3.14.2
|
|
6487
|
-
* @example
|
|
6530
|
+
* @example
|
|
6488
6531
|
* ```tsx
|
|
6489
6532
|
* const listener = function (res) { console.log(res) }
|
|
6490
6533
|
* ty.onUploadFileToDeviceStart(listener)
|
|
@@ -6500,7 +6543,7 @@ declare namespace ty {
|
|
|
6500
6543
|
* 上传文件进度回调
|
|
6501
6544
|
* @public
|
|
6502
6545
|
* @since BaseKit 3.14.2
|
|
6503
|
-
* @example
|
|
6546
|
+
* @example
|
|
6504
6547
|
* ```tsx
|
|
6505
6548
|
* // 注册监听 + 触发一次真实上传(选 7 寸屏 → 相册选图 → V2 init → V2 上传),上传过程中进度事件触发。
|
|
6506
6549
|
* const { homeId } = await ty.home.getCurrentHomeInfo();
|
|
@@ -6543,7 +6586,7 @@ declare namespace ty {
|
|
|
6543
6586
|
* 上传文件进度回调
|
|
6544
6587
|
* @public
|
|
6545
6588
|
* @since BaseKit 3.14.2
|
|
6546
|
-
* @example
|
|
6589
|
+
* @example
|
|
6547
6590
|
* ```tsx
|
|
6548
6591
|
* const listener = function (res) { console.log(res) }
|
|
6549
6592
|
* ty.onUploadFileToDeviceProgress(listener)
|
|
@@ -6559,7 +6602,7 @@ declare namespace ty {
|
|
|
6559
6602
|
* 批量文件上传完成回调
|
|
6560
6603
|
* @public
|
|
6561
6604
|
* @since BaseKit 3.14.2
|
|
6562
|
-
* @example
|
|
6605
|
+
* @example
|
|
6563
6606
|
* ```tsx
|
|
6564
6607
|
* // 注册监听 + 触发一次真实上传(选 7 寸屏 → 相册选图 → V2 init → V2 上传),批量上传完成时事件触发。
|
|
6565
6608
|
* const { homeId } = await ty.home.getCurrentHomeInfo();
|
|
@@ -6602,7 +6645,7 @@ declare namespace ty {
|
|
|
6602
6645
|
* 批量文件上传完成回调
|
|
6603
6646
|
* @public
|
|
6604
6647
|
* @since BaseKit 3.14.2
|
|
6605
|
-
* @example
|
|
6648
|
+
* @example
|
|
6606
6649
|
* ```tsx
|
|
6607
6650
|
* const listener = function (res) { console.log(res) }
|
|
6608
6651
|
* ty.onUploadFileToDeviceComplete(listener)
|
|
@@ -6618,7 +6661,7 @@ declare namespace ty {
|
|
|
6618
6661
|
* 分片上传进度回调
|
|
6619
6662
|
* @public
|
|
6620
6663
|
* @since BaseKit 3.14.2
|
|
6621
|
-
* @example
|
|
6664
|
+
* @example
|
|
6622
6665
|
* ```tsx
|
|
6623
6666
|
* // 注册监听 + 触发一次真实上传(选 7 寸屏 → 相册选图 → V2 init → V2 上传)。
|
|
6624
6667
|
* // 注意:分片进度仅在文件较大、触发分片上传时才回调;小图可能不分片、不触发该事件。
|
|
@@ -6662,7 +6705,7 @@ declare namespace ty {
|
|
|
6662
6705
|
* 分片上传进度回调
|
|
6663
6706
|
* @public
|
|
6664
6707
|
* @since BaseKit 3.14.2
|
|
6665
|
-
* @example
|
|
6708
|
+
* @example
|
|
6666
6709
|
* ```tsx
|
|
6667
6710
|
* const listener = function (res) { console.log(res) }
|
|
6668
6711
|
* ty.onUploadFileFragToDeviceProgress(listener)
|
|
@@ -6678,7 +6721,7 @@ declare namespace ty {
|
|
|
6678
6721
|
* 开始文件下载,回传任务 taskId
|
|
6679
6722
|
* @public
|
|
6680
6723
|
* @since BaseKit 3.32.4
|
|
6681
|
-
* @example
|
|
6724
|
+
* @example
|
|
6682
6725
|
* ```tsx
|
|
6683
6726
|
* // 注册下载开始事件 + 触发一次真实下载(选屏 → V2 init → 选图 → 上传抓 cloudUrl/picId → 下载)。
|
|
6684
6727
|
* const { homeId } = await ty.home.getCurrentHomeInfo();
|
|
@@ -6740,7 +6783,7 @@ declare namespace ty {
|
|
|
6740
6783
|
* 开始文件下载,回传任务 taskId
|
|
6741
6784
|
* @public
|
|
6742
6785
|
* @since BaseKit 3.32.4
|
|
6743
|
-
* @example
|
|
6786
|
+
* @example
|
|
6744
6787
|
* ```tsx
|
|
6745
6788
|
* const listener = function (res) { console.log(res) }
|
|
6746
6789
|
* ty.onDownloadFileFromDeviceStart(listener)
|
|
@@ -6756,7 +6799,7 @@ declare namespace ty {
|
|
|
6756
6799
|
* 单文件下载进度回调
|
|
6757
6800
|
* @public
|
|
6758
6801
|
* @since BaseKit 3.32.4
|
|
6759
|
-
* @example
|
|
6802
|
+
* @example
|
|
6760
6803
|
* ```tsx
|
|
6761
6804
|
* // 注册下载进度事件 + 触发一次真实下载(选屏 → V2 init → 选图 → 上传抓 cloudUrl/picId → 下载)。
|
|
6762
6805
|
* const { homeId } = await ty.home.getCurrentHomeInfo();
|
|
@@ -6818,7 +6861,7 @@ declare namespace ty {
|
|
|
6818
6861
|
* 单文件下载进度回调
|
|
6819
6862
|
* @public
|
|
6820
6863
|
* @since BaseKit 3.32.4
|
|
6821
|
-
* @example
|
|
6864
|
+
* @example
|
|
6822
6865
|
* ```tsx
|
|
6823
6866
|
* const listener = function (res) { console.log(res) }
|
|
6824
6867
|
* ty.onDownloadFileFromDeviceProgress(listener)
|
|
@@ -6834,7 +6877,7 @@ declare namespace ty {
|
|
|
6834
6877
|
* 批量文件下载完成回调
|
|
6835
6878
|
* @public
|
|
6836
6879
|
* @since BaseKit 3.32.4
|
|
6837
|
-
* @example
|
|
6880
|
+
* @example
|
|
6838
6881
|
* ```tsx
|
|
6839
6882
|
* // 注册下载完成事件 + 触发一次真实下载(选屏 → V2 init → 选图 → 上传抓 cloudUrl/picId → 下载)。
|
|
6840
6883
|
* const { homeId } = await ty.home.getCurrentHomeInfo();
|
|
@@ -6896,7 +6939,7 @@ declare namespace ty {
|
|
|
6896
6939
|
* 批量文件下载完成回调
|
|
6897
6940
|
* @public
|
|
6898
6941
|
* @since BaseKit 3.32.4
|
|
6899
|
-
* @example
|
|
6942
|
+
* @example
|
|
6900
6943
|
* ```tsx
|
|
6901
6944
|
* const listener = function (res) { console.log(res) }
|
|
6902
6945
|
* ty.onDownloadFileFromDeviceComplete(listener)
|
|
@@ -6912,7 +6955,7 @@ declare namespace ty {
|
|
|
6912
6955
|
* onKeyboardHeightChange 发送键盘事件给js
|
|
6913
6956
|
* @public
|
|
6914
6957
|
* @since BaseKit 3.6.1
|
|
6915
|
-
* @example
|
|
6958
|
+
* @example
|
|
6916
6959
|
* ```tsx
|
|
6917
6960
|
* // 注册键盘高度变化事件 + 用 scanCode 的键盘输入模式拉起系统键盘。
|
|
6918
6961
|
* // scanCode 传 isShowKeyboard:true 会在扫码页提供“键盘输入”入口,进入后输入框自动聚焦弹出系统键盘,键盘高度变化触发 onKeyboardHeightChange。
|
|
@@ -6942,7 +6985,7 @@ declare namespace ty {
|
|
|
6942
6985
|
* onKeyboardHeightChange 发送键盘事件给js
|
|
6943
6986
|
* @public
|
|
6944
6987
|
* @since BaseKit 3.6.1
|
|
6945
|
-
* @example
|
|
6988
|
+
* @example
|
|
6946
6989
|
* ```tsx
|
|
6947
6990
|
* const listener = function (res) { console.log(res) }
|
|
6948
6991
|
* ty.onKeyboardHeightChange(listener)
|
|
@@ -6958,7 +7001,7 @@ declare namespace ty {
|
|
|
6958
7001
|
* 键盘弹出
|
|
6959
7002
|
* @public
|
|
6960
7003
|
* @since BaseKit 3.6.6
|
|
6961
|
-
* @example
|
|
7004
|
+
* @example
|
|
6962
7005
|
* ```tsx
|
|
6963
7006
|
* // 注册键盘弹出事件 + 用 scanCode 的键盘输入模式拉起系统键盘。
|
|
6964
7007
|
* // scanCode 传 isShowKeyboard:true 会在扫码页提供“键盘输入”入口,进入后输入框自动聚焦弹出系统键盘,触发 onKeyboardWillShow。
|
|
@@ -6988,7 +7031,7 @@ declare namespace ty {
|
|
|
6988
7031
|
* 键盘弹出
|
|
6989
7032
|
* @public
|
|
6990
7033
|
* @since BaseKit 3.6.6
|
|
6991
|
-
* @example
|
|
7034
|
+
* @example
|
|
6992
7035
|
* ```tsx
|
|
6993
7036
|
* const listener = function (res) { console.log(res) }
|
|
6994
7037
|
* ty.onKeyboardWillShow(listener)
|
|
@@ -7004,7 +7047,7 @@ declare namespace ty {
|
|
|
7004
7047
|
* 键盘消息
|
|
7005
7048
|
* @public
|
|
7006
7049
|
* @since BaseKit 3.6.6
|
|
7007
|
-
* @example
|
|
7050
|
+
* @example
|
|
7008
7051
|
* ```tsx
|
|
7009
7052
|
* // 注册键盘收起事件 + 用 scanCode 的键盘输入模式拉起再收起系统键盘。
|
|
7010
7053
|
* // scanCode 传 isShowKeyboard:true 进入键盘输入页后键盘自动弹出,点返回/取消退出输入页即收起键盘,触发 onKeyboardWillHide。
|
|
@@ -7034,7 +7077,7 @@ declare namespace ty {
|
|
|
7034
7077
|
* 键盘消息
|
|
7035
7078
|
* @public
|
|
7036
7079
|
* @since BaseKit 3.6.6
|
|
7037
|
-
* @example
|
|
7080
|
+
* @example
|
|
7038
7081
|
* ```tsx
|
|
7039
7082
|
* const listener = function (res) { console.log(res) }
|
|
7040
7083
|
* ty.onKeyboardWillHide(listener)
|
|
@@ -7050,7 +7093,7 @@ declare namespace ty {
|
|
|
7050
7093
|
* 闪光灯开启状态Event事件
|
|
7051
7094
|
* @public
|
|
7052
7095
|
* @since BaseKit 3.31.0
|
|
7053
|
-
* @example
|
|
7096
|
+
* @example
|
|
7054
7097
|
* ```tsx
|
|
7055
7098
|
* // 监听闪光灯开启状态变化:先注册监听,再初始化并打开以触发一次状态变化事件
|
|
7056
7099
|
* ty.onFlashLightStatusChange(e => {
|
|
@@ -7073,7 +7116,7 @@ declare namespace ty {
|
|
|
7073
7116
|
* 闪光灯开启状态Event事件
|
|
7074
7117
|
* @public
|
|
7075
7118
|
* @since BaseKit 3.31.0
|
|
7076
|
-
* @example
|
|
7119
|
+
* @example
|
|
7077
7120
|
* ```tsx
|
|
7078
7121
|
* const listener = function (res) { console.log(res) }
|
|
7079
7122
|
* ty.onFlashLightStatusChange(listener)
|
|
@@ -7090,7 +7133,7 @@ declare namespace ty {
|
|
|
7090
7133
|
* 关联API:[registerSystemVolumeChange, unRegisterSystemVolumeChange]
|
|
7091
7134
|
* @public
|
|
7092
7135
|
* @since BaseKit 2.5.0
|
|
7093
|
-
* @example
|
|
7136
|
+
* @example
|
|
7094
7137
|
* ```tsx
|
|
7095
7138
|
* ty.registerSystemVolumeChange({
|
|
7096
7139
|
* success: data => {
|
|
@@ -7118,7 +7161,7 @@ declare namespace ty {
|
|
|
7118
7161
|
* 关联API:[registerSystemVolumeChange, unRegisterSystemVolumeChange]
|
|
7119
7162
|
* @public
|
|
7120
7163
|
* @since BaseKit 2.5.0
|
|
7121
|
-
* @example
|
|
7164
|
+
* @example
|
|
7122
7165
|
* ```tsx
|
|
7123
7166
|
* const listener = function (res) { console.log(res) }
|
|
7124
7167
|
* ty.onSystemVolumeChangeEvent(listener)
|
|
@@ -7134,7 +7177,7 @@ declare namespace ty {
|
|
|
7134
7177
|
* 监听获取到 Wi-Fi 列表数据事件
|
|
7135
7178
|
* @public
|
|
7136
7179
|
* @since BaseKit 2.4.3
|
|
7137
|
-
* @example
|
|
7180
|
+
* @example
|
|
7138
7181
|
* ```tsx
|
|
7139
7182
|
* ty.onGetWifiList(e => {
|
|
7140
7183
|
* console.log(e);
|
|
@@ -7150,7 +7193,7 @@ declare namespace ty {
|
|
|
7150
7193
|
* 监听获取到 Wi-Fi 列表数据事件
|
|
7151
7194
|
* @public
|
|
7152
7195
|
* @since BaseKit 2.4.3
|
|
7153
|
-
* @example
|
|
7196
|
+
* @example
|
|
7154
7197
|
* ```tsx
|
|
7155
7198
|
* const listener = function (res) { console.log(res) }
|
|
7156
7199
|
* ty.onGetWifiList(listener)
|
|
@@ -7165,7 +7208,22 @@ declare namespace ty {
|
|
|
7165
7208
|
/**
|
|
7166
7209
|
* 录屏被系统自动结束事件(如应用进入后台)
|
|
7167
7210
|
* @public
|
|
7168
|
-
* @since BaseKit
|
|
7211
|
+
* @since BaseKit 3.38.14
|
|
7212
|
+
* @example
|
|
7213
|
+
* ```tsx
|
|
7214
|
+
* ty.onScreenRecordingAutoStopped(data => {
|
|
7215
|
+
* console.log(data);
|
|
7216
|
+
* });
|
|
7217
|
+
*
|
|
7218
|
+
* ty.startScreenRecording({
|
|
7219
|
+
* success: data => {
|
|
7220
|
+
* console.log(data.recordingId);
|
|
7221
|
+
* },
|
|
7222
|
+
* fail: error => {
|
|
7223
|
+
* console.error(error);
|
|
7224
|
+
* },
|
|
7225
|
+
* });
|
|
7226
|
+
* ```
|
|
7169
7227
|
* @platform iOS Android
|
|
7170
7228
|
*/
|
|
7171
7229
|
export function onScreenRecordingAutoStopped(
|
|
@@ -7175,8 +7233,8 @@ declare namespace ty {
|
|
|
7175
7233
|
/**
|
|
7176
7234
|
* 录屏被系统自动结束事件(如应用进入后台)
|
|
7177
7235
|
* @public
|
|
7178
|
-
* @since BaseKit
|
|
7179
|
-
* @example
|
|
7236
|
+
* @since BaseKit 3.38.14
|
|
7237
|
+
* @example
|
|
7180
7238
|
* ```tsx
|
|
7181
7239
|
* const listener = function (res) { console.log(res) }
|
|
7182
7240
|
* ty.onScreenRecordingAutoStopped(listener)
|
|
@@ -7192,7 +7250,7 @@ declare namespace ty {
|
|
|
7192
7250
|
* 持续录音事件
|
|
7193
7251
|
* @public
|
|
7194
7252
|
* @since BaseKit 2.3.2
|
|
7195
|
-
* @example
|
|
7253
|
+
* @example
|
|
7196
7254
|
* ```tsx
|
|
7197
7255
|
* const manager = await ty.getRecorderManager();
|
|
7198
7256
|
*
|
|
@@ -7228,7 +7286,7 @@ declare namespace ty {
|
|
|
7228
7286
|
* 持续录音事件
|
|
7229
7287
|
* @public
|
|
7230
7288
|
* @since BaseKit 2.3.2
|
|
7231
|
-
* @example
|
|
7289
|
+
* @example
|
|
7232
7290
|
* ```tsx
|
|
7233
7291
|
* const listener = function (res) { console.log(res) }
|
|
7234
7292
|
* ty.onRecordingEvent(listener)
|
|
@@ -7244,7 +7302,7 @@ declare namespace ty {
|
|
|
7244
7302
|
* 振幅强度回调, (0-1f)
|
|
7245
7303
|
* @public
|
|
7246
7304
|
* @since BaseKit 3.27.2
|
|
7247
|
-
* @example
|
|
7305
|
+
* @example
|
|
7248
7306
|
* ```tsx
|
|
7249
7307
|
* const manager = await ty.getRecorderManager();
|
|
7250
7308
|
*
|
|
@@ -7302,7 +7360,7 @@ declare namespace ty {
|
|
|
7302
7360
|
* 振幅强度回调, (0-1f)
|
|
7303
7361
|
* @public
|
|
7304
7362
|
* @since BaseKit 3.27.2
|
|
7305
|
-
* @example
|
|
7363
|
+
* @example
|
|
7306
7364
|
* ```tsx
|
|
7307
7365
|
* const listener = function (res) { console.log(res) }
|
|
7308
7366
|
* ty.onRecordingAmplitudeEvent(listener)
|
|
@@ -7318,7 +7376,7 @@ declare namespace ty {
|
|
|
7318
7376
|
* 监听加速度数据事件(精度为系统返回,双端可能不一致)
|
|
7319
7377
|
* @public
|
|
7320
7378
|
* @since BaseKit 2.3.2
|
|
7321
|
-
* @example
|
|
7379
|
+
* @example
|
|
7322
7380
|
* ```tsx
|
|
7323
7381
|
* await ty.startAccelerometer({ interval: "normal" });
|
|
7324
7382
|
* ty.onAccelerometerChange(e => {
|
|
@@ -7351,7 +7409,7 @@ declare namespace ty {
|
|
|
7351
7409
|
* 取消监听加速度数据事件,参数为空,则取消所有的事件监听
|
|
7352
7410
|
* @public
|
|
7353
7411
|
* @since BaseKit 2.3.2
|
|
7354
|
-
* @example
|
|
7412
|
+
* @example
|
|
7355
7413
|
* ```tsx
|
|
7356
7414
|
* await ty.startAccelerometer({ interval: "normal" });
|
|
7357
7415
|
* const listener = e => {
|
|
@@ -7387,7 +7445,7 @@ declare namespace ty {
|
|
|
7387
7445
|
* 监听罗盘数据变化事件
|
|
7388
7446
|
* @public
|
|
7389
7447
|
* @since BaseKit 2.3.2
|
|
7390
|
-
* @example
|
|
7448
|
+
* @example
|
|
7391
7449
|
* ```tsx
|
|
7392
7450
|
* // 监听罗盘数据变化:先注册 onCompassChange,再 startCompass 启动传感器,朝向数据即通过回调返回
|
|
7393
7451
|
* ty.onCompassChange(e => {
|
|
@@ -7428,7 +7486,7 @@ declare namespace ty {
|
|
|
7428
7486
|
* 取消监听罗盘数据变化事件,参数为空,则取消所有的事件监听
|
|
7429
7487
|
* @public
|
|
7430
7488
|
* @since BaseKit 2.3.2
|
|
7431
|
-
* @example
|
|
7489
|
+
* @example
|
|
7432
7490
|
* ```tsx
|
|
7433
7491
|
* // 取消监听罗盘:先 onCompassChange + startCompass 建立监听,再 offCompassChange 取消
|
|
7434
7492
|
* ty.onCompassChange(e => console.log(e));
|
|
@@ -7471,7 +7529,7 @@ declare namespace ty {
|
|
|
7471
7529
|
* 监听设备方向变化事件(数据为系统返回,双端精度可能不一致)
|
|
7472
7530
|
* @public
|
|
7473
7531
|
* @since BaseKit 2.3.2
|
|
7474
|
-
* @example
|
|
7532
|
+
* @example
|
|
7475
7533
|
* ```tsx
|
|
7476
7534
|
* // 设备方向事件需先开启监听才会回调,故先 start 再注册。
|
|
7477
7535
|
* ty.startDeviceMotionListening({ interval: "normal" });
|
|
@@ -7511,7 +7569,7 @@ declare namespace ty {
|
|
|
7511
7569
|
* 取消监听设备方向变化事件,参数为空,则取消所有的事件监听。
|
|
7512
7570
|
* @public
|
|
7513
7571
|
* @since BaseKit 2.3.2
|
|
7514
|
-
* @example
|
|
7572
|
+
* @example
|
|
7515
7573
|
* ```tsx
|
|
7516
7574
|
* // 取消方向监听:先注册一个监听,再 offDeviceMotionChange 取消(不传参 = 取消全部)。
|
|
7517
7575
|
* // 末尾 stopDeviceMotionListening 的 success 回调作为用例完成信号
|
|
@@ -7556,7 +7614,7 @@ declare namespace ty {
|
|
|
7556
7614
|
* 监听陀螺仪数据变化事件(数据为系统返回,双端精度可能不一致)
|
|
7557
7615
|
* @public
|
|
7558
7616
|
* @since BaseKit 2.3.2
|
|
7559
|
-
* @example
|
|
7617
|
+
* @example
|
|
7560
7618
|
* ```tsx
|
|
7561
7619
|
* // 监听陀螺仪数据变化:先注册 onGyroscopeChange,再 startGyroscope 启动传感器,x/y/z 数据即通过回调返回
|
|
7562
7620
|
* ty.onGyroscopeChange(e => {
|
|
@@ -7594,7 +7652,7 @@ declare namespace ty {
|
|
|
7594
7652
|
* 取消监听陀螺仪数据变化事件。
|
|
7595
7653
|
* @public
|
|
7596
7654
|
* @since BaseKit 2.3.2
|
|
7597
|
-
* @example
|
|
7655
|
+
* @example
|
|
7598
7656
|
* ```tsx
|
|
7599
7657
|
* // 取消监听陀螺仪:先 onGyroscopeChange + startGyroscope 建立监听,再 offGyroscopeChange 取消
|
|
7600
7658
|
* ty.onGyroscopeChange(e => console.log(e));
|
|
@@ -7635,7 +7693,7 @@ declare namespace ty {
|
|
|
7635
7693
|
* 当 iOS/Android 向小程序进程发出内存警告时,触发该事件。触发该事件不意味小程序被杀,大部分情况下仅仅是告警,开发者可在收到通知后回收一些不必要资源避免进一步加剧内存紧张。
|
|
7636
7694
|
* @public
|
|
7637
7695
|
* @since BaseKit 2.3.2
|
|
7638
|
-
* @example
|
|
7696
|
+
* @example
|
|
7639
7697
|
* ```tsx
|
|
7640
7698
|
* // 监听内存不足告警,系统低内存时回调返回告警等级(level 仅 Android 有)
|
|
7641
7699
|
* ty.onMemoryWarning(e => {
|
|
@@ -7660,7 +7718,7 @@ declare namespace ty {
|
|
|
7660
7718
|
* 取消监听内存不足告警事件。
|
|
7661
7719
|
* @public
|
|
7662
7720
|
* @since BaseKit 2.3.2
|
|
7663
|
-
* @example
|
|
7721
|
+
* @example
|
|
7664
7722
|
* ```tsx
|
|
7665
7723
|
* // 取消监听内存告警:需先有 onMemoryWarning 注册,offMemoryWarning() 不传参即取消全部监听
|
|
7666
7724
|
* ty.onMemoryWarning(e => console.log(e));
|
|
@@ -7682,7 +7740,7 @@ declare namespace ty {
|
|
|
7682
7740
|
* 监听设备方向变化事件
|
|
7683
7741
|
* @public
|
|
7684
7742
|
* @since BaseKit 3.25.0
|
|
7685
|
-
* @example
|
|
7743
|
+
* @example
|
|
7686
7744
|
* ```tsx
|
|
7687
7745
|
* // 监听设备方向变化,旋转设备时回调返回新方向
|
|
7688
7746
|
* ty.onOrientationChange(e => {
|
|
@@ -7709,7 +7767,7 @@ declare namespace ty {
|
|
|
7709
7767
|
* 取消监听设备方向变化事件
|
|
7710
7768
|
* @public
|
|
7711
7769
|
* @since BaseKit 3.25.0
|
|
7712
|
-
* @example
|
|
7770
|
+
* @example
|
|
7713
7771
|
* ```tsx
|
|
7714
7772
|
* // 取消监听设备方向变化:用具名回调注册,旋转设备触发一次变化后,再用同一回调精确取消该监听
|
|
7715
7773
|
* const handler = e => console.log("方向变化:", e.orientation);
|
|
@@ -7735,7 +7793,7 @@ declare namespace ty {
|
|
|
7735
7793
|
* 监听蓝牙适配器状态变化事件,需要申请蓝牙权限
|
|
7736
7794
|
* @public
|
|
7737
7795
|
* @since BaseKit 2.0.1
|
|
7738
|
-
* @example
|
|
7796
|
+
* @example
|
|
7739
7797
|
* ```tsx
|
|
7740
7798
|
* // 监听蓝牙适配器状态变化,开关手机蓝牙时回调返回适配器是否可用
|
|
7741
7799
|
* ty.onBluetoothAdapterStateChange(e => {
|
|
@@ -7760,7 +7818,7 @@ declare namespace ty {
|
|
|
7760
7818
|
* 取消监听蓝牙适配器状态变化事件
|
|
7761
7819
|
* @public
|
|
7762
7820
|
* @since BaseKit 2.0.1
|
|
7763
|
-
* @example
|
|
7821
|
+
* @example
|
|
7764
7822
|
* ```tsx
|
|
7765
7823
|
* // 取消监听蓝牙适配器状态变化:用具名回调注册,开关蓝牙触发一次后,再用同一回调精确取消该监听
|
|
7766
7824
|
* const handler = e => console.log("蓝牙适配器可用:", e.available);
|
|
@@ -7786,7 +7844,7 @@ declare namespace ty {
|
|
|
7786
7844
|
* 注意:在Android上,网络状态发生改变时,系统并不一定立马变更网络状态信息,存在一定的延迟。因此触发该事件时,业务上可能需要延迟调用getNetworkType接口,以便获取最新的信息。
|
|
7787
7845
|
* @public
|
|
7788
7846
|
* @since BaseKit 2.0.1
|
|
7789
|
-
* @example
|
|
7847
|
+
* @example
|
|
7790
7848
|
* ```tsx
|
|
7791
7849
|
* // 监听网络状态变化,切换网络(开关 WiFi / 飞行模式)时回调返回是否连接及网络类型
|
|
7792
7850
|
* ty.onNetworkStatusChange(e => {
|
|
@@ -7816,7 +7874,7 @@ declare namespace ty {
|
|
|
7816
7874
|
* 取消监听网络状态变化事件
|
|
7817
7875
|
* @public
|
|
7818
7876
|
* @since BaseKit 2.0.1
|
|
7819
|
-
* @example
|
|
7877
|
+
* @example
|
|
7820
7878
|
* ```tsx
|
|
7821
7879
|
* // 取消监听网络状态变化:用具名回调注册,切换网络触发一次后,再用同一回调精确取消该监听
|
|
7822
7880
|
* const handler = e => console.log("网络变化:", e.isConnected, e.networkType);
|
|
@@ -11446,83 +11504,83 @@ declare namespace ty {
|
|
|
11446
11504
|
|
|
11447
11505
|
/**
|
|
11448
11506
|
* 开始录屏返回结果
|
|
11449
|
-
* @since BaseKit
|
|
11507
|
+
* @since BaseKit 3.38.14
|
|
11450
11508
|
*/
|
|
11451
11509
|
export interface StartScreenRecordingResult {
|
|
11452
11510
|
/**
|
|
11453
11511
|
* 本次录屏会话 ID
|
|
11454
|
-
* @since BaseKit
|
|
11512
|
+
* @since BaseKit 3.38.14
|
|
11455
11513
|
*/
|
|
11456
11514
|
recordingId: string
|
|
11457
11515
|
}
|
|
11458
11516
|
|
|
11459
11517
|
/**
|
|
11460
11518
|
* 停止录屏参数
|
|
11461
|
-
* @since BaseKit
|
|
11519
|
+
* @since BaseKit 3.38.14
|
|
11462
11520
|
*/
|
|
11463
11521
|
export interface StopScreenRecordingParam {
|
|
11464
11522
|
/**
|
|
11465
11523
|
* 录屏会话 ID
|
|
11466
|
-
* @since BaseKit
|
|
11524
|
+
* @since BaseKit 3.38.14
|
|
11467
11525
|
*/
|
|
11468
11526
|
recordingId: string
|
|
11469
11527
|
}
|
|
11470
11528
|
|
|
11471
11529
|
/**
|
|
11472
11530
|
* 停止录屏返回结果
|
|
11473
|
-
* @since BaseKit
|
|
11531
|
+
* @since BaseKit 3.38.14
|
|
11474
11532
|
*/
|
|
11475
11533
|
export interface StopScreenRecordingResult {
|
|
11476
11534
|
/**
|
|
11477
11535
|
* 录屏会话 ID
|
|
11478
|
-
* @since BaseKit
|
|
11536
|
+
* @since BaseKit 3.38.14
|
|
11479
11537
|
*/
|
|
11480
11538
|
recordingId: string
|
|
11481
11539
|
/**
|
|
11482
11540
|
* 录屏文件路径
|
|
11483
|
-
* @since BaseKit
|
|
11541
|
+
* @since BaseKit 3.38.14
|
|
11484
11542
|
*/
|
|
11485
11543
|
filePath: string
|
|
11486
11544
|
/**
|
|
11487
11545
|
* 录屏时长,单位 ms
|
|
11488
|
-
* @since BaseKit
|
|
11546
|
+
* @since BaseKit 3.38.14
|
|
11489
11547
|
*/
|
|
11490
11548
|
duration: number
|
|
11491
11549
|
/**
|
|
11492
11550
|
* 录屏文件大小,单位 byte
|
|
11493
|
-
* @since BaseKit
|
|
11551
|
+
* @since BaseKit 3.38.14
|
|
11494
11552
|
*/
|
|
11495
11553
|
fileSize: number
|
|
11496
11554
|
}
|
|
11497
11555
|
|
|
11498
11556
|
/**
|
|
11499
11557
|
* 录屏被系统自动结束事件体
|
|
11500
|
-
* @since BaseKit
|
|
11558
|
+
* @since BaseKit 3.38.14
|
|
11501
11559
|
*/
|
|
11502
11560
|
export interface ScreenRecordingAutoStopEvent {
|
|
11503
11561
|
/**
|
|
11504
11562
|
* 录屏会话 ID
|
|
11505
|
-
* @since BaseKit
|
|
11563
|
+
* @since BaseKit 3.38.14
|
|
11506
11564
|
*/
|
|
11507
11565
|
recordingId: string
|
|
11508
11566
|
/**
|
|
11509
11567
|
* 自动结束原因,当前固定为 app_background
|
|
11510
|
-
* @since BaseKit
|
|
11568
|
+
* @since BaseKit 3.38.14
|
|
11511
11569
|
*/
|
|
11512
11570
|
reason: string
|
|
11513
11571
|
/**
|
|
11514
11572
|
* 录屏文件路径
|
|
11515
|
-
* @since BaseKit
|
|
11573
|
+
* @since BaseKit 3.38.14
|
|
11516
11574
|
*/
|
|
11517
11575
|
filePath: string
|
|
11518
11576
|
/**
|
|
11519
11577
|
* 录屏时长,单位 ms
|
|
11520
|
-
* @since BaseKit
|
|
11578
|
+
* @since BaseKit 3.38.14
|
|
11521
11579
|
*/
|
|
11522
11580
|
duration: number
|
|
11523
11581
|
/**
|
|
11524
11582
|
* 录屏文件大小,单位 byte
|
|
11525
|
-
* @since BaseKit
|
|
11583
|
+
* @since BaseKit 3.38.14
|
|
11526
11584
|
*/
|
|
11527
11585
|
fileSize: number
|
|
11528
11586
|
}
|
|
@@ -12129,7 +12187,7 @@ declare namespace ty {
|
|
|
12129
12187
|
* 暂停
|
|
12130
12188
|
* @public
|
|
12131
12189
|
* @since BaseKit 2.3.2
|
|
12132
|
-
* @example
|
|
12190
|
+
* @example
|
|
12133
12191
|
* ```tsx
|
|
12134
12192
|
* const manager = await ty.createInnerAudioContext();
|
|
12135
12193
|
*
|
|
@@ -12169,7 +12227,7 @@ declare namespace ty {
|
|
|
12169
12227
|
* 恢复
|
|
12170
12228
|
* @public
|
|
12171
12229
|
* @since BaseKit 2.3.2
|
|
12172
|
-
* @example
|
|
12230
|
+
* @example
|
|
12173
12231
|
* ```tsx
|
|
12174
12232
|
* const manager = await ty.createInnerAudioContext();
|
|
12175
12233
|
*
|
|
@@ -12209,7 +12267,7 @@ declare namespace ty {
|
|
|
12209
12267
|
* 播放
|
|
12210
12268
|
* @public
|
|
12211
12269
|
* @since BaseKit 2.3.2
|
|
12212
|
-
* @example
|
|
12270
|
+
* @example
|
|
12213
12271
|
* ```tsx
|
|
12214
12272
|
* const manager = await ty.createInnerAudioContext();
|
|
12215
12273
|
*
|
|
@@ -12290,7 +12348,7 @@ declare namespace ty {
|
|
|
12290
12348
|
* 跳转到指定位置
|
|
12291
12349
|
* @public
|
|
12292
12350
|
* @since BaseKit 2.3.2
|
|
12293
|
-
* @example
|
|
12351
|
+
* @example
|
|
12294
12352
|
* ```tsx
|
|
12295
12353
|
* const manager = await ty.createInnerAudioContext();
|
|
12296
12354
|
*
|
|
@@ -12337,7 +12395,7 @@ declare namespace ty {
|
|
|
12337
12395
|
* 停止。停止后的音频再播放会从头开始播放
|
|
12338
12396
|
* @public
|
|
12339
12397
|
* @since BaseKit 2.3.2
|
|
12340
|
-
* @example
|
|
12398
|
+
* @example
|
|
12341
12399
|
* ```tsx
|
|
12342
12400
|
* const manager = await ty.createInnerAudioContext();
|
|
12343
12401
|
*
|
|
@@ -12377,7 +12435,7 @@ declare namespace ty {
|
|
|
12377
12435
|
* 销毁当前实例
|
|
12378
12436
|
* @public
|
|
12379
12437
|
* @since BaseKit 2.3.2
|
|
12380
|
-
* @example
|
|
12438
|
+
* @example
|
|
12381
12439
|
* ```tsx
|
|
12382
12440
|
* const manager = await ty.createInnerAudioContext();
|
|
12383
12441
|
*
|
|
@@ -12418,7 +12476,7 @@ declare namespace ty {
|
|
|
12418
12476
|
* 销毁当前实例
|
|
12419
12477
|
* @public
|
|
12420
12478
|
* @since BaseKit 3.17.4
|
|
12421
|
-
* @example
|
|
12479
|
+
* @example
|
|
12422
12480
|
* ```tsx
|
|
12423
12481
|
* const manager = await ty.createInnerAudioContext();
|
|
12424
12482
|
*
|
|
@@ -12458,7 +12516,7 @@ declare namespace ty {
|
|
|
12458
12516
|
* 监听音频播放进度更新事件(进度为系统返回,双端可能不一致)
|
|
12459
12517
|
* @public
|
|
12460
12518
|
* @since BaseKit 2.4.3
|
|
12461
|
-
* @example
|
|
12519
|
+
* @example
|
|
12462
12520
|
* ```tsx
|
|
12463
12521
|
* const manager = await ty.createInnerAudioContext();
|
|
12464
12522
|
*
|
|
@@ -12492,7 +12550,7 @@ declare namespace ty {
|
|
|
12492
12550
|
* 取消监听音频播放进度更新事件
|
|
12493
12551
|
* @public
|
|
12494
12552
|
* @since BaseKit 3.19.0
|
|
12495
|
-
* @example
|
|
12553
|
+
* @example
|
|
12496
12554
|
* ```tsx
|
|
12497
12555
|
* const manager = await ty.createInnerAudioContext();
|
|
12498
12556
|
*
|
|
@@ -12528,7 +12586,7 @@ declare namespace ty {
|
|
|
12528
12586
|
* 监听音频播放状态事件
|
|
12529
12587
|
* @public
|
|
12530
12588
|
* @since BaseKit 3.19.0
|
|
12531
|
-
* @example
|
|
12589
|
+
* @example
|
|
12532
12590
|
* ```tsx
|
|
12533
12591
|
* const manager = await ty.createInnerAudioContext();
|
|
12534
12592
|
*
|
|
@@ -12557,7 +12615,7 @@ declare namespace ty {
|
|
|
12557
12615
|
* 取消监听音频播放状态事件
|
|
12558
12616
|
* @public
|
|
12559
12617
|
* @since BaseKit 3.19.0
|
|
12560
|
-
* @example
|
|
12618
|
+
* @example
|
|
12561
12619
|
* ```tsx
|
|
12562
12620
|
* const manager = await ty.createInnerAudioContext();
|
|
12563
12621
|
*
|
|
@@ -12588,7 +12646,7 @@ declare namespace ty {
|
|
|
12588
12646
|
* 创建内部audio上下文InnerAudioContext对象
|
|
12589
12647
|
* @public
|
|
12590
12648
|
* @since BaseKit 2.3.2
|
|
12591
|
-
* @example
|
|
12649
|
+
* @example
|
|
12592
12650
|
* ```tsx
|
|
12593
12651
|
* const manager = await ty.createInnerAudioContext();
|
|
12594
12652
|
* ```
|
|
@@ -12620,7 +12678,7 @@ declare namespace ty {
|
|
|
12620
12678
|
* 关闭小部件弹窗
|
|
12621
12679
|
* @public
|
|
12622
12680
|
* @since BaseKit 3.0.3
|
|
12623
|
-
* @example
|
|
12681
|
+
* @example
|
|
12624
12682
|
* ```tsx
|
|
12625
12683
|
* const dialog = await ty.openMiniWidget({
|
|
12626
12684
|
* appId: "ty8gpajcefnj0capj4",
|
|
@@ -12663,7 +12721,7 @@ declare namespace ty {
|
|
|
12663
12721
|
* 监听widget关闭事件
|
|
12664
12722
|
* @public
|
|
12665
12723
|
* @since BaseKit 3.0.4
|
|
12666
|
-
* @example
|
|
12724
|
+
* @example
|
|
12667
12725
|
* ```tsx
|
|
12668
12726
|
* const dialog = await ty.openMiniWidget({
|
|
12669
12727
|
* appId: "ty8gpajcefnj0capj4",
|
|
@@ -12690,7 +12748,7 @@ declare namespace ty {
|
|
|
12690
12748
|
* 取消监听widget关闭事件
|
|
12691
12749
|
* @public
|
|
12692
12750
|
* @since BaseKit 3.0.4
|
|
12693
|
-
* @example
|
|
12751
|
+
* @example
|
|
12694
12752
|
* ```tsx
|
|
12695
12753
|
* const dialog = await ty.openMiniWidget({
|
|
12696
12754
|
* appId: "ty8gpajcefnj0capj4",
|
|
@@ -12719,7 +12777,7 @@ declare namespace ty {
|
|
|
12719
12777
|
* 打开小部件弹窗
|
|
12720
12778
|
* @public
|
|
12721
12779
|
* @since BaseKit 3.0.3
|
|
12722
|
-
* @example
|
|
12780
|
+
* @example
|
|
12723
12781
|
* ```tsx
|
|
12724
12782
|
* // deviceId 为面板类 widget 的可选参数,取当前账号下第一台设备。
|
|
12725
12783
|
* const { homeId } = await ty.home.getCurrentHomeInfo();
|
|
@@ -12831,7 +12889,7 @@ declare namespace ty {
|
|
|
12831
12889
|
* 中断下载任务
|
|
12832
12890
|
* @public
|
|
12833
12891
|
* @since BaseKit 2.0.1
|
|
12834
|
-
* @example
|
|
12892
|
+
* @example
|
|
12835
12893
|
* ```tsx
|
|
12836
12894
|
* // abort 是 DownloadTask 上的方法,需先用 ty.downloadFile 拿到下载任务句柄。
|
|
12837
12895
|
* const downloadTask = await ty.downloadFile({
|
|
@@ -12874,7 +12932,7 @@ declare namespace ty {
|
|
|
12874
12932
|
* 监听 HTTP Response Header 事件。会比请求完成事件更早
|
|
12875
12933
|
* @public
|
|
12876
12934
|
* @since BaseKit 2.0.1
|
|
12877
|
-
* @example
|
|
12935
|
+
* @example
|
|
12878
12936
|
* ```tsx
|
|
12879
12937
|
* // 监听响应头:先用 ty.downloadFile 拿到下载任务句柄,再在句柄上注册 headers 监听。
|
|
12880
12938
|
* const downloadTask = await ty.downloadFile({
|
|
@@ -12906,7 +12964,7 @@ declare namespace ty {
|
|
|
12906
12964
|
* 取消监听 HTTP Response Header 事件
|
|
12907
12965
|
* @public
|
|
12908
12966
|
* @since BaseKit 2.0.1
|
|
12909
|
-
* @example
|
|
12967
|
+
* @example
|
|
12910
12968
|
* ```tsx
|
|
12911
12969
|
* // 取消响应头监听:先用 ty.downloadFile 拿到下载任务句柄,再在句柄上注册并取消 headers 监听。
|
|
12912
12970
|
* const downloadTask = await ty.downloadFile({
|
|
@@ -12940,7 +12998,7 @@ declare namespace ty {
|
|
|
12940
12998
|
* 监听下载进度变化事件
|
|
12941
12999
|
* @public
|
|
12942
13000
|
* @since BaseKit 2.0.1
|
|
12943
|
-
* @example
|
|
13001
|
+
* @example
|
|
12944
13002
|
* ```tsx
|
|
12945
13003
|
* // 监听下载进度:先用 ty.downloadFile 拿到下载任务句柄,再在句柄上注册进度监听。
|
|
12946
13004
|
* const downloadTask = await ty.downloadFile({
|
|
@@ -12982,7 +13040,7 @@ declare namespace ty {
|
|
|
12982
13040
|
* 取消监听下载进度变化事件
|
|
12983
13041
|
* @public
|
|
12984
13042
|
* @since BaseKit 2.0.1
|
|
12985
|
-
* @example
|
|
13043
|
+
* @example
|
|
12986
13044
|
* ```tsx
|
|
12987
13045
|
* // 取消进度监听:先用 ty.downloadFile 拿到下载任务句柄,再在句柄上注册并取消进度监听。
|
|
12988
13046
|
* const downloadTask = await ty.downloadFile({
|
|
@@ -13027,7 +13085,7 @@ declare namespace ty {
|
|
|
13027
13085
|
* 注意:请在服务端响应的 header 中指定合理的 Content-Type 字段,以保证客户端正确处理文件类型。
|
|
13028
13086
|
* @public
|
|
13029
13087
|
* @since BaseKit 2.3.2
|
|
13030
|
-
* @example
|
|
13088
|
+
* @example
|
|
13031
13089
|
* ```tsx
|
|
13032
13090
|
* ty.downloadFile({
|
|
13033
13091
|
* url: "https://airtake-public-data-1254153901.cos.ap-shanghai.myqcloud.com/ttttestfile/test_video.mp4",
|
|
@@ -13108,7 +13166,7 @@ declare namespace ty {
|
|
|
13108
13166
|
* 判断文件/目录是否存在
|
|
13109
13167
|
* @public
|
|
13110
13168
|
* @since BaseKit 2.4.3
|
|
13111
|
-
* @example
|
|
13169
|
+
* @example
|
|
13112
13170
|
* ```tsx
|
|
13113
13171
|
* // 判断文件/目录是否存在;这里检查 UserData 根目录(一定存在)。
|
|
13114
13172
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13155,7 +13213,7 @@ declare namespace ty {
|
|
|
13155
13213
|
* 读取本地文件内容
|
|
13156
13214
|
* @public
|
|
13157
13215
|
* @since BaseKit 2.0.1
|
|
13158
|
-
* @example
|
|
13216
|
+
* @example
|
|
13159
13217
|
* ```tsx
|
|
13160
13218
|
* // 读文件前先写一个,保证有文件可读。
|
|
13161
13219
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13235,7 +13293,7 @@ declare namespace ty {
|
|
|
13235
13293
|
* 读取本地文件内容
|
|
13236
13294
|
* @public
|
|
13237
13295
|
* @since BaseKit 2.0.1
|
|
13238
|
-
* @example
|
|
13296
|
+
* @example
|
|
13239
13297
|
* ```tsx
|
|
13240
13298
|
* // 读文件前先写一个,保证有文件可读。
|
|
13241
13299
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13274,7 +13332,7 @@ declare namespace ty {
|
|
|
13274
13332
|
* 将文件另存一份到目标路径中。
|
|
13275
13333
|
* @public
|
|
13276
13334
|
* @since BaseKit 2.4.3
|
|
13277
|
-
* @example
|
|
13335
|
+
* @example
|
|
13278
13336
|
* ```tsx
|
|
13279
13337
|
* // saveFile 把一个临时文件另存到目标路径;先在 Temp 写一个源文件。
|
|
13280
13338
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13342,7 +13400,7 @@ declare namespace ty {
|
|
|
13342
13400
|
* 将文件另存一份到目标路径中。
|
|
13343
13401
|
* @public
|
|
13344
13402
|
* @since BaseKit 2.2.3
|
|
13345
|
-
* @example
|
|
13403
|
+
* @example
|
|
13346
13404
|
* ```tsx
|
|
13347
13405
|
* // saveFile 把一个临时文件另存到目标路径;先在 Temp 写一个源文件。
|
|
13348
13406
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13381,7 +13439,7 @@ declare namespace ty {
|
|
|
13381
13439
|
* 获取文件Stats对象,需要文件读写权限
|
|
13382
13440
|
* @public
|
|
13383
13441
|
* @since BaseKit 2.4.3
|
|
13384
|
-
* @example
|
|
13442
|
+
* @example
|
|
13385
13443
|
* ```tsx
|
|
13386
13444
|
* // 获取文件/目录的 Stats;这里取 UserData 根目录信息。
|
|
13387
13445
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13442,7 +13500,7 @@ declare namespace ty {
|
|
|
13442
13500
|
* 获取文件Stats对象,需要文件读写权限
|
|
13443
13501
|
* @public
|
|
13444
13502
|
* @since BaseKit 2.4.3
|
|
13445
|
-
* @example
|
|
13503
|
+
* @example
|
|
13446
13504
|
* ```tsx
|
|
13447
13505
|
* // 获取文件/目录的 Stats;这里取 UserData 根目录信息。
|
|
13448
13506
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13472,7 +13530,7 @@ declare namespace ty {
|
|
|
13472
13530
|
* 创建目录,需要文件读写权限
|
|
13473
13531
|
* @public
|
|
13474
13532
|
* @since BaseKit 2.4.3
|
|
13475
|
-
* @example
|
|
13533
|
+
* @example
|
|
13476
13534
|
* ```tsx
|
|
13477
13535
|
* const fm = await ty.getFileSystemManager();
|
|
13478
13536
|
*
|
|
@@ -13528,7 +13586,7 @@ declare namespace ty {
|
|
|
13528
13586
|
* 创建目录,需要文件读写权限
|
|
13529
13587
|
* @public
|
|
13530
13588
|
* @since BaseKit 2.4.3
|
|
13531
|
-
* @example
|
|
13589
|
+
* @example
|
|
13532
13590
|
* ```tsx
|
|
13533
13591
|
* const fm = await ty.getFileSystemManager();
|
|
13534
13592
|
*
|
|
@@ -13551,7 +13609,7 @@ declare namespace ty {
|
|
|
13551
13609
|
* 删除目录,需要文件读写权限
|
|
13552
13610
|
* @public
|
|
13553
13611
|
* @since BaseKit 2.4.3
|
|
13554
|
-
* @example
|
|
13612
|
+
* @example
|
|
13555
13613
|
* ```tsx
|
|
13556
13614
|
* // 删目录前先建一个,保证有目录可删。
|
|
13557
13615
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13614,7 +13672,7 @@ declare namespace ty {
|
|
|
13614
13672
|
* 删除目录,需要文件读写权限
|
|
13615
13673
|
* @public
|
|
13616
13674
|
* @since BaseKit 2.4.3
|
|
13617
|
-
* @example
|
|
13675
|
+
* @example
|
|
13618
13676
|
* ```tsx
|
|
13619
13677
|
* // 删目录前先建一个,保证有目录可删。
|
|
13620
13678
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13647,7 +13705,7 @@ declare namespace ty {
|
|
|
13647
13705
|
* 写文件,需要文件读写权限
|
|
13648
13706
|
* @public
|
|
13649
13707
|
* @since BaseKit 2.4.3
|
|
13650
|
-
* @example
|
|
13708
|
+
* @example
|
|
13651
13709
|
* ```tsx
|
|
13652
13710
|
* // 文件操作方法挂在 getFileSystemManager 句柄上(fileId 由句柄自动注入)。
|
|
13653
13711
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13707,7 +13765,7 @@ declare namespace ty {
|
|
|
13707
13765
|
* 写文件,需要文件读写权限
|
|
13708
13766
|
* @public
|
|
13709
13767
|
* @since BaseKit 2.4.3
|
|
13710
|
-
* @example
|
|
13768
|
+
* @example
|
|
13711
13769
|
* ```tsx
|
|
13712
13770
|
* // 文件操作方法挂在 getFileSystemManager 句柄上(fileId 由句柄自动注入)。
|
|
13713
13771
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13732,7 +13790,7 @@ declare namespace ty {
|
|
|
13732
13790
|
* 删除已保存的本地缓存文件,需要文件读写权限
|
|
13733
13791
|
* @public
|
|
13734
13792
|
* @since BaseKit 2.4.3
|
|
13735
|
-
* @example
|
|
13793
|
+
* @example
|
|
13736
13794
|
* ```tsx
|
|
13737
13795
|
* // 删文件前先写一个,保证有文件可删。
|
|
13738
13796
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13789,7 +13847,7 @@ declare namespace ty {
|
|
|
13789
13847
|
* 如若文件操作的需要权,需另外调用权限接口申请。
|
|
13790
13848
|
* @public
|
|
13791
13849
|
* @since BaseKit 2.2.3
|
|
13792
|
-
* @example
|
|
13850
|
+
* @example
|
|
13793
13851
|
* ```tsx
|
|
13794
13852
|
* // getFileSystemManager 是 Task getter,返回文件管理器句柄,后续文件操作都挂在它上面。
|
|
13795
13853
|
* const fm = await ty.getFileSystemManager();
|
|
@@ -13823,7 +13881,7 @@ declare namespace ty {
|
|
|
13823
13881
|
* 中断请求任务
|
|
13824
13882
|
* @public
|
|
13825
13883
|
* @since BaseKit 2.0.1
|
|
13826
|
-
* @example
|
|
13884
|
+
* @example
|
|
13827
13885
|
* ```tsx
|
|
13828
13886
|
* // 中断请求任务。ty.request 返回 RequestTask,调用 task.abort 中断请求,abort 通过 success 回调返回结果。
|
|
13829
13887
|
* // 注:abort 在请求结果回来后调用,演示 abort 的调用方式与成功返回。
|
|
@@ -13874,7 +13932,7 @@ declare namespace ty {
|
|
|
13874
13932
|
* 监听 HTTP Response Header 事件。会比请求完成事件更早
|
|
13875
13933
|
* @public
|
|
13876
13934
|
* @since BaseKit 2.0.1
|
|
13877
|
-
* @example
|
|
13935
|
+
* @example
|
|
13878
13936
|
* ```tsx
|
|
13879
13937
|
* // 监听 HTTP Response Header 事件(比请求完成更早触发)。
|
|
13880
13938
|
* // ty.request 返回 RequestTask,在其上注册 onHeadersReceived,请求返回响应头时触发。
|
|
@@ -13914,7 +13972,7 @@ declare namespace ty {
|
|
|
13914
13972
|
* 取消监听 HTTP Response Header 事件
|
|
13915
13973
|
* @public
|
|
13916
13974
|
* @since BaseKit 2.0.1
|
|
13917
|
-
* @example
|
|
13975
|
+
* @example
|
|
13918
13976
|
* ```tsx
|
|
13919
13977
|
* // 取消监听 HTTP Response Header 事件。
|
|
13920
13978
|
* // ty.request 返回 RequestTask,先注册 onHeadersReceived,再调用 offHeadersReceived 取消监听;
|
|
@@ -13956,7 +14014,7 @@ declare namespace ty {
|
|
|
13956
14014
|
* 发起 HTTPS 网络请求
|
|
13957
14015
|
* @public
|
|
13958
14016
|
* @since BaseKit 2.0.1
|
|
13959
|
-
* @example
|
|
14017
|
+
* @example
|
|
13960
14018
|
* ```tsx
|
|
13961
14019
|
* // 发起 HTTPS GET 请求。ty.request 同步返回一个 RequestTask 对象,请求结果通过 success/fail 回调返回。
|
|
13962
14020
|
* ty.request({
|
|
@@ -14086,7 +14144,7 @@ declare namespace ty {
|
|
|
14086
14144
|
* 开始录音
|
|
14087
14145
|
* @public
|
|
14088
14146
|
* @since BaseKit 2.3.2
|
|
14089
|
-
* @example
|
|
14147
|
+
* @example
|
|
14090
14148
|
* ```tsx
|
|
14091
14149
|
* const manager = await ty.getRecorderManager();
|
|
14092
14150
|
*
|
|
@@ -14183,7 +14241,7 @@ declare namespace ty {
|
|
|
14183
14241
|
* 继续录音
|
|
14184
14242
|
* @public
|
|
14185
14243
|
* @since BaseKit 2.3.2
|
|
14186
|
-
* @example
|
|
14244
|
+
* @example
|
|
14187
14245
|
* ```tsx
|
|
14188
14246
|
* const manager = await ty.getRecorderManager();
|
|
14189
14247
|
*
|
|
@@ -14229,7 +14287,7 @@ declare namespace ty {
|
|
|
14229
14287
|
* 暂停录音
|
|
14230
14288
|
* @public
|
|
14231
14289
|
* @since BaseKit 2.3.2
|
|
14232
|
-
* @example
|
|
14290
|
+
* @example
|
|
14233
14291
|
* ```tsx
|
|
14234
14292
|
* const manager = await ty.getRecorderManager();
|
|
14235
14293
|
*
|
|
@@ -14292,7 +14350,7 @@ declare namespace ty {
|
|
|
14292
14350
|
* 停止录音
|
|
14293
14351
|
* @public
|
|
14294
14352
|
* @since BaseKit 2.3.2
|
|
14295
|
-
* @example
|
|
14353
|
+
* @example
|
|
14296
14354
|
* ```tsx
|
|
14297
14355
|
* const manager = await ty.getRecorderManager();
|
|
14298
14356
|
*
|
|
@@ -14338,7 +14396,7 @@ declare namespace ty {
|
|
|
14338
14396
|
* 开始持续录音
|
|
14339
14397
|
* @public
|
|
14340
14398
|
* @since BaseKit 2.3.2
|
|
14341
|
-
* @example
|
|
14399
|
+
* @example
|
|
14342
14400
|
* ```tsx
|
|
14343
14401
|
* const manager = await ty.getRecorderManager();
|
|
14344
14402
|
*
|
|
@@ -14393,7 +14451,7 @@ declare namespace ty {
|
|
|
14393
14451
|
* 停止持续录音
|
|
14394
14452
|
* @public
|
|
14395
14453
|
* @since BaseKit 2.3.2
|
|
14396
|
-
* @example
|
|
14454
|
+
* @example
|
|
14397
14455
|
* ```tsx
|
|
14398
14456
|
* const manager = await ty.getRecorderManager();
|
|
14399
14457
|
*
|
|
@@ -14433,7 +14491,7 @@ declare namespace ty {
|
|
|
14433
14491
|
* 获取全局唯一的录音管理器
|
|
14434
14492
|
* @public
|
|
14435
14493
|
* @since BaseKit 2.3.2
|
|
14436
|
-
* @example
|
|
14494
|
+
* @example
|
|
14437
14495
|
* ```tsx
|
|
14438
14496
|
* const manager = await ty.getRecorderManager();
|
|
14439
14497
|
* ```
|
|
@@ -14465,7 +14523,7 @@ declare namespace ty {
|
|
|
14465
14523
|
* 中断上传任务
|
|
14466
14524
|
* @public
|
|
14467
14525
|
* @since BaseKit 2.0.1
|
|
14468
|
-
* @example
|
|
14526
|
+
* @example
|
|
14469
14527
|
* ```tsx
|
|
14470
14528
|
* // 中断上传任务:拿到 UploadTask 后调用 task.abort()
|
|
14471
14529
|
* ty.downloadFile({
|
|
@@ -14514,7 +14572,7 @@ declare namespace ty {
|
|
|
14514
14572
|
* 监听 HTTP Response Header 事件。会比请求完成事件更早
|
|
14515
14573
|
* @public
|
|
14516
14574
|
* @since BaseKit 2.0.1
|
|
14517
|
-
* @example
|
|
14575
|
+
* @example
|
|
14518
14576
|
* ```tsx
|
|
14519
14577
|
* // 监听响应头:拿到 UploadTask 后注册 onHeadersReceived,收到服务器响应头时回调(比完成更早)
|
|
14520
14578
|
* ty.downloadFile({
|
|
@@ -14555,7 +14613,7 @@ declare namespace ty {
|
|
|
14555
14613
|
* 取消监听 HTTP Response Header 事件
|
|
14556
14614
|
* @public
|
|
14557
14615
|
* @since BaseKit 2.0.1
|
|
14558
|
-
* @example
|
|
14616
|
+
* @example
|
|
14559
14617
|
* ```tsx
|
|
14560
14618
|
* // 取消监听响应头:用具名回调注册 onHeadersReceived,上传完成后用同一回调精确取消
|
|
14561
14619
|
* ty.downloadFile({
|
|
@@ -14598,7 +14656,7 @@ declare namespace ty {
|
|
|
14598
14656
|
* 监听上传进度变化事件
|
|
14599
14657
|
* @public
|
|
14600
14658
|
* @since BaseKit 2.0.1
|
|
14601
|
-
* @example
|
|
14659
|
+
* @example
|
|
14602
14660
|
* ```tsx
|
|
14603
14661
|
* // 监听上传进度:拿到 UploadTask 后注册 onProgressUpdate,上传过程中回调进度
|
|
14604
14662
|
* ty.downloadFile({
|
|
@@ -14649,7 +14707,7 @@ declare namespace ty {
|
|
|
14649
14707
|
* 取消监听上传进度变化事件
|
|
14650
14708
|
* @public
|
|
14651
14709
|
* @since BaseKit 2.0.1
|
|
14652
|
-
* @example
|
|
14710
|
+
* @example
|
|
14653
14711
|
* ```tsx
|
|
14654
14712
|
* // 取消监听上传进度:用具名回调注册 onProgressUpdate,上传完成后用同一回调精确取消
|
|
14655
14713
|
* ty.downloadFile({
|
|
@@ -14702,7 +14760,7 @@ declare namespace ty {
|
|
|
14702
14760
|
* 将本地资源上传到服务器。客户端发起一个 HTTPS POST 请求,其中 content-type 为 multipart/form-data
|
|
14703
14761
|
* @public
|
|
14704
14762
|
* @since BaseKit 2.0.1
|
|
14705
|
-
* @example
|
|
14763
|
+
* @example
|
|
14706
14764
|
* ```tsx
|
|
14707
14765
|
* // 上传本地文件:先下载一个文件拿到本地路径,再 uploadFile 上传到服务器,返回 UploadTask
|
|
14708
14766
|
* ty.downloadFile({
|