@dcloudio/uni-app-x 0.4.6 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -0
- package/package.json +5 -3
- package/types/app.d.ts +36 -82
- package/types/native/CSSStyleDeclaration.d.ts +2 -2
- package/types/native/CustomEvent.d.ts +0 -2
- package/types/native/DOMRect.d.ts +4 -4
- package/types/native/DomNode.d.ts +48 -0
- package/types/native/DrawableContext.d.ts +42 -16
- package/types/native/Element.d.ts +234 -0
- package/types/native/Event.d.ts +14 -3
- package/types/native/IDocument.d.ts +6 -6
- package/types/native/IPage.d.ts +27 -11
- package/types/native/IPageManager.d.ts +2 -2
- package/types/native/ITabsNode.d.ts +4 -4
- package/types/native/IUniError.d.ts +20 -0
- package/types/native/IWebViewNode.d.ts +2 -2
- package/types/native/InputBlurEvent.d.ts +13 -0
- package/types/native/InputConfirmEvent.d.ts +13 -0
- package/types/native/InputEvent.d.ts +21 -0
- package/types/native/InputFocusEvent.d.ts +17 -0
- package/types/native/InputKeyboardHeightChangeEvent.d.ts +17 -0
- package/types/native/MouseEvent.d.ts +13 -1
- package/types/native/NestedPreScrollEvent.d.ts +23 -0
- package/types/native/ScrollToLowerEvent.d.ts +4 -1
- package/types/native/ScrollToUpperEvent.d.ts +5 -2
- package/types/native/SourceError.d.ts +0 -2
- package/types/native/StartNestedScrollEvent.d.ts +12 -0
- package/types/native/SwiperAnimationFinishEvent.d.ts +11 -0
- package/types/native/SwiperChangeEvent.d.ts +11 -0
- package/types/native/SwiperTransitionEvent.d.ts +11 -0
- package/types/native/TextareaBlurEvent.d.ts +17 -0
- package/types/native/TextareaFocusEvent.d.ts +17 -0
- package/types/native/TextareaLineChangeEvent.d.ts +21 -0
- package/types/native/TouchEvent.d.ts +5 -1
- package/types/native/UniError.d.ts +7 -3
- package/types/native/index.d.ts +18 -3
- package/types/page.d.ts +57 -212
- package/types/uni/core/index.d.ts +9 -7
- package/types/uni/core/lib/base/event/interface.d.ts +4 -4
- package/types/uni/core/lib/lifecycle/interface.d.ts +1 -1
- package/types/uni/core/lib/performance/interface.d.ts +0 -20
- package/types/uni/core/lib/route/index.d.ts +0 -10
- package/types/uni/core/lib/route/interface.d.ts +1805 -10
- package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +242 -2
- package/types/uni/core/lib/ui/get-element-by-id/index.d.ts +9 -0
- package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +72 -0
- package/types/uni/core/lib/ui/load-font-face/interface.d.ts +486 -3
- package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +0 -2
- package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +93 -9
- package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +0 -2
- package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +2 -5
- package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +373 -4
- package/types/uni/core/lib/ui/tab-bar/index.d.ts +2 -18
- package/types/uni/core/lib/ui/tab-bar/interface.d.ts +32 -35
- package/types/uni/index.d.ts +2 -1
- package/types/uni/{ext → uts-plugin-api}/index.d.ts +18 -17
- package/types/uni/{ext → uts-plugin-api}/lib/uni-audio/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +11 -0
- package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +98 -0
- package/types/uni/{ext → uts-plugin-api}/lib/uni-exit/utssdk/interface.d.ts +1 -1
- package/types/uni/{ext → uts-plugin-api}/lib/uni-file-manager/utssdk/interface.d.ts +4 -32
- package/types/uni/{ext → uts-plugin-api}/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +1 -1
- package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +108 -10
- package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +233 -0
- package/types/uni/{ext → uts-plugin-api}/lib/uni-getDeviceInfo/utssdk/interface.d.ts +58 -46
- package/types/uni/{ext → uts-plugin-api}/lib/uni-getLocation-system/utssdk/index.d.ts +0 -2
- package/types/uni/{ext → uts-plugin-api}/lib/uni-getLocation-system/utssdk/interface.d.ts +14 -10
- package/types/uni/{ext → uts-plugin-api}/lib/uni-getNetworkType/utssdk/interface.d.ts +8 -5
- package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +213 -0
- package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemInfo/utssdk/interface.d.ts +108 -163
- package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemSetting/utssdk/interface.d.ts +3 -3
- package/types/uni/{ext → uts-plugin-api}/lib/uni-media/utssdk/index.d.ts +0 -20
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +794 -0
- package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/app-ios/interface.d.ts +60 -19
- package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/index.d.ts +4 -0
- package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/interface.d.ts +138 -49
- package/types/uni/{ext → uts-plugin-api}/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +8 -5
- package/types/uni/{ext → uts-plugin-api}/lib/uni-prompt/utssdk/interface.d.ts +6 -6
- package/types/uni/{ext → uts-plugin-api}/lib/uni-storage/utssdk/index.d.ts +0 -10
- package/types/uni/{ext → uts-plugin-api}/lib/uni-storage/utssdk/interface.d.ts +33 -117
- package/types/uni/{ext → uts-plugin-api}/lib/uni-websocket/utssdk/index.d.ts +2 -0
- package/types/uni/{ext → uts-plugin-api}/lib/uni-websocket/utssdk/interface.d.ts +60 -35
- package/types/uni/uts-plugin-component/index.d.ts +1 -0
- package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +15 -0
- package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +171 -0
- package/types/uni-cloud/index.d.ts +59 -333
- package/types/uni-cloud/interface.d.ts +786 -0
- package/types/vue/CheckboxGroupChangeEvent.d.ts +1 -1
- package/types/vue/PickerViewChangeEvent.d.ts +1 -1
- package/types/vue/ProgressActiveendEvent.d.ts +1 -1
- package/types/vue/RadioGroupChangeEvent.d.ts +1 -1
- package/types/vue/SliderChangeEvent.d.ts +10 -1
- package/types/vue/SwitchChangeEvent.d.ts +1 -1
- package/uts-plugin.d.ts +10 -0
- package/.env +0 -3
- package/tsconfig.json +0 -5
- package/types/native/INode.d.ts +0 -181
- package/types/native/UTSError.d.ts +0 -15
- package/types/native/UTSPromise.d.ts +0 -74
- package/types/uni/ext/lib/uni-file-manager/utssdk/index.d.ts +0 -35
- package/types/uni/ext/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +0 -120
- package/types/uni/ext/lib/uni-getRecorderManager/utssdk/interface.d.ts +0 -213
- package/types/uni/ext/lib/uni-media/utssdk/interface.d.ts +0 -877
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-audio/utssdk/index.d.ts +0 -0
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-exit/utssdk/index.d.ts +0 -0
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +0 -0
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +0 -0
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppBaseInfo/utssdk/index.d.ts +0 -0
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-getDeviceInfo/utssdk/index.d.ts +0 -0
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-getNetworkType/utssdk/index.d.ts +0 -0
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-getRecorderManager/utssdk/index.d.ts +0 -0
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemInfo/utssdk/index.d.ts +0 -0
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemSetting/utssdk/index.d.ts +0 -0
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/app-ios/index.d.ts +0 -0
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +0 -0
- /package/types/uni/{ext → uts-plugin-api}/lib/uni-prompt/utssdk/index.d.ts +0 -0
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { AsyncApiSuccessResult } from '../../interface'
|
|
2
2
|
|
|
3
|
-
export type SetTabBarBadge = (options: SetTabBarBadgeOptions) => void
|
|
4
3
|
export type SetTabBarBadgeSuccess = AsyncApiSuccessResult
|
|
5
4
|
export type SetTabBarBadgeSuccessCallback = (
|
|
6
5
|
result: SetTabBarBadgeSuccess
|
|
7
6
|
) => void
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/**
|
|
8
|
+
* 错误码
|
|
9
|
+
* - 100: TabBar 不存在
|
|
10
|
+
* - 200: 参数错误
|
|
11
|
+
*/
|
|
12
|
+
export type SetTabBarErrCode = 100 | 200
|
|
13
|
+
export abstract class SetTabBarError extends UniError {
|
|
14
|
+
abstract override errCode: SetTabBarErrCode
|
|
15
|
+
}
|
|
16
|
+
export type SetTabBarBadgeFail = SetTabBarError
|
|
17
|
+
export type SetTabBarBadgeFailCallback = (result: SetTabBarError) => void
|
|
10
18
|
export type SetTabBarBadgeComplete = AsyncApiResult
|
|
11
19
|
export type SetTabBarBadgeCompleteCallback = (
|
|
12
20
|
result: SetTabBarBadgeComplete
|
|
@@ -34,12 +42,11 @@ export type SetTabBarBadgeOptions = {
|
|
|
34
42
|
complete?: SetTabBarBadgeCompleteCallback
|
|
35
43
|
}
|
|
36
44
|
|
|
37
|
-
export type RemoveTabBarBadge = (options: RemoveTabBarBadgeOptions) => void
|
|
38
45
|
export type RemoveTabBarBadgeSuccess = AsyncApiSuccessResult
|
|
39
46
|
export type RemoveTabBarBadgeSuccessCallback = (
|
|
40
47
|
result: RemoveTabBarBadgeSuccess
|
|
41
48
|
) => void
|
|
42
|
-
export type RemoveTabBarBadgeFail =
|
|
49
|
+
export type RemoveTabBarBadgeFail = SetTabBarError
|
|
43
50
|
export type RemoveTabBarBadgeFailCallback = (
|
|
44
51
|
result: RemoveTabBarBadgeFail
|
|
45
52
|
) => void
|
|
@@ -66,12 +73,11 @@ export type RemoveTabBarBadgeOptions = {
|
|
|
66
73
|
complete?: RemoveTabBarBadgeCompleteCallback
|
|
67
74
|
}
|
|
68
75
|
|
|
69
|
-
export type SetTabBarItem = (options: SetTabBarItemOptions) => void
|
|
70
76
|
export type SetTabBarItemSuccess = AsyncApiSuccessResult
|
|
71
77
|
export type SetTabBarItemSuccessCallback = (
|
|
72
78
|
result: SetTabBarItemSuccess
|
|
73
79
|
) => void
|
|
74
|
-
export type SetTabBarItemFail =
|
|
80
|
+
export type SetTabBarItemFail = SetTabBarError
|
|
75
81
|
export type SetTabBarItemFailCallback = (result: SetTabBarItemFail) => void
|
|
76
82
|
export type SetTabBarItemComplete = AsyncApiResult
|
|
77
83
|
export type SetTabBarItemCompleteCallback = (
|
|
@@ -196,12 +202,11 @@ export type MidButtonOptions = {
|
|
|
196
202
|
iconfont?: MidButtonIconFont
|
|
197
203
|
}
|
|
198
204
|
|
|
199
|
-
export type SetTabBarStyle = (options: SetTabBarStyleOptions) => void
|
|
200
205
|
export type SetTabBarStyleSuccess = AsyncApiSuccessResult
|
|
201
206
|
export type SetTabBarStyleSuccessCallback = (
|
|
202
207
|
result: SetTabBarStyleSuccess
|
|
203
208
|
) => void
|
|
204
|
-
export type SetTabBarStyleFail =
|
|
209
|
+
export type SetTabBarStyleFail = SetTabBarError
|
|
205
210
|
export type SetTabBarStyleFailCallback = (result: SetTabBarStyleFail) => void
|
|
206
211
|
export type SetTabBarStyleComplete = AsyncApiResult
|
|
207
212
|
export type SetTabBarStyleCompleteCallback = (
|
|
@@ -258,10 +263,9 @@ export type SetTabBarStyleOptions = {
|
|
|
258
263
|
complete?: SetTabBarStyleCompleteCallback
|
|
259
264
|
}
|
|
260
265
|
|
|
261
|
-
export type HideTabBar = (options?: HideTabBarOptions | null) => void
|
|
262
266
|
export type HideTabBarSuccess = AsyncApiSuccessResult
|
|
263
267
|
export type HideTabBarSuccessCallback = (result: HideTabBarSuccess) => void
|
|
264
|
-
export type HideTabBarFail =
|
|
268
|
+
export type HideTabBarFail = SetTabBarError
|
|
265
269
|
export type HideTabBarFailCallback = (result: HideTabBarFail) => void
|
|
266
270
|
export type HideTabBarComplete = AsyncApiResult
|
|
267
271
|
export type HideTabBarCompleteCallback = (result: HideTabBarComplete) => void
|
|
@@ -284,10 +288,9 @@ export type HideTabBarOptions = {
|
|
|
284
288
|
complete?: HideTabBarCompleteCallback
|
|
285
289
|
}
|
|
286
290
|
|
|
287
|
-
export type ShowTabBar = (options?: ShowTabBarOptions | null) => void
|
|
288
291
|
export type ShowTabBarSuccess = AsyncApiSuccessResult
|
|
289
292
|
export type ShowTabBarSuccessCallback = (result: ShowTabBarSuccess) => void
|
|
290
|
-
export type ShowTabBarFail =
|
|
293
|
+
export type ShowTabBarFail = SetTabBarError
|
|
291
294
|
export type ShowTabBarFailCallback = (result: ShowTabBarFail) => void
|
|
292
295
|
export type ShowTabBarComplete = AsyncApiResult
|
|
293
296
|
export type ShowTabBarCompleteCallback = (result: ShowTabBarComplete) => void
|
|
@@ -310,12 +313,11 @@ export type ShowTabBarOptions = {
|
|
|
310
313
|
complete?: ShowTabBarCompleteCallback
|
|
311
314
|
}
|
|
312
315
|
|
|
313
|
-
export type ShowTabBarRedDot = (options: ShowTabBarRedDotOptions) => void
|
|
314
316
|
export type ShowTabBarRedDotSuccess = AsyncApiSuccessResult
|
|
315
317
|
export type ShowTabBarRedDotSuccessCallback = (
|
|
316
318
|
result: ShowTabBarRedDotSuccess
|
|
317
319
|
) => void
|
|
318
|
-
export type ShowTabBarRedDotFail =
|
|
320
|
+
export type ShowTabBarRedDotFail = SetTabBarError
|
|
319
321
|
export type ShowTabBarRedDotFailCallback = (
|
|
320
322
|
result: ShowTabBarRedDotFail
|
|
321
323
|
) => void
|
|
@@ -342,12 +344,11 @@ export type ShowTabBarRedDotOptions = {
|
|
|
342
344
|
complete?: ShowTabBarRedDotCompleteCallback
|
|
343
345
|
}
|
|
344
346
|
|
|
345
|
-
export type HideTabBarRedDot = (options: HideTabBarRedDotOptions) => void
|
|
346
347
|
export type HideTabBarRedDotSuccess = AsyncApiSuccessResult
|
|
347
348
|
export type HideTabBarRedDotSuccessCallback = (
|
|
348
349
|
result: HideTabBarRedDotSuccess
|
|
349
350
|
) => void
|
|
350
|
-
export type HideTabBarRedDotFail =
|
|
351
|
+
export type HideTabBarRedDotFail = SetTabBarError
|
|
351
352
|
export type HideTabBarRedDotFailCallback = (
|
|
352
353
|
result: HideTabBarRedDotFail
|
|
353
354
|
) => void
|
|
@@ -374,10 +375,6 @@ export type HideTabBarRedDotOptions = {
|
|
|
374
375
|
complete?: HideTabBarRedDotCompleteCallback
|
|
375
376
|
}
|
|
376
377
|
|
|
377
|
-
export type OnTabBarMidButtonTap = (
|
|
378
|
-
options: OnTabBarMidButtonTapCallback
|
|
379
|
-
) => void
|
|
380
|
-
|
|
381
378
|
export type OnTabBarMidButtonTapCallback = () => void
|
|
382
379
|
|
|
383
380
|
export interface Uni {
|
|
@@ -386,53 +383,53 @@ export interface Uni {
|
|
|
386
383
|
*
|
|
387
384
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=settabbarbadge
|
|
388
385
|
*/
|
|
389
|
-
setTabBarBadge:
|
|
386
|
+
setTabBarBadge(options: SetTabBarBadgeOptions): void
|
|
390
387
|
/**
|
|
391
388
|
* 移除 tabBar 某一项右上角的文本
|
|
392
389
|
*
|
|
393
390
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=removetabbarbadge
|
|
394
391
|
*/
|
|
395
|
-
removeTabBarBadge:
|
|
392
|
+
removeTabBarBadge(options: RemoveTabBarBadgeOptions): void
|
|
396
393
|
/**
|
|
397
394
|
* 动态设置 tabBar 某一项的内容
|
|
398
395
|
*
|
|
399
396
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=settabbaritem
|
|
400
397
|
*/
|
|
401
|
-
setTabBarItem:
|
|
398
|
+
setTabBarItem(options: SetTabBarItemOptions): void
|
|
402
399
|
/**
|
|
403
400
|
* 动态设置 tabBar 的整体样式
|
|
404
401
|
*
|
|
405
402
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=settabbarstyle
|
|
406
403
|
*/
|
|
407
|
-
setTabBarStyle:
|
|
404
|
+
setTabBarStyle(options: SetTabBarStyleOptions): void
|
|
408
405
|
/**
|
|
409
406
|
* 隐藏 tabBar
|
|
410
407
|
*
|
|
411
408
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=hidetabbar
|
|
412
409
|
*/
|
|
413
|
-
hideTabBar:
|
|
410
|
+
hideTabBar(options?: HideTabBarOptions | null): void
|
|
414
411
|
/**
|
|
415
412
|
* 显示 tabBar
|
|
416
413
|
*
|
|
417
414
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=showtabbar
|
|
418
415
|
*/
|
|
419
|
-
showTabBar:
|
|
416
|
+
showTabBar(options?: ShowTabBarOptions | null): void
|
|
420
417
|
/**
|
|
421
418
|
* 显示 tabBar 某一项的右上角的红点
|
|
422
419
|
*
|
|
423
420
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=showtabbarreddot
|
|
424
421
|
*/
|
|
425
|
-
showTabBarRedDot:
|
|
422
|
+
showTabBarRedDot(options: ShowTabBarRedDotOptions): void
|
|
426
423
|
/**
|
|
427
424
|
* 隐藏 tabBar 某一项的右上角的红点
|
|
428
425
|
*
|
|
429
426
|
* @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=hidetabbarreddot
|
|
430
427
|
*/
|
|
431
|
-
hideTabBarRedDot:
|
|
432
|
-
/**
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
onTabBarMidButtonTap:
|
|
428
|
+
hideTabBarRedDot(options: HideTabBarRedDotOptions): void
|
|
429
|
+
// /**
|
|
430
|
+
// * 监听中间按钮的点击事件
|
|
431
|
+
// *
|
|
432
|
+
// * @tutorial http://uniapp.dcloud.io/api/ui/tabbar?id=ontabbarmidbuttontap
|
|
433
|
+
// */
|
|
434
|
+
// onTabBarMidButtonTap(options: OnTabBarMidButtonTapCallback): void
|
|
438
435
|
}
|
package/types/uni/index.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
/// <reference path='./lib/uni-audio/utssdk/index.d.ts' />
|
|
2
|
-
/// <reference path='./lib/uni-exit/utssdk/index.d.ts' />
|
|
3
|
-
/// <reference path='./lib/uni-file-manager/utssdk/index.d.ts' />
|
|
4
|
-
/// <reference path='./lib/uni-getAccessibilityInfo/utssdk/index.d.ts' />
|
|
5
|
-
/// <reference path='./lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts' />
|
|
6
|
-
/// <reference path='./lib/uni-getAppBaseInfo/utssdk/index.d.ts' />
|
|
7
|
-
/// <reference path='./lib/uni-getDeviceInfo/utssdk/index.d.ts' />
|
|
8
|
-
/// <reference path='./lib/uni-getLocation-system/utssdk/index.d.ts' />
|
|
9
|
-
/// <reference path='./lib/uni-getNetworkType/utssdk/index.d.ts' />
|
|
10
|
-
/// <reference path='./lib/uni-getRecorderManager/utssdk/index.d.ts' />
|
|
11
|
-
/// <reference path='./lib/uni-getSystemInfo/utssdk/index.d.ts' />
|
|
12
|
-
/// <reference path='./lib/uni-getSystemSetting/utssdk/index.d.ts' />
|
|
13
|
-
/// <reference path='./lib/uni-media/utssdk/index.d.ts' />
|
|
14
|
-
/// <reference path='./lib/uni-network/utssdk/index.d.ts' />
|
|
15
|
-
/// <reference path='./lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts' />
|
|
16
|
-
/// <reference path='./lib/uni-prompt/utssdk/index.d.ts' />
|
|
17
|
-
/// <reference path='./lib/uni-storage/utssdk/index.d.ts' />
|
|
18
1
|
/// <reference path='./lib/uni-websocket/utssdk/index.d.ts' />
|
|
2
|
+
/// <reference path='./lib/uni-storage/utssdk/index.d.ts' />
|
|
3
|
+
/// <reference path='./lib/uni-prompt/utssdk/index.d.ts' />
|
|
4
|
+
/// <reference path='./lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts' />
|
|
5
|
+
/// <reference path='./lib/uni-network/utssdk/index.d.ts' />
|
|
6
|
+
/// <reference path='./lib/uni-media/utssdk/index.d.ts' />
|
|
7
|
+
/// <reference path='./lib/uni-getSystemSetting/utssdk/index.d.ts' />
|
|
8
|
+
/// <reference path='./lib/uni-getSystemInfo/utssdk/index.d.ts' />
|
|
9
|
+
/// <reference path='./lib/uni-getRecorderManager/utssdk/index.d.ts' />
|
|
10
|
+
/// <reference path='./lib/uni-getNetworkType/utssdk/index.d.ts' />
|
|
11
|
+
/// <reference path='./lib/uni-getLocation-system/utssdk/index.d.ts' />
|
|
12
|
+
/// <reference path='./lib/uni-getDeviceInfo/utssdk/index.d.ts' />
|
|
13
|
+
/// <reference path='./lib/uni-getAppBaseInfo/utssdk/index.d.ts' />
|
|
14
|
+
/// <reference path='./lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts' />
|
|
15
|
+
/// <reference path='./lib/uni-getAccessibilityInfo/utssdk/index.d.ts' />
|
|
16
|
+
/// <reference path='./lib/uni-exit/utssdk/index.d.ts' />
|
|
17
|
+
/// <reference path='./lib/uni-createWebviewContext/utssdk/index.d.ts' />
|
|
18
|
+
/// <reference path='./lib/uni-audio/utssdk/index.d.ts' />
|
|
19
|
+
/// <reference path='./lib/uni-network/utssdk/app-ios/index.d.ts' />
|
|
@@ -782,7 +782,7 @@ export interface Uni {
|
|
|
782
782
|
* @tutorial http://uniapp.dcloud.io/api/media/audio-context?id=createinneraudiocontext
|
|
783
783
|
*
|
|
784
784
|
*/
|
|
785
|
-
createInnerAudioContext:
|
|
785
|
+
createInnerAudioContext() : InnerAudioContext;
|
|
786
786
|
/**
|
|
787
787
|
* 获取全局唯一的背景音频管理器 backgroundAudioManager
|
|
788
788
|
* @description 获取全局唯一的背景音频管理器 backgroundAudioManager
|
|
@@ -800,5 +800,5 @@ export interface Uni {
|
|
|
800
800
|
*
|
|
801
801
|
* @tutorial http://uniapp.dcloud.io/api/media/background-audio-manager?id=getbackgroundaudiomanager
|
|
802
802
|
*/
|
|
803
|
-
getBackgroundAudioManager:
|
|
803
|
+
getBackgroundAudioManager(): BackgroundAudioManager;
|
|
804
804
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CreateWebviewContext as CreateWebviewContextOrigin,
|
|
3
|
+
WebviewContext as WebviewContextOrigin,
|
|
4
|
+
Uni as UniOrigin
|
|
5
|
+
} from './interface'
|
|
6
|
+
|
|
7
|
+
declare global {
|
|
8
|
+
type CreateWebviewContext = CreateWebviewContextOrigin
|
|
9
|
+
type WebviewContext = WebviewContextOrigin
|
|
10
|
+
interface Uni extends UniOrigin { }
|
|
11
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from 'vue'
|
|
2
|
+
|
|
3
|
+
export type CreateWebviewContext = (webviewId : WebviewIdString, component : ComponentPublicInstance | null) => WebviewContext | null
|
|
4
|
+
|
|
5
|
+
export interface WebviewContext {
|
|
6
|
+
/**
|
|
7
|
+
* @description 后退到 web-view 组件网页加载历史的上一页,如果不存在上一页则没有任何效果。
|
|
8
|
+
* @uniplatform {
|
|
9
|
+
* "app": {
|
|
10
|
+
* "android": {
|
|
11
|
+
* "osVer": "4.4",
|
|
12
|
+
* "uniVer": "x",
|
|
13
|
+
* "unixVer": "3.9.0"
|
|
14
|
+
* }
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
* @uniVueVersion 2,3
|
|
18
|
+
*/
|
|
19
|
+
back() : void
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @description 前进到 web-view 组件网页加载历史的下一页,如果不存在下一页则没有任何效果。
|
|
23
|
+
* @uniplatform {
|
|
24
|
+
* "app": {
|
|
25
|
+
* "android": {
|
|
26
|
+
* "osVer": "4.4",
|
|
27
|
+
* "uniVer": "x",
|
|
28
|
+
* "unixVer": "3.9.0"
|
|
29
|
+
* }
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
* @uniVueVersion 2,3
|
|
33
|
+
*/
|
|
34
|
+
forward() : void
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @description 重新加载 web-view 组件当前页面。
|
|
38
|
+
* @uniplatform {
|
|
39
|
+
* "app": {
|
|
40
|
+
* "android": {
|
|
41
|
+
* "osVer": "4.4",
|
|
42
|
+
* "uniVer": "x",
|
|
43
|
+
* "unixVer": "3.9.0"
|
|
44
|
+
* }
|
|
45
|
+
* }
|
|
46
|
+
* }
|
|
47
|
+
* @uniVueVersion 2,3
|
|
48
|
+
*/
|
|
49
|
+
reload() : void
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @description 停止加载 web-view 组件当前网页,该方法不能阻止已经加载的 html 文档,但是能够阻止未完成的图片及延迟加载的资源。
|
|
53
|
+
* @uniplatform {
|
|
54
|
+
* "app": {
|
|
55
|
+
* "android": {
|
|
56
|
+
* "osVer": "4.4",
|
|
57
|
+
* "uniVer": "x",
|
|
58
|
+
* "unixVer": "3.9.0"
|
|
59
|
+
* }
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
* @uniVueVersion 2,3
|
|
63
|
+
*/
|
|
64
|
+
stop() : void
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @description 在网页中执行指定的js脚本,在 uvue 页面中可通过此方法向 web-view 组件加载的页面发送数据
|
|
68
|
+
* @uniplatform {
|
|
69
|
+
* "app": {
|
|
70
|
+
* "android": {
|
|
71
|
+
* "osVer": "4.4",
|
|
72
|
+
* "uniVer": "x",
|
|
73
|
+
* "unixVer": "3.9.0"
|
|
74
|
+
* }
|
|
75
|
+
* }
|
|
76
|
+
* }
|
|
77
|
+
* @uniVueVersion 2,3
|
|
78
|
+
*/
|
|
79
|
+
evalJS(js : string) : void
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface Uni {
|
|
83
|
+
/**
|
|
84
|
+
* @description 创建 web-view 组件的上下文对象,用于操作 web-view 的行为。
|
|
85
|
+
* @uniplatform {
|
|
86
|
+
* "app": {
|
|
87
|
+
* "android": {
|
|
88
|
+
* "osVer": "4.4",
|
|
89
|
+
* "uniVer": "x",
|
|
90
|
+
* "unixVer": "3.9.0"
|
|
91
|
+
* }
|
|
92
|
+
* }
|
|
93
|
+
* }
|
|
94
|
+
* @uniVueVersion 2,3
|
|
95
|
+
* @return {CreateWebviewContext} web-view组件上下文对象
|
|
96
|
+
*/
|
|
97
|
+
createWebviewContext(webviewId : string | HBuilderX.WebviewIdString, component : ComponentPublicInstance | null) : WebviewContext | null
|
|
98
|
+
}
|
|
@@ -3,24 +3,10 @@ export type ReadFileSuccessResult = {
|
|
|
3
3
|
data: string
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
export type ReadFileFailResult = {
|
|
7
|
-
/**
|
|
8
|
-
* 错误码
|
|
9
|
-
*/
|
|
10
|
-
errCode: number,
|
|
11
|
-
/**
|
|
12
|
-
* 调用API的名称
|
|
13
|
-
*/
|
|
14
|
-
errSubject: string,
|
|
15
|
-
/**
|
|
16
|
-
* 错误的详细信息
|
|
17
|
-
*/
|
|
18
|
-
errMsg: string,
|
|
19
|
-
}
|
|
20
6
|
|
|
21
7
|
export type ReadFileSuccessCallback = (res: ReadFileSuccessResult) => void
|
|
22
8
|
|
|
23
|
-
export type ReadFileFailCallback = (res:
|
|
9
|
+
export type ReadFileFailCallback = (res: UniError) => void
|
|
24
10
|
|
|
25
11
|
export type ReadFileCompleteCallback = (res: any) => void
|
|
26
12
|
|
|
@@ -54,24 +40,10 @@ export type WriteFileSuccessResult = {
|
|
|
54
40
|
filePath: string,
|
|
55
41
|
}
|
|
56
42
|
|
|
57
|
-
export type WriteFileFailResult = {
|
|
58
|
-
/**
|
|
59
|
-
* 错误码
|
|
60
|
-
*/
|
|
61
|
-
errCode: number,
|
|
62
|
-
/**
|
|
63
|
-
* 调用API的名称
|
|
64
|
-
*/
|
|
65
|
-
errSubject: string,
|
|
66
|
-
/**
|
|
67
|
-
* 错误的详细信息
|
|
68
|
-
*/
|
|
69
|
-
errMsg: string,
|
|
70
|
-
}
|
|
71
43
|
|
|
72
44
|
export type WriteFileSuccessCallback = (res: WriteFileSuccessResult) => void
|
|
73
45
|
|
|
74
|
-
export type WriteFileFailCallback = (res:
|
|
46
|
+
export type WriteFileFailCallback = (res: UniError) => void
|
|
75
47
|
|
|
76
48
|
export type WriteFileCompleteCallback = (res: any) => void
|
|
77
49
|
|
|
@@ -109,7 +81,7 @@ export interface FileSystemManager {
|
|
|
109
81
|
export type GetFileSystemManager = () => FileSystemManager;
|
|
110
82
|
|
|
111
83
|
|
|
112
|
-
|
|
84
|
+
interface Uni {
|
|
113
85
|
/**
|
|
114
86
|
* 获取文件管理器
|
|
115
87
|
* @uniPlatform {
|
|
@@ -128,5 +100,5 @@ export interface Uni {
|
|
|
128
100
|
* }
|
|
129
101
|
* @uniVueVersion 2,3 //支持的vue版本
|
|
130
102
|
*/
|
|
131
|
-
|
|
103
|
+
getFileSystemManager():FileSystemManager
|
|
132
104
|
}
|
package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts
RENAMED
|
@@ -16,7 +16,7 @@ export interface Uni {
|
|
|
16
16
|
* "ios": {
|
|
17
17
|
* "osVer": "9.0",
|
|
18
18
|
* "uniVer": "√",
|
|
19
|
-
* "unixVer": "
|
|
19
|
+
* "unixVer": "x"
|
|
20
20
|
* }
|
|
21
21
|
* }
|
|
22
22
|
* }
|
|
@@ -25,7 +25,7 @@ export interface Uni {
|
|
|
25
25
|
uni.getAppAuthorizeSetting()
|
|
26
26
|
```
|
|
27
27
|
*/
|
|
28
|
-
getAppAuthorizeSetting:
|
|
28
|
+
getAppAuthorizeSetting(): GetAppAuthorizeSettingResult;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
|
|
@@ -36,7 +36,21 @@ export type GetAppAuthorizeSettingResult = {
|
|
|
36
36
|
* - authorized: 已经获得授权,无需再次请求授权
|
|
37
37
|
* - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限)
|
|
38
38
|
* - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关)
|
|
39
|
-
* @type 'authorized' | 'denied' | 'not determined'
|
|
39
|
+
* @type 'authorized' | 'denied' | 'not determined'
|
|
40
|
+
* @uniPlatform {
|
|
41
|
+
* "app": {
|
|
42
|
+
* "android": {
|
|
43
|
+
* "osVer": "x",
|
|
44
|
+
* "uniVer": "x",
|
|
45
|
+
* "unixVer": "x"
|
|
46
|
+
* },
|
|
47
|
+
* "ios": {
|
|
48
|
+
* "osVer": "9.0",
|
|
49
|
+
* "uniVer": "√",
|
|
50
|
+
* "unixVer": "x"
|
|
51
|
+
* }
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
40
54
|
*/
|
|
41
55
|
albumAuthorized: string | null,
|
|
42
56
|
/**
|
|
@@ -45,7 +59,21 @@ export type GetAppAuthorizeSettingResult = {
|
|
|
45
59
|
* - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限)
|
|
46
60
|
* - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关)
|
|
47
61
|
* - config error: Android平台没有该值;iOS平台:表示没有在 `manifest.json -> App模块配置` 中配置 `BlueTooth(低功耗蓝牙)` 模块
|
|
48
|
-
* @type 'authorized' | 'denied' | 'not determined' | 'config error'
|
|
62
|
+
* @type 'authorized' | 'denied' | 'not determined' | 'config error'
|
|
63
|
+
* @uniPlatform {
|
|
64
|
+
* "app": {
|
|
65
|
+
* "android": {
|
|
66
|
+
* "osVer": "x",
|
|
67
|
+
* "uniVer": "x",
|
|
68
|
+
* "unixVer": "x"
|
|
69
|
+
* },
|
|
70
|
+
* "ios": {
|
|
71
|
+
* "osVer": "9.0",
|
|
72
|
+
* "uniVer": "√",
|
|
73
|
+
* "unixVer": "x"
|
|
74
|
+
* }
|
|
75
|
+
* }
|
|
76
|
+
* }
|
|
49
77
|
*/
|
|
50
78
|
bluetoothAuthorized: string | null,
|
|
51
79
|
/**
|
|
@@ -67,7 +95,7 @@ export type GetAppAuthorizeSettingResult = {
|
|
|
67
95
|
*/
|
|
68
96
|
locationAuthorized: string,
|
|
69
97
|
/**
|
|
70
|
-
* 定位准确度。true 表示模糊定位,false
|
|
98
|
+
* 定位准确度。true 表示模糊定位,false 表示精确定位
|
|
71
99
|
* - reduced: 模糊定位
|
|
72
100
|
* - full: 精准定位
|
|
73
101
|
* - unsupported: 不支持(包括用户拒绝定位权限和没有在 `manifest.json -> App模块配置` 中配置 `Geolocation(定位)` 模块)
|
|
@@ -76,7 +104,21 @@ export type GetAppAuthorizeSettingResult = {
|
|
|
76
104
|
locationAccuracy: string | null,
|
|
77
105
|
/**
|
|
78
106
|
* 定位准确度(推荐使用 locationAccuracy 属性)。true 表示模糊定位,false 表示精确定位(仅 iOS 支持)
|
|
79
|
-
* @type boolean
|
|
107
|
+
* @type boolean
|
|
108
|
+
* @uniPlatform {
|
|
109
|
+
* "app": {
|
|
110
|
+
* "android": {
|
|
111
|
+
* "osVer": "x",
|
|
112
|
+
* "uniVer": "x",
|
|
113
|
+
* "unixVer": "x"
|
|
114
|
+
* },
|
|
115
|
+
* "ios": {
|
|
116
|
+
* "osVer": "9.0",
|
|
117
|
+
* "uniVer": "√",
|
|
118
|
+
* "unixVer": "x"
|
|
119
|
+
* }
|
|
120
|
+
* }
|
|
121
|
+
* }
|
|
80
122
|
*/
|
|
81
123
|
locationReducedAccuracy: boolean | null,
|
|
82
124
|
/**
|
|
@@ -103,7 +145,21 @@ export type GetAppAuthorizeSettingResult = {
|
|
|
103
145
|
* - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限)
|
|
104
146
|
* - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关)
|
|
105
147
|
* - config error: 没有在 `manifest.json -> App模块配置` 中配置 `Push(推送)` 模块
|
|
106
|
-
* @type 'authorized' | 'denied' | 'not determined' | 'config error'
|
|
148
|
+
* @type 'authorized' | 'denied' | 'not determined' | 'config error'
|
|
149
|
+
* @uniPlatform {
|
|
150
|
+
* "app": {
|
|
151
|
+
* "android": {
|
|
152
|
+
* "osVer": "x",
|
|
153
|
+
* "uniVer": "x",
|
|
154
|
+
* "unixVer": "x"
|
|
155
|
+
* },
|
|
156
|
+
* "ios": {
|
|
157
|
+
* "osVer": "10.0",
|
|
158
|
+
* "uniVer": "√",
|
|
159
|
+
* "unixVer": "x"
|
|
160
|
+
* }
|
|
161
|
+
* }
|
|
162
|
+
* }
|
|
107
163
|
*/
|
|
108
164
|
notificationAlertAuthorized: string | null,
|
|
109
165
|
/**
|
|
@@ -112,7 +168,21 @@ export type GetAppAuthorizeSettingResult = {
|
|
|
112
168
|
* - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限)
|
|
113
169
|
* - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关)
|
|
114
170
|
* - config error: 没有在 `manifest.json -> App模块配置` 中配置 `Push(推送)` 模块
|
|
115
|
-
* @type 'authorized' | 'denied' | 'not determined' | 'config error'
|
|
171
|
+
* @type 'authorized' | 'denied' | 'not determined' | 'config error'
|
|
172
|
+
* @uniPlatform {
|
|
173
|
+
* "app": {
|
|
174
|
+
* "android": {
|
|
175
|
+
* "osVer": "x",
|
|
176
|
+
* "uniVer": "x",
|
|
177
|
+
* "unixVer": "x"
|
|
178
|
+
* },
|
|
179
|
+
* "ios": {
|
|
180
|
+
* "osVer": "10.0",
|
|
181
|
+
* "uniVer": "√",
|
|
182
|
+
* "unixVer": "x"
|
|
183
|
+
* }
|
|
184
|
+
* }
|
|
185
|
+
* }
|
|
116
186
|
*/
|
|
117
187
|
notificationBadgeAuthorized: string | null,
|
|
118
188
|
/**
|
|
@@ -121,7 +191,21 @@ export type GetAppAuthorizeSettingResult = {
|
|
|
121
191
|
* - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限)
|
|
122
192
|
* - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关)
|
|
123
193
|
* - config error: 没有在 `manifest.json -> App模块配置` 中配置 `Push(推送)` 模块
|
|
124
|
-
* @type 'authorized' | 'denied' | 'not determined' | 'config error'
|
|
194
|
+
* @type 'authorized' | 'denied' | 'not determined' | 'config error'
|
|
195
|
+
* @uniPlatform {
|
|
196
|
+
* "app": {
|
|
197
|
+
* "android": {
|
|
198
|
+
* "osVer": "x",
|
|
199
|
+
* "uniVer": "x",
|
|
200
|
+
* "unixVer": "x"
|
|
201
|
+
* },
|
|
202
|
+
* "ios": {
|
|
203
|
+
* "osVer": "10.0",
|
|
204
|
+
* "uniVer": "√",
|
|
205
|
+
* "unixVer": "x"
|
|
206
|
+
* }
|
|
207
|
+
* }
|
|
208
|
+
* }
|
|
125
209
|
*/
|
|
126
210
|
notificationSoundAuthorized: string | null,
|
|
127
211
|
/**
|
|
@@ -129,7 +213,21 @@ export type GetAppAuthorizeSettingResult = {
|
|
|
129
213
|
* - authorized: 已经获得授权,无需再次请求授权
|
|
130
214
|
* - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限)
|
|
131
215
|
* - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关)
|
|
132
|
-
* @type 'authorized' | 'denied' | 'not determined'
|
|
216
|
+
* @type 'authorized' | 'denied' | 'not determined'
|
|
217
|
+
* @uniPlatform {
|
|
218
|
+
* "app": {
|
|
219
|
+
* "android": {
|
|
220
|
+
* "osVer": "x",
|
|
221
|
+
* "uniVer": "x",
|
|
222
|
+
* "unixVer": "x"
|
|
223
|
+
* },
|
|
224
|
+
* "ios": {
|
|
225
|
+
* "osVer": "x",
|
|
226
|
+
* "uniVer": "x",
|
|
227
|
+
* "unixVer": "x"
|
|
228
|
+
* }
|
|
229
|
+
* }
|
|
230
|
+
* }
|
|
133
231
|
*/
|
|
134
232
|
phoneCalendarAuthorized: string | null
|
|
135
233
|
};
|