@dcloudio/uni-app-x 0.7.58 → 0.7.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -2
- package/types/index.d.ts +1 -0
- package/types/native/CSSStyleDeclaration.d.ts +31 -6
- package/types/native/DOMRect.d.ts +60 -10
- package/types/native/IUniElement.d.ts +459 -0
- package/types/native/UniElement.d.ts +3 -2
- package/types/native/UniPage.d.ts +2 -2
- package/types/native/UniWebViewContentHeightChangeEvent.d.ts +31 -0
- package/types/native/UniWebViewElement.d.ts +3 -1
- package/types/native/global.d.ts +8 -0
- package/types/native/index.d.ts +1 -0
- package/types/uni/env/index.d.ts +5 -5
- package/types/uni/uts-plugin-api/.temp/uni-actionSheet/utssdk/interface.uts +554 -0
- package/types/uni/uts-plugin-api/.temp/uni-addPhoneContact/utssdk/interface.uts +224 -0
- package/types/uni/uts-plugin-api/.temp/uni-arrayBufferToBase64/utssdk/interface.uts +77 -0
- package/types/uni/uts-plugin-api/.temp/uni-authentication/utssdk/interface.uts +365 -0
- package/types/uni/uts-plugin-api/.temp/uni-base64ToArrayBuffer/utssdk/interface.uts +77 -0
- package/types/uni/uts-plugin-api/.temp/uni-canvas/utssdk/interface.uts +972 -0
- package/types/uni/uts-plugin-api/.temp/uni-chooseLocation/utssdk/interface.uts +410 -0
- package/types/uni/uts-plugin-api/.temp/uni-chooseMedia/utssdk/interface.uts +459 -0
- package/types/uni/uts-plugin-api/.temp/uni-clipboard/utssdk/interface.uts +203 -0
- package/types/uni/uts-plugin-api/.temp/uni-createInnerAudioContext/utssdk/interface.uts +2613 -0
- package/types/uni/uts-plugin-api/.temp/uni-createIntersectionObserver/utssdk/interface.uts +152 -0
- package/types/uni/uts-plugin-api/.temp/uni-createRequestPermissionListener/utssdk/interface.uts +61 -0
- package/types/uni/uts-plugin-api/.temp/uni-createSelectorQuery/utssdk/interface.uts +548 -0
- package/types/uni/uts-plugin-api/.temp/uni-createWebviewContext/utssdk/interface.uts +137 -0
- package/types/uni/uts-plugin-api/.temp/uni-dialogPage/utssdk/interface.uts +1380 -0
- package/types/uni/uts-plugin-api/.temp/uni-document/utssdk/interface.uts +76 -0
- package/types/uni/uts-plugin-api/.temp/uni-event/utssdk/interface.uts +338 -0
- package/types/uni/uts-plugin-api/.temp/uni-exit/utssdk/interface.uts +102 -0
- package/types/uni/uts-plugin-api/.temp/uni-file/utssdk/interface.uts +384 -0
- package/types/uni/uts-plugin-api/.temp/uni-fileSystemManager/utssdk/interface.uts +5316 -0
- package/types/uni/uts-plugin-api/.temp/uni-getAccessibilityInfo/utssdk/interface.uts +35 -0
- package/types/uni/uts-plugin-api/.temp/uni-getAppAuthorizeSetting/utssdk/interface.uts +616 -0
- package/types/uni/uts-plugin-api/.temp/uni-getAppBaseInfo/utssdk/interface.uts +2157 -0
- package/types/uni/uts-plugin-api/.temp/uni-getBackgroundAudioManager/utssdk/interface.uts +895 -0
- package/types/uni/uts-plugin-api/.temp/uni-getDeviceInfo/utssdk/interface.uts +1755 -0
- package/types/uni/uts-plugin-api/.temp/uni-getElementById/utssdk/interface.uts +82 -0
- package/types/uni/uts-plugin-api/.temp/uni-getEnterOptionsSync/utssdk/interface.uts +295 -0
- package/types/uni/uts-plugin-api/.temp/uni-getLaunchOptionsSync/utssdk/interface.uts +299 -0
- package/types/uni/uts-plugin-api/.temp/uni-getLocation/utssdk/interface.uts +1764 -0
- package/types/uni/uts-plugin-api/.temp/uni-getLocation-system/utssdk/interface.uts +1 -0
- package/types/uni/uts-plugin-api/.temp/uni-getLocation-tencent/utssdk/interface.uts +1 -0
- package/types/uni/uts-plugin-api/.temp/uni-getLocation-tencent-uni1/utssdk/interface.uts +736 -0
- package/types/uni/uts-plugin-api/.temp/uni-getNetworkType/utssdk/interface.uts +274 -0
- package/types/uni/uts-plugin-api/.temp/uni-getPerformance/utssdk/interface.uts +198 -0
- package/types/uni/uts-plugin-api/.temp/uni-getProvider/utssdk/interface.uts +634 -0
- package/types/uni/uts-plugin-api/.temp/uni-getRecorderManager/utssdk/interface.uts +980 -0
- package/types/uni/uts-plugin-api/.temp/uni-getSystemInfo/utssdk/interface.uts +5550 -0
- package/types/uni/uts-plugin-api/.temp/uni-getSystemSetting/utssdk/interface.uts +501 -0
- package/types/uni/uts-plugin-api/.temp/uni-installApk/utssdk/interface.uts +83 -0
- package/types/uni/uts-plugin-api/.temp/uni-interceptor/utssdk/interface.uts +169 -0
- package/types/uni/uts-plugin-api/.temp/uni-keyboard/utssdk/interface.uts +102 -0
- package/types/uni/uts-plugin-api/.temp/uni-loadFontFace/utssdk/interface.uts +580 -0
- package/types/uni/uts-plugin-api/.temp/uni-makePhoneCall/utssdk/interface.uts +100 -0
- package/types/uni/uts-plugin-api/.temp/uni-media/utssdk/interface.uts +2980 -0
- package/types/uni/uts-plugin-api/.temp/uni-modal/utssdk/interface.uts +190 -0
- package/types/uni/uts-plugin-api/.temp/uni-navigationBar/utssdk/interface.uts +1002 -0
- package/types/uni/uts-plugin-api/.temp/uni-network/utssdk/interface.uts +3620 -0
- package/types/uni/uts-plugin-api/.temp/uni-oauth/utssdk/interface.uts +1592 -0
- package/types/uni/uts-plugin-api/.temp/uni-oauth-huawei/utssdk/interface.uts +1 -0
- package/types/uni/uts-plugin-api/.temp/uni-openAppAuthorizeSetting/utssdk/interface.uts +254 -0
- package/types/uni/uts-plugin-api/.temp/uni-openDocument/utssdk/interface.uts +112 -0
- package/types/uni/uts-plugin-api/.temp/uni-pageScrollTo/utssdk/interface.uts +153 -0
- package/types/uni/uts-plugin-api/.temp/uni-payment/utssdk/interface.uts +833 -0
- package/types/uni/uts-plugin-api/.temp/uni-payment-alipay/utssdk/interface.uts +1 -0
- package/types/uni/uts-plugin-api/.temp/uni-payment-huawei/utssdk/interface.uts +1 -0
- package/types/uni/uts-plugin-api/.temp/uni-payment-wxpay/utssdk/interface.uts +3 -0
- package/types/uni/uts-plugin-api/.temp/uni-previewImage/utssdk/interface.uts +518 -0
- package/types/uni/uts-plugin-api/.temp/uni-privacy/utssdk/interface.uts +560 -0
- package/types/uni/uts-plugin-api/.temp/uni-prompt/utssdk/interface.uts +2607 -0
- package/types/uni/uts-plugin-api/.temp/uni-pullDownRefresh/utssdk/interface.uts +189 -0
- package/types/uni/uts-plugin-api/.temp/uni-requestMerchantTransfer/utssdk/interface.uts +710 -0
- package/types/uni/uts-plugin-api/.temp/uni-route/utssdk/interface.uts +2695 -0
- package/types/uni/uts-plugin-api/.temp/uni-rpx2px/utssdk/interface.uts +80 -0
- package/types/uni/uts-plugin-api/.temp/uni-scanCode/utssdk/interface.uts +130 -0
- package/types/uni/uts-plugin-api/.temp/uni-shareWithSystem/utssdk/interface.uts +719 -0
- package/types/uni/uts-plugin-api/.temp/uni-sse/utssdk/interface.uts +277 -0
- package/types/uni/uts-plugin-api/.temp/uni-storage/utssdk/interface.uts +1020 -0
- package/types/uni/uts-plugin-api/.temp/uni-tabBar/utssdk/interface.uts +1148 -0
- package/types/uni/uts-plugin-api/.temp/uni-theme/utssdk/interface.uts +1059 -0
- package/types/uni/uts-plugin-api/.temp/uni-virtualPayment/utssdk/interface.uts +1660 -0
- package/types/uni/uts-plugin-api/.temp/uni-websocket/utssdk/interface.uts +1941 -0
- package/types/uni/uts-plugin-api/global.d.ts +3 -0
- package/types/uni/uts-plugin-api/index.d.ts +3 -0
- package/types/uni/uts-plugin-api/lib/uni-barcode-scanning/utssdk/global.d.ts +8 -0
- package/types/uni/uts-plugin-api/lib/uni-barcode-scanning/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-barcode-scanning/utssdk/interface.d.ts +0 -0
- package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/global.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/index.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +16 -6
- package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/global.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +45 -0
- package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +3 -0
- package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +238 -233
- package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +28 -1
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +0 -9
- package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +67 -239
- package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +24 -4
- package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/global.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/index.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +293 -179
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +118 -78
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/global.d.ts +8 -0
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +3932 -3514
- package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/global.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/index.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +778 -290
- package/types/uni/uts-plugin-api/lib/uni-recorder/utssdk/global.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-recorder/utssdk/index.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-recorder/utssdk/interface.d.ts +2254 -1281
- package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-share/utssdk/global.d.ts +36 -0
- package/types/uni/uts-plugin-api/lib/uni-share/utssdk/index.d.ts +17 -0
- package/types/uni/uts-plugin-api/lib/uni-share/utssdk/interface.d.ts +180 -0
- package/types/uni/uts-plugin-api/lib/uni-share-weixin/utssdk/global.d.ts +8 -0
- package/types/uni/uts-plugin-api/lib/uni-share-weixin/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-share-weixin/utssdk/interface.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-sse/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +126 -67
- package/types/uni/uts-plugin-biz/.temp/uni-ad/utssdk/interface.uts +726 -0
- package/types/uni/uts-plugin-biz/.temp/uni-crash/utssdk/interface.uts +89 -0
- package/types/uni/uts-plugin-biz/.temp/uni-facialRecognitionVerify/utssdk/interface.uts +212 -0
- package/types/uni/uts-plugin-biz/.temp/uni-map-tencent/utssdk/interface.uts +2359 -0
- package/types/uni/uts-plugin-biz/.temp/uni-push/utssdk/interface.uts +960 -0
- package/types/uni/uts-plugin-biz/.temp/uni-secure-network/utssdk/interface.uts +204 -0
- package/types/uni/uts-plugin-biz/.temp/uni-verify/utssdk/interface.uts +730 -0
- package/types/uni/uts-plugin-component/.temp/uni-camera/utssdk/interface.uts +221 -0
- package/types/uni/uts-plugin-component/.temp/uni-video/utssdk/interface.uts +935 -0
- package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/global.d.ts +16 -0
- package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/index.d.ts +8 -0
- package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/interface.d.ts +203 -1
- package/types/uni-cloud/interface.d.ts +229 -0
- package/types/vite.d.ts +269 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export interface Uni {
|
|
2
|
+
/**
|
|
3
|
+
* 设置系统剪贴板的内容
|
|
4
|
+
*
|
|
5
|
+
* @tutorial https://uniapp.dcloud.net.cn/api/system/clipboard.html#setclipboarddata
|
|
6
|
+
* @tutorial-uni-app https://uniapp.dcloud.net.cn/api/system/clipboard.html#setclipboarddata
|
|
7
|
+
* @uniPlatform {
|
|
8
|
+
* "app": {
|
|
9
|
+
* "android": {
|
|
10
|
+
* "osVer": "5.0",
|
|
11
|
+
* "uniVer": "√",
|
|
12
|
+
* "unixVer": "x"
|
|
13
|
+
* },
|
|
14
|
+
* "ios": {
|
|
15
|
+
* "osVer": "12.0",
|
|
16
|
+
* "uniVer": "√",
|
|
17
|
+
* "unixVer": "x"
|
|
18
|
+
* },
|
|
19
|
+
* "harmony": {
|
|
20
|
+
* "osVer": "3.0",
|
|
21
|
+
* "uniVer": "4.23",
|
|
22
|
+
* "unixVer": "4.61"
|
|
23
|
+
* }
|
|
24
|
+
* },
|
|
25
|
+
* "mp": {
|
|
26
|
+
* "weixin": {
|
|
27
|
+
* "hostVer": "√",
|
|
28
|
+
* "uniVer": "√",
|
|
29
|
+
* "unixVer": "4.41"
|
|
30
|
+
* },
|
|
31
|
+
* "alipay": {
|
|
32
|
+
* "hostVer": "√",
|
|
33
|
+
* "uniVer": "√",
|
|
34
|
+
* "unixVer": "x"
|
|
35
|
+
* },
|
|
36
|
+
* "baidu": {
|
|
37
|
+
* "hostVer": "√",
|
|
38
|
+
* "uniVer": "√",
|
|
39
|
+
* "unixVer": "x"
|
|
40
|
+
* },
|
|
41
|
+
* "toutiao": {
|
|
42
|
+
* "hostVer": "√",
|
|
43
|
+
* "uniVer": "√",
|
|
44
|
+
* "unixVer": "x"
|
|
45
|
+
* },
|
|
46
|
+
* "lark": {
|
|
47
|
+
* "hostVer": "√",
|
|
48
|
+
* "uniVer": "√",
|
|
49
|
+
* "unixVer": "x"
|
|
50
|
+
* },
|
|
51
|
+
* "qq": {
|
|
52
|
+
* "hostVer": "√",
|
|
53
|
+
* "uniVer": "√",
|
|
54
|
+
* "unixVer": "x"
|
|
55
|
+
* },
|
|
56
|
+
* "kuaishou": {
|
|
57
|
+
* "hostVer": "√",
|
|
58
|
+
* "uniVer": "√",
|
|
59
|
+
* "unixVer": "x"
|
|
60
|
+
* },
|
|
61
|
+
* "jd": {
|
|
62
|
+
* "hostVer": "√",
|
|
63
|
+
* "uniVer": "√",
|
|
64
|
+
* "unixVer": "x"
|
|
65
|
+
* }
|
|
66
|
+
* },
|
|
67
|
+
* "web": {
|
|
68
|
+
* "uniVer": "√",
|
|
69
|
+
* "unixVer": "4.0"
|
|
70
|
+
* }
|
|
71
|
+
* }
|
|
72
|
+
*/
|
|
73
|
+
createElement(tagName: string): UniElement;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type CreateElement = (tagName: string) => UniElement;
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
type $OnCallback = Function
|
|
2
|
+
export type $On = (eventName: string, callback: $OnCallback) => number
|
|
3
|
+
|
|
4
|
+
type $OnceCallback = Function
|
|
5
|
+
export type $Once = (eventName: string, callback: $OnceCallback) => number
|
|
6
|
+
|
|
7
|
+
export type $Off = (eventName: string, callback?: any | null) => void
|
|
8
|
+
|
|
9
|
+
export type $Emit = (eventName: string, ...args: Array<any | null>) => void
|
|
10
|
+
|
|
11
|
+
export interface Uni {
|
|
12
|
+
/**
|
|
13
|
+
* 监听自定义事件。事件可以由 uni.$emit 触发。回调函数会接收 uni.$emit 传递的参数。
|
|
14
|
+
* 4.31+ 开始支持返回事件监听器 id, 用于 off 事件监听器。
|
|
15
|
+
*
|
|
16
|
+
* @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#on
|
|
17
|
+
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#on
|
|
18
|
+
* @tutorial-uni-app https://uniapp.dcloud.net.cn/api/window/communication.html#on
|
|
19
|
+
* @uniPlatform
|
|
20
|
+
{
|
|
21
|
+
"app": {
|
|
22
|
+
"android": {
|
|
23
|
+
"osVer": "5.0",
|
|
24
|
+
"uniVer": "√",
|
|
25
|
+
"uniUtsPlugin": "x",
|
|
26
|
+
"unixVer": "3.91",
|
|
27
|
+
"unixUtsPlugin": "3.91"
|
|
28
|
+
},
|
|
29
|
+
"ios": {
|
|
30
|
+
"osVer": "12.0",
|
|
31
|
+
"uniVer": "√",
|
|
32
|
+
"uniUtsPlugin": "x",
|
|
33
|
+
"unixVer": "4.11",
|
|
34
|
+
"unixUtsPlugin": "4.31"
|
|
35
|
+
},
|
|
36
|
+
"harmony": {
|
|
37
|
+
"osVer": "3.0",
|
|
38
|
+
"uniVer": "4.23",
|
|
39
|
+
"unixVer": "4.61"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"mp": {
|
|
43
|
+
"weixin": {
|
|
44
|
+
"hostVer": "√",
|
|
45
|
+
"uniVer": "√",
|
|
46
|
+
"unixVer": "4.41"
|
|
47
|
+
},
|
|
48
|
+
"alipay": {
|
|
49
|
+
"hostVer": "√",
|
|
50
|
+
"uniVer": "√",
|
|
51
|
+
"unixVer": "x"
|
|
52
|
+
},
|
|
53
|
+
"baidu": {
|
|
54
|
+
"hostVer": "√",
|
|
55
|
+
"uniVer": "√",
|
|
56
|
+
"unixVer": "x"
|
|
57
|
+
},
|
|
58
|
+
"toutiao": {
|
|
59
|
+
"hostVer": "√",
|
|
60
|
+
"uniVer": "√",
|
|
61
|
+
"unixVer": "x"
|
|
62
|
+
},
|
|
63
|
+
"lark": {
|
|
64
|
+
"hostVer": "√",
|
|
65
|
+
"uniVer": "√",
|
|
66
|
+
"unixVer": "x"
|
|
67
|
+
},
|
|
68
|
+
"qq": {
|
|
69
|
+
"hostVer": "√",
|
|
70
|
+
"uniVer": "√",
|
|
71
|
+
"unixVer": "x"
|
|
72
|
+
},
|
|
73
|
+
"kuaishou": {
|
|
74
|
+
"hostVer": "√",
|
|
75
|
+
"uniVer": "√",
|
|
76
|
+
"unixVer": "x"
|
|
77
|
+
},
|
|
78
|
+
"jd": {
|
|
79
|
+
"hostVer": "√",
|
|
80
|
+
"uniVer": "√",
|
|
81
|
+
"unixVer": "x"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"web": {
|
|
85
|
+
"uniVer": "√",
|
|
86
|
+
"unixVer": "4.0"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
* @param eventName 事件名称
|
|
90
|
+
* @param callback 事件回调
|
|
91
|
+
*/
|
|
92
|
+
$on(eventName: string, callback: $OnCallback): number
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 移除自定义事件监听器。如果提供了事件名和回调,则只移除这个回调的监听器。
|
|
96
|
+
* 4.13+ 开始支持第二个参数为可选,如果仅提供事件名,则移除该事件的所有监听器。
|
|
97
|
+
* 4.31+ 开始第二个参数的类型由 `Function | null` 调整为 `any | null`, 支持传入 `uni.$on`、`uni.$once` 返回的事件监听器 id, 移除指定事件监听器。
|
|
98
|
+
* @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#off
|
|
99
|
+
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#off
|
|
100
|
+
* @tutorial-uni-app https://uniapp.dcloud.net.cn/api/window/communication.html#off
|
|
101
|
+
* @uniPlatform
|
|
102
|
+
{
|
|
103
|
+
"app": {
|
|
104
|
+
"android": {
|
|
105
|
+
"osVer": "5.0",
|
|
106
|
+
"uniVer": "√",
|
|
107
|
+
"uniUtsPlugin": "x",
|
|
108
|
+
"unixVer": "3.91",
|
|
109
|
+
"unixUtsPlugin": "3.91"
|
|
110
|
+
},
|
|
111
|
+
"ios": {
|
|
112
|
+
"osVer": "12.0",
|
|
113
|
+
"uniVer": "√",
|
|
114
|
+
"uniUtsPlugin": "x",
|
|
115
|
+
"unixVer": "4.11",
|
|
116
|
+
"unixUtsPlugin": "4.31"
|
|
117
|
+
},
|
|
118
|
+
"harmony": {
|
|
119
|
+
"osVer": "3.0",
|
|
120
|
+
"uniVer": "4.23",
|
|
121
|
+
"unixVer": "4.61"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"mp": {
|
|
125
|
+
"weixin": {
|
|
126
|
+
"hostVer": "√",
|
|
127
|
+
"uniVer": "√",
|
|
128
|
+
"unixVer": "4.41"
|
|
129
|
+
},
|
|
130
|
+
"alipay": {
|
|
131
|
+
"hostVer": "√",
|
|
132
|
+
"uniVer": "√",
|
|
133
|
+
"unixVer": "x"
|
|
134
|
+
},
|
|
135
|
+
"baidu": {
|
|
136
|
+
"hostVer": "√",
|
|
137
|
+
"uniVer": "√",
|
|
138
|
+
"unixVer": "x"
|
|
139
|
+
},
|
|
140
|
+
"toutiao": {
|
|
141
|
+
"hostVer": "√",
|
|
142
|
+
"uniVer": "√",
|
|
143
|
+
"unixVer": "x"
|
|
144
|
+
},
|
|
145
|
+
"lark": {
|
|
146
|
+
"hostVer": "√",
|
|
147
|
+
"uniVer": "√",
|
|
148
|
+
"unixVer": "x"
|
|
149
|
+
},
|
|
150
|
+
"qq": {
|
|
151
|
+
"hostVer": "√",
|
|
152
|
+
"uniVer": "√",
|
|
153
|
+
"unixVer": "x"
|
|
154
|
+
},
|
|
155
|
+
"kuaishou": {
|
|
156
|
+
"hostVer": "√",
|
|
157
|
+
"uniVer": "√",
|
|
158
|
+
"unixVer": "x"
|
|
159
|
+
},
|
|
160
|
+
"jd": {
|
|
161
|
+
"hostVer": "√",
|
|
162
|
+
"uniVer": "√",
|
|
163
|
+
"unixVer": "x"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"web": {
|
|
167
|
+
"uniVer": "√",
|
|
168
|
+
"unixVer": "4.0"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
* @param eventName 事件名称
|
|
172
|
+
* @param callback 要移除的事件回调或事件监听器 id
|
|
173
|
+
*/
|
|
174
|
+
$off(eventName: string, callback?: any | null): void
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* 监听一个自定义事件。事件只触发一次,在第一次触发之后移除事件监听器。
|
|
178
|
+
* 4.31+ 开始支持返回事件监听器 id, 用于 off 事件监听器。
|
|
179
|
+
*
|
|
180
|
+
* @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#once
|
|
181
|
+
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#once
|
|
182
|
+
* @tutorial-uni-app https://uniapp.dcloud.net.cn/api/window/communication.html#once
|
|
183
|
+
* @uniPlatform
|
|
184
|
+
{
|
|
185
|
+
"app": {
|
|
186
|
+
"android": {
|
|
187
|
+
"osVer": "5.0",
|
|
188
|
+
"uniVer": "√",
|
|
189
|
+
"uniUtsPlugin": "x",
|
|
190
|
+
"unixVer": "3.91",
|
|
191
|
+
"unixUtsPlugin": "3.91"
|
|
192
|
+
},
|
|
193
|
+
"ios": {
|
|
194
|
+
"osVer": "12.0",
|
|
195
|
+
"uniVer": "√",
|
|
196
|
+
"uniUtsPlugin": "x",
|
|
197
|
+
"unixVer": "4.11",
|
|
198
|
+
"unixUtsPlugin": "4.31"
|
|
199
|
+
},
|
|
200
|
+
"harmony": {
|
|
201
|
+
"osVer": "3.0",
|
|
202
|
+
"uniVer": "4.23",
|
|
203
|
+
"unixVer": "4.61"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"mp": {
|
|
207
|
+
"weixin": {
|
|
208
|
+
"hostVer": "√",
|
|
209
|
+
"uniVer": "√",
|
|
210
|
+
"unixVer": "4.41"
|
|
211
|
+
},
|
|
212
|
+
"alipay": {
|
|
213
|
+
"hostVer": "√",
|
|
214
|
+
"uniVer": "√",
|
|
215
|
+
"unixVer": "x"
|
|
216
|
+
},
|
|
217
|
+
"baidu": {
|
|
218
|
+
"hostVer": "√",
|
|
219
|
+
"uniVer": "√",
|
|
220
|
+
"unixVer": "x"
|
|
221
|
+
},
|
|
222
|
+
"toutiao": {
|
|
223
|
+
"hostVer": "√",
|
|
224
|
+
"uniVer": "√",
|
|
225
|
+
"unixVer": "x"
|
|
226
|
+
},
|
|
227
|
+
"lark": {
|
|
228
|
+
"hostVer": "√",
|
|
229
|
+
"uniVer": "√",
|
|
230
|
+
"unixVer": "x"
|
|
231
|
+
},
|
|
232
|
+
"qq": {
|
|
233
|
+
"hostVer": "√",
|
|
234
|
+
"uniVer": "√",
|
|
235
|
+
"unixVer": "x"
|
|
236
|
+
},
|
|
237
|
+
"kuaishou": {
|
|
238
|
+
"hostVer": "√",
|
|
239
|
+
"uniVer": "√",
|
|
240
|
+
"unixVer": "x"
|
|
241
|
+
},
|
|
242
|
+
"jd": {
|
|
243
|
+
"hostVer": "√",
|
|
244
|
+
"uniVer": "√",
|
|
245
|
+
"unixVer": "x"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"web": {
|
|
249
|
+
"uniVer": "√",
|
|
250
|
+
"unixVer": "4.0"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
* @param eventName 事件名称
|
|
254
|
+
* @param callback 事件回调
|
|
255
|
+
*/
|
|
256
|
+
$once(eventName: string, callback: $OnceCallback): number
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* 触发自定义事件,附加的参数会传递给事件监听器。
|
|
260
|
+
* 在iOS平台UTS环境下或者UTS和JS通信时参数仅支持基础类型、string、Array、UTSJSONObject,其中Array,UTSJSONObject也仅支持包含上述类型,on和emit类型需匹配否则会产生异常
|
|
261
|
+
* @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
|
|
262
|
+
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
|
|
263
|
+
* @tutorial-uni-app https://uniapp.dcloud.net.cn/api/window/communication.html#emit
|
|
264
|
+
* @uniPlatform
|
|
265
|
+
{
|
|
266
|
+
"app": {
|
|
267
|
+
"android": {
|
|
268
|
+
"osVer": "5.0",
|
|
269
|
+
"uniVer": "√",
|
|
270
|
+
"uniUtsPlugin": "x",
|
|
271
|
+
"unixVer": "3.91",
|
|
272
|
+
"unixUtsPlugin": "3.91"
|
|
273
|
+
},
|
|
274
|
+
"ios": {
|
|
275
|
+
"osVer": "12.0",
|
|
276
|
+
"uniVer": "√",
|
|
277
|
+
"uniUtsPlugin": "x",
|
|
278
|
+
"unixVer": "4.11",
|
|
279
|
+
"unixUtsPlugin": "4.31"
|
|
280
|
+
},
|
|
281
|
+
"harmony": {
|
|
282
|
+
"osVer": "3.0",
|
|
283
|
+
"uniVer": "4.23",
|
|
284
|
+
"unixVer": "4.61"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"mp": {
|
|
288
|
+
"weixin": {
|
|
289
|
+
"hostVer": "√",
|
|
290
|
+
"uniVer": "√",
|
|
291
|
+
"unixVer": "4.41"
|
|
292
|
+
},
|
|
293
|
+
"alipay": {
|
|
294
|
+
"hostVer": "√",
|
|
295
|
+
"uniVer": "√",
|
|
296
|
+
"unixVer": "x"
|
|
297
|
+
},
|
|
298
|
+
"baidu": {
|
|
299
|
+
"hostVer": "√",
|
|
300
|
+
"uniVer": "√",
|
|
301
|
+
"unixVer": "x"
|
|
302
|
+
},
|
|
303
|
+
"toutiao": {
|
|
304
|
+
"hostVer": "√",
|
|
305
|
+
"uniVer": "√",
|
|
306
|
+
"unixVer": "x"
|
|
307
|
+
},
|
|
308
|
+
"lark": {
|
|
309
|
+
"hostVer": "√",
|
|
310
|
+
"uniVer": "√",
|
|
311
|
+
"unixVer": "x"
|
|
312
|
+
},
|
|
313
|
+
"qq": {
|
|
314
|
+
"hostVer": "√",
|
|
315
|
+
"uniVer": "√",
|
|
316
|
+
"unixVer": "x"
|
|
317
|
+
},
|
|
318
|
+
"kuaishou": {
|
|
319
|
+
"hostVer": "√",
|
|
320
|
+
"uniVer": "√",
|
|
321
|
+
"unixVer": "x"
|
|
322
|
+
},
|
|
323
|
+
"jd": {
|
|
324
|
+
"hostVer": "√",
|
|
325
|
+
"uniVer": "√",
|
|
326
|
+
"unixVer": "x"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"web": {
|
|
330
|
+
"uniVer": "√",
|
|
331
|
+
"unixVer": "4.0"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
* @param eventName 事件名称
|
|
335
|
+
* @param args 触发事件时传递的参数
|
|
336
|
+
*/
|
|
337
|
+
$emit(eventName: string, ...args: Array<any | null>): void
|
|
338
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* uni.exit成功回调参数
|
|
3
|
+
*/
|
|
4
|
+
export type ExitSuccess = {
|
|
5
|
+
errMsg: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 错误码
|
|
10
|
+
*/
|
|
11
|
+
export type ExitErrorCode =
|
|
12
|
+
/**
|
|
13
|
+
* 系统不支持
|
|
14
|
+
*/
|
|
15
|
+
12001 |
|
|
16
|
+
/**
|
|
17
|
+
* 未知错误
|
|
18
|
+
*/
|
|
19
|
+
12002 |
|
|
20
|
+
/**
|
|
21
|
+
* iOS平台,仅在uni-app x SDK模式中支持应用退出
|
|
22
|
+
*/
|
|
23
|
+
12003
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* uni.exit失败回调参数
|
|
27
|
+
*/
|
|
28
|
+
export interface IExitError extends IUniError {
|
|
29
|
+
errCode: ExitErrorCode
|
|
30
|
+
}
|
|
31
|
+
export type ExitFail = IExitError
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* uni.exit成功回调函数定义
|
|
35
|
+
*/
|
|
36
|
+
export type ExitSuccessCallback = (res: ExitSuccess) => void
|
|
37
|
+
/**
|
|
38
|
+
* uni.exit失败回调函数定义
|
|
39
|
+
*/
|
|
40
|
+
export type ExitFailCallback = (res: ExitFail) => void
|
|
41
|
+
/**
|
|
42
|
+
* uni.exit完成回调函数定义
|
|
43
|
+
*/
|
|
44
|
+
export type ExitCompleteCallback = (res: any) => void
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* uni.exit参数定义
|
|
48
|
+
*/
|
|
49
|
+
export type ExitOptions = {
|
|
50
|
+
/**
|
|
51
|
+
* 接口调用成功的回调函数
|
|
52
|
+
*/
|
|
53
|
+
success?: ExitSuccessCallback | null,
|
|
54
|
+
/**
|
|
55
|
+
* 接口调用失败的回调函数
|
|
56
|
+
*/
|
|
57
|
+
fail?: ExitFailCallback | null,
|
|
58
|
+
/**
|
|
59
|
+
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
|
60
|
+
*/
|
|
61
|
+
complete?: ExitCompleteCallback | null
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
export interface Uni {
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 退出当前应用
|
|
69
|
+
* @uniPlatform
|
|
70
|
+
{
|
|
71
|
+
"app": {
|
|
72
|
+
"android": {
|
|
73
|
+
"osVer": "5.0",
|
|
74
|
+
"uniVer": "3.8.15",
|
|
75
|
+
"uniUtsPlugin": "3.91",
|
|
76
|
+
"unixVer": "3.91",
|
|
77
|
+
"unixUtsPlugin": "3.91"
|
|
78
|
+
},
|
|
79
|
+
"ios": {
|
|
80
|
+
"osVer": "12.0",
|
|
81
|
+
"uniVer": "x",
|
|
82
|
+
"uniUtsPlugin": "x",
|
|
83
|
+
"unixVer": "4.33",
|
|
84
|
+
"unixUtsPlugin": "4.33"
|
|
85
|
+
},
|
|
86
|
+
"harmony": {
|
|
87
|
+
"osVer": "3.0",
|
|
88
|
+
"uniVer": "4.23",
|
|
89
|
+
"unixVer": "4.61"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"web": {
|
|
93
|
+
"uniVer": "x",
|
|
94
|
+
"unixVer": "x"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
* @uniVueVersion 2,3 //支持的vue版本
|
|
98
|
+
*/
|
|
99
|
+
exit(options?: ExitOptions | null):void;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type Exit = (options?: ExitOptions | null) => void;
|