@dcloudio/uni-app-x 0.7.13 → 0.7.14
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 +1 -1
- package/types/app.d.ts +5 -6
- package/types/index.d.ts +1 -1
- package/types/native/CSSStyleDeclaration.d.ts +72 -0
- package/types/native/DOMRect.d.ts +180 -0
- package/types/native/DrawableContext.d.ts +628 -161
- package/types/native/IUniElement.d.ts +1834 -222
- package/types/native/SnapshotOptions.d.ts +0 -1
- package/types/native/UniApp.d.ts +17 -1
- package/types/native/UniEvent.d.ts +30 -0
- package/types/native/UniNativePage.d.ts +4 -0
- package/types/native/UniProvider.d.ts +14 -0
- package/types/native/UniResizeObserver.d.ts +92 -2
- package/types/native/UniSwiperAnimationFinishEvent.d.ts +24 -2
- package/types/native/UniSwiperChangeEvent.d.ts +24 -2
- package/types/native/UniSwiperTransitionEvent.d.ts +2 -2
- package/types/native/UniWebViewErrorEvent.d.ts +3 -3
- package/types/native/UniWebViewLoadEvent.d.ts +2 -2
- package/types/native/UniWebViewLoadingEvent.d.ts +2 -2
- package/types/native/UniWebViewMessageEvent.d.ts +1 -1
- package/types/native/global.d.ts +19 -9
- package/types/native/index.d.ts +1 -0
- package/types/page.d.ts +85 -0
- package/types/uni/global.d.ts +1 -0
- package/types/uni/index.d.ts +2 -1
- package/types/uni/uts-plugin-api/global.d.ts +2 -1
- package/types/uni/uts-plugin-api/index.d.ts +2 -1
- package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +6 -2
- package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/global.d.ts +6 -0
- package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +3 -0
- package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +56 -7
- package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +87 -11
- package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +292 -9
- package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +533 -118
- package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +4 -4
- package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +88 -74
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +1357 -39
- package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +102 -6
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +164 -26
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +4 -4
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +14 -15
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +661 -41
- package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +13 -10
- package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +10 -10
- package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +90 -7
- package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/global.d.ts +42 -0
- package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/index.d.ts +20 -0
- package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +466 -0
- package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +152 -2
- package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/global.d.ts +4 -4
- package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/index.d.ts +2 -2
- package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +42 -37
- package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +193 -19
- package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +10 -10
- package/types/uni/uts-plugin-extend/README.md +3 -0
- package/types/uni/uts-plugin-extend/global.d.ts +14 -0
- package/types/uni/uts-plugin-extend/index.d.ts +16 -0
- package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/global.d.ts +12 -0
- package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/interface.d.ts +365 -0
- package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/global.d.ts +23 -0
- package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/index.d.ts +10 -0
- package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/interface.d.ts +710 -0
- package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/global.d.ts +21 -0
- package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/index.d.ts +9 -0
- package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/interface.d.ts +151 -0
- package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/global.d.ts +25 -0
- package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/index.d.ts +11 -0
- package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/interface.d.ts +363 -0
- package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/global.d.ts +11 -0
- package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +224 -0
- package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/global.d.ts +53 -0
- package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/index.d.ts +25 -0
- package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/interface.d.ts +486 -0
- package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +7 -0
- package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +296 -0
- package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/global.d.ts +21 -0
- package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/index.d.ts +9 -0
- package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/interface.d.ts +119 -0
- package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/global.d.ts +15 -0
- package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/interface.d.ts +229 -0
- package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/global.d.ts +14 -0
- package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/interface.d.ts +559 -0
- package/types/uni/uts-plugin-extend/lib/uni-makePhoneCall/utssdk/global.d.ts +21 -0
- package/types/uni/uts-plugin-extend/lib/uni-makePhoneCall/utssdk/index.d.ts +9 -0
- package/types/uni/uts-plugin-extend/lib/uni-makePhoneCall/utssdk/interface.d.ts +121 -0
- package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/global.d.ts +9 -0
- package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/interface.d.ts +163 -0
- package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/global.d.ts +21 -0
- package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/index.d.ts +9 -0
- package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/interface.d.ts +143 -0
- package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/global.d.ts +7 -0
- package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/interface.d.ts +106 -0
- package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/global.d.ts +21 -0
- package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/index.d.ts +9 -0
- package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/interface.d.ts +122 -0
- package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/global.d.ts +9 -0
- package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/interface.d.ts +165 -0
- package/types/uni-cloud/index.d.ts +4 -0
- package/types/uni-cloud/interface.d.ts +106 -17
- package/types/vue/CheckboxGroupChangeEvent.d.ts +10 -13
- package/types/vue/LifeCycle.d.ts +32 -32
- package/types/vue/PickerViewChangeEvent.d.ts +10 -13
- package/types/vue/ProgressActiveendEvent.d.ts +9 -11
- package/types/vue/RadioGroupChangeEvent.d.ts +10 -13
- package/types/vue/SliderChangeEvent.d.ts +9 -10
- package/types/vue/SwitchChangeEvent.d.ts +11 -13
- package/types/vue/UniCloudDBElement.d.ts +72 -75
- package/types/vue/UniFormElement.d.ts +17 -19
- package/types/vue/UniNavigatorElement.d.ts +1 -2
- package/types/vue/global.d.ts +190 -0
- package/types/vue/index.d.ts +10 -11
- package/types/vue-global/index.d.ts +1 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
export interface Uni {
|
|
2
|
+
/**
|
|
3
|
+
* 获取全局唯一的背景音频管理器 backgroundAudioManager
|
|
4
|
+
*
|
|
5
|
+
* @tutorial https://uniapp.dcloud.io/api/media/background-audio-manager.html
|
|
6
|
+
* @tutorial-uni-app https://uniapp.dcloud.io/api/media/background-audio-manager.html
|
|
7
|
+
* @uniPlatform {
|
|
8
|
+
* "app": {
|
|
9
|
+
* "android": {
|
|
10
|
+
* "osVer": "5.0",
|
|
11
|
+
* "uniVer": "√",
|
|
12
|
+
* "unixVer": "x"
|
|
13
|
+
* },
|
|
14
|
+
* "ios": {
|
|
15
|
+
* "osVer": "9.0",
|
|
16
|
+
* "uniVer": "√",
|
|
17
|
+
* "unixVer": "x"
|
|
18
|
+
* },
|
|
19
|
+
* "harmony": {
|
|
20
|
+
* "osVer": "x",
|
|
21
|
+
* "uniVer": "x",
|
|
22
|
+
* "unixVer": "x"
|
|
23
|
+
* }
|
|
24
|
+
* },
|
|
25
|
+
* "mp": {
|
|
26
|
+
* "weixin": {
|
|
27
|
+
* "hostVer": "√",
|
|
28
|
+
* "uniVer": "√",
|
|
29
|
+
* "unixVer": "x"
|
|
30
|
+
* },
|
|
31
|
+
* "alipay": {
|
|
32
|
+
* "hostVer": "x",
|
|
33
|
+
* "uniVer": "x",
|
|
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": "x",
|
|
48
|
+
* "uniVer": "x",
|
|
49
|
+
* "unixVer": "x"
|
|
50
|
+
* },
|
|
51
|
+
* "qq": {
|
|
52
|
+
* "hostVer": "√",
|
|
53
|
+
* "uniVer": "√",
|
|
54
|
+
* "unixVer": "x"
|
|
55
|
+
* },
|
|
56
|
+
* "kuaishou": {
|
|
57
|
+
* "hostVer": "x",
|
|
58
|
+
* "uniVer": "x",
|
|
59
|
+
* "unixVer": "x"
|
|
60
|
+
* },
|
|
61
|
+
* "jd": {
|
|
62
|
+
* "hostVer": "√",
|
|
63
|
+
* "uniVer": "√",
|
|
64
|
+
* "unixVer": "x"
|
|
65
|
+
* }
|
|
66
|
+
* },
|
|
67
|
+
* "web": {
|
|
68
|
+
* "uniVer": "x",
|
|
69
|
+
* "unixVer": "x"
|
|
70
|
+
* }
|
|
71
|
+
* }
|
|
72
|
+
*/
|
|
73
|
+
getBackgroundAudioManager: GetBackgroundAudioManager;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type GetBackgroundAudioManager = () => BackgroundAudioManager;
|
|
77
|
+
|
|
78
|
+
export interface BackgroundAudioManager {
|
|
79
|
+
/**
|
|
80
|
+
* 当前音频的长度(单位:s),只有在当前有合法的 src 时返回
|
|
81
|
+
*/
|
|
82
|
+
duration: number;
|
|
83
|
+
/**
|
|
84
|
+
* 当前音频的播放位置(单位:s),只有在当前有合法的 src 时返回
|
|
85
|
+
*/
|
|
86
|
+
currentTime: number;
|
|
87
|
+
/**
|
|
88
|
+
* 当前是是否暂停或停止状态,true 表示暂停或停止,false 表示正在播放
|
|
89
|
+
* @type boolean
|
|
90
|
+
*/
|
|
91
|
+
paused: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* 音频的数据源,默认为空字符串,当设置了新的 src 时,会自动开始播放 ,目前支持的格式有 m4a, aac, mp3, wav
|
|
94
|
+
*/
|
|
95
|
+
src: string;
|
|
96
|
+
/**
|
|
97
|
+
* 音频开始播放的位置(单位:s)
|
|
98
|
+
*/
|
|
99
|
+
startTime: number;
|
|
100
|
+
/**
|
|
101
|
+
* 音频缓冲的时间点,仅保证当前播放时间点到此时间点内容已缓冲
|
|
102
|
+
*/
|
|
103
|
+
buffered: number;
|
|
104
|
+
/**
|
|
105
|
+
* 音频标题,用于做原生音频播放器音频标题。原生音频播放器中的分享功能,分享出去的卡片标题,也将使用该值。
|
|
106
|
+
*/
|
|
107
|
+
title: string;
|
|
108
|
+
/**
|
|
109
|
+
* 专辑名,原生音频播放器中的分享功能,分享出去的卡片简介,也将使用该值
|
|
110
|
+
*/
|
|
111
|
+
epname: string;
|
|
112
|
+
/**
|
|
113
|
+
* 歌手名,原生音频播放器中的分享功能,分享出去的卡片简介,也将使用该值
|
|
114
|
+
*/
|
|
115
|
+
singer: string;
|
|
116
|
+
/**
|
|
117
|
+
* 封面图url,用于做原生音频播放器背景图。原生音频播放器中的分享功能,分享出去的卡片配图及背景也将使用该图。
|
|
118
|
+
*/
|
|
119
|
+
coverImgUrl: string;
|
|
120
|
+
/**
|
|
121
|
+
* 页面链接,原生音频播放器中的分享功能,分享出去的卡片简介,也将使用该值
|
|
122
|
+
*/
|
|
123
|
+
webUrl: string;
|
|
124
|
+
/**
|
|
125
|
+
* 音频协议。默认值为 'http',设置 'hls' 可以支持播放 HLS 协议的直播音频
|
|
126
|
+
*/
|
|
127
|
+
protocol: string;
|
|
128
|
+
/**
|
|
129
|
+
* 播放的倍率。可取值: 0.5/0.8/1.0/1.25/1.5/2.0,默认值为1.0。(仅 App 支持)
|
|
130
|
+
*/
|
|
131
|
+
playbackRate?: number;
|
|
132
|
+
/**
|
|
133
|
+
* 播放
|
|
134
|
+
* @uniPlatform {
|
|
135
|
+
* "app": {
|
|
136
|
+
* "android": {
|
|
137
|
+
* "osVer": "4.4",
|
|
138
|
+
* "uniVer": "√",
|
|
139
|
+
* "unixVer": "3.9.0"
|
|
140
|
+
* }
|
|
141
|
+
* }
|
|
142
|
+
* }
|
|
143
|
+
*/
|
|
144
|
+
play(): void;
|
|
145
|
+
/**
|
|
146
|
+
* 暂停
|
|
147
|
+
* @uniPlatform {
|
|
148
|
+
* "app": {
|
|
149
|
+
* "android": {
|
|
150
|
+
* "osVer": "4.4",
|
|
151
|
+
* "uniVer": "√",
|
|
152
|
+
* "unixVer": "3.9.0"
|
|
153
|
+
* }
|
|
154
|
+
* }
|
|
155
|
+
* }
|
|
156
|
+
*/
|
|
157
|
+
pause(): void;
|
|
158
|
+
/**
|
|
159
|
+
* 跳转到指定位置,单位 s
|
|
160
|
+
* @uniPlatform {
|
|
161
|
+
* "app": {
|
|
162
|
+
* "android": {
|
|
163
|
+
* "osVer": "4.4",
|
|
164
|
+
* "uniVer": "√",
|
|
165
|
+
* "unixVer": "3.9.0"
|
|
166
|
+
* }
|
|
167
|
+
* }
|
|
168
|
+
* }
|
|
169
|
+
*/
|
|
170
|
+
seek(position: number): void;
|
|
171
|
+
/**
|
|
172
|
+
* 停止
|
|
173
|
+
* @uniPlatform {
|
|
174
|
+
* "app": {
|
|
175
|
+
* "android": {
|
|
176
|
+
* "osVer": "4.4",
|
|
177
|
+
* "uniVer": "√",
|
|
178
|
+
* "unixVer": "3.9.0"
|
|
179
|
+
* }
|
|
180
|
+
* }
|
|
181
|
+
* }
|
|
182
|
+
*/
|
|
183
|
+
stop(): void;
|
|
184
|
+
/**
|
|
185
|
+
* 背景音频进入可以播放状态,但不保证后面可以流畅播放
|
|
186
|
+
* @uniPlatform {
|
|
187
|
+
* "app": {
|
|
188
|
+
* "android": {
|
|
189
|
+
* "osVer": "4.4",
|
|
190
|
+
* "uniVer": "√",
|
|
191
|
+
* "unixVer": "3.9.0"
|
|
192
|
+
* }
|
|
193
|
+
* }
|
|
194
|
+
* }
|
|
195
|
+
*/
|
|
196
|
+
onCanplay(callback: (result: any) => void): void;
|
|
197
|
+
/**
|
|
198
|
+
* 背景音频播放事件
|
|
199
|
+
* @uniPlatform {
|
|
200
|
+
* "app": {
|
|
201
|
+
* "android": {
|
|
202
|
+
* "osVer": "4.4",
|
|
203
|
+
* "uniVer": "√",
|
|
204
|
+
* "unixVer": "3.9.0"
|
|
205
|
+
* }
|
|
206
|
+
* }
|
|
207
|
+
* }
|
|
208
|
+
*/
|
|
209
|
+
onPlay(callback: (result: any) => void): void;
|
|
210
|
+
/**
|
|
211
|
+
* 背景音频暂停事件
|
|
212
|
+
* @uniPlatform {
|
|
213
|
+
* "app": {
|
|
214
|
+
* "android": {
|
|
215
|
+
* "osVer": "4.4",
|
|
216
|
+
* "uniVer": "√",
|
|
217
|
+
* "unixVer": "3.9.0"
|
|
218
|
+
* }
|
|
219
|
+
* }
|
|
220
|
+
* }
|
|
221
|
+
*/
|
|
222
|
+
onPause(callback: (result: any) => void): void;
|
|
223
|
+
/**
|
|
224
|
+
* 背景音频停止事件
|
|
225
|
+
* @uniPlatform {
|
|
226
|
+
* "app": {
|
|
227
|
+
* "android": {
|
|
228
|
+
* "osVer": "4.4",
|
|
229
|
+
* "uniVer": "√",
|
|
230
|
+
* "unixVer": "3.9.0"
|
|
231
|
+
* }
|
|
232
|
+
* }
|
|
233
|
+
* }
|
|
234
|
+
*/
|
|
235
|
+
onStop(callback: (result: any) => void): void;
|
|
236
|
+
/**
|
|
237
|
+
* 背景音频自然播放结束事件
|
|
238
|
+
* @uniPlatform {
|
|
239
|
+
* "app": {
|
|
240
|
+
* "android": {
|
|
241
|
+
* "osVer": "4.4",
|
|
242
|
+
* "uniVer": "√",
|
|
243
|
+
* "unixVer": "3.9.0"
|
|
244
|
+
* }
|
|
245
|
+
* }
|
|
246
|
+
* }
|
|
247
|
+
*/
|
|
248
|
+
onEnded(callback: (result: any) => void): void;
|
|
249
|
+
/**
|
|
250
|
+
* 背景音频播放进度更新事件
|
|
251
|
+
* @uniPlatform {
|
|
252
|
+
* "app": {
|
|
253
|
+
* "android": {
|
|
254
|
+
* "osVer": "4.4",
|
|
255
|
+
* "uniVer": "√",
|
|
256
|
+
* "unixVer": "3.9.0"
|
|
257
|
+
* }
|
|
258
|
+
* }
|
|
259
|
+
* }
|
|
260
|
+
*/
|
|
261
|
+
onTimeUpdate(callback: (result: any) => void): void;
|
|
262
|
+
/**
|
|
263
|
+
* 用户在系统音乐播放面板点击上一曲事件(iOS only)
|
|
264
|
+
*/
|
|
265
|
+
onPrev(callback: (result: any) => void): void;
|
|
266
|
+
/**
|
|
267
|
+
* 用户在系统音乐播放面板点击下一曲事件(iOS only)
|
|
268
|
+
*/
|
|
269
|
+
onNext(callback: (result: any) => void): void;
|
|
270
|
+
/**
|
|
271
|
+
* 背景音频播放错误事件
|
|
272
|
+
* @uniPlatform {
|
|
273
|
+
* "app": {
|
|
274
|
+
* "android": {
|
|
275
|
+
* "osVer": "4.4",
|
|
276
|
+
* "uniVer": "√",
|
|
277
|
+
* "unixVer": "3.9.0"
|
|
278
|
+
* }
|
|
279
|
+
* }
|
|
280
|
+
* }
|
|
281
|
+
*/
|
|
282
|
+
onError(callback: (result: any) => void): void;
|
|
283
|
+
/**
|
|
284
|
+
* 音频加载中事件,当音频因为数据不足,需要停下来加载时会触发
|
|
285
|
+
* @uniPlatform {
|
|
286
|
+
* "app": {
|
|
287
|
+
* "android": {
|
|
288
|
+
* "osVer": "4.4",
|
|
289
|
+
* "uniVer": "√",
|
|
290
|
+
* "unixVer": "3.9.0"
|
|
291
|
+
* }
|
|
292
|
+
* }
|
|
293
|
+
* }
|
|
294
|
+
*/
|
|
295
|
+
onWaiting(callback: (result: any) => void): void;
|
|
296
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GetClipboardDataSuccess as GetClipboardDataSuccessOrigin,
|
|
3
|
+
GetClipboardDataFail as GetClipboardDataFailOrigin,
|
|
4
|
+
GetClipboardDataSuccessCallback as GetClipboardDataSuccessCallbackOrigin,
|
|
5
|
+
GetClipboardDataFailCallback as GetClipboardDataFailCallbackOrigin,
|
|
6
|
+
GetClipboardDataCompleteCallback as GetClipboardDataCompleteCallbackOrigin,
|
|
7
|
+
GetClipboardDataOptions as GetClipboardDataOptionsOrigin,
|
|
8
|
+
GetClipboardData as GetClipboardDataOrigin,
|
|
9
|
+
Uni as UniOrigin
|
|
10
|
+
} from './interface'
|
|
11
|
+
|
|
12
|
+
declare global {
|
|
13
|
+
type GetClipboardDataSuccess = GetClipboardDataSuccessOrigin
|
|
14
|
+
type GetClipboardDataFail = GetClipboardDataFailOrigin
|
|
15
|
+
type GetClipboardDataSuccessCallback = GetClipboardDataSuccessCallbackOrigin
|
|
16
|
+
type GetClipboardDataFailCallback = GetClipboardDataFailCallbackOrigin
|
|
17
|
+
type GetClipboardDataCompleteCallback = GetClipboardDataCompleteCallbackOrigin
|
|
18
|
+
type GetClipboardDataOptions = GetClipboardDataOptionsOrigin
|
|
19
|
+
type GetClipboardData = GetClipboardDataOrigin
|
|
20
|
+
interface Uni extends UniOrigin { }
|
|
21
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
export interface IGetClipboardDataError extends IUniError {
|
|
2
|
+
errCode: number
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* uni.getClipboardData成功回调参数
|
|
6
|
+
*/
|
|
7
|
+
export type GetClipboardDataSuccess = {
|
|
8
|
+
/**
|
|
9
|
+
* 剪贴板的内容
|
|
10
|
+
*/
|
|
11
|
+
data: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* uni.getClipboardData失败回调参数
|
|
15
|
+
*/
|
|
16
|
+
export type GetClipboardDataFail = IGetClipboardDataError;
|
|
17
|
+
/**
|
|
18
|
+
* uni.getClipboardData成功回调函数定义
|
|
19
|
+
*/
|
|
20
|
+
export type GetClipboardDataSuccessCallback = (res: GetClipboardDataSuccess) => void
|
|
21
|
+
/**
|
|
22
|
+
* uni.getClipboardData失败回调函数定义
|
|
23
|
+
*/
|
|
24
|
+
export type GetClipboardDataFailCallback = (res: GetClipboardDataFail) => void
|
|
25
|
+
/**
|
|
26
|
+
* uni.getClipboardData完成回调函数定义
|
|
27
|
+
*/
|
|
28
|
+
export type GetClipboardDataCompleteCallback = (res: any) => void
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* uni.getClipboardData
|
|
32
|
+
*/
|
|
33
|
+
interface GetClipboardDataOptions {
|
|
34
|
+
/**
|
|
35
|
+
* 成功返回的回调函数
|
|
36
|
+
*/
|
|
37
|
+
success?: GetClipboardDataSuccessCallback;
|
|
38
|
+
/**
|
|
39
|
+
* 失败的回调函数
|
|
40
|
+
*/
|
|
41
|
+
fail?:GetClipboardDataFailCallback;
|
|
42
|
+
/**
|
|
43
|
+
* 结束的回调函数(调用成功、失败都会执行)
|
|
44
|
+
*/
|
|
45
|
+
complete?:GetClipboardDataCompleteCallback;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
export type GetClipboardData = (options: GetClipboardDataOptions) => void
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
export interface Uni {
|
|
53
|
+
/**
|
|
54
|
+
* 获得系统剪贴板的内容
|
|
55
|
+
*
|
|
56
|
+
* @tutorial http://uniapp.dcloud.io/api/system/clipboard?id=getclipboarddata
|
|
57
|
+
* @uniPlatform {
|
|
58
|
+
* "app": {
|
|
59
|
+
* "android": {
|
|
60
|
+
* "osVer": "5.0",
|
|
61
|
+
* "uniVer": "√",
|
|
62
|
+
* "unixVer": "x"
|
|
63
|
+
* },
|
|
64
|
+
* "ios": {
|
|
65
|
+
* "osVer": "12.0",
|
|
66
|
+
* "uniVer": "√",
|
|
67
|
+
* "unixVer": "x"
|
|
68
|
+
* }
|
|
69
|
+
* },
|
|
70
|
+
* "mp": {
|
|
71
|
+
* "weixin": {
|
|
72
|
+
* "hostVer": "√",
|
|
73
|
+
* "uniVer": "√",
|
|
74
|
+
* "unixVer": "x"
|
|
75
|
+
* },
|
|
76
|
+
* "alipay": {
|
|
77
|
+
* "hostVer": "√",
|
|
78
|
+
* "uniVer": "√",
|
|
79
|
+
* "unixVer": "x"
|
|
80
|
+
* },
|
|
81
|
+
* "baidu": {
|
|
82
|
+
* "hostVer": "√",
|
|
83
|
+
* "uniVer": "√",
|
|
84
|
+
* "unixVer": "x"
|
|
85
|
+
* },
|
|
86
|
+
* "toutiao": {
|
|
87
|
+
* "hostVer": "√",
|
|
88
|
+
* "uniVer": "√",
|
|
89
|
+
* "unixVer": "x"
|
|
90
|
+
* },
|
|
91
|
+
* "lark": {
|
|
92
|
+
* "hostVer": "√",
|
|
93
|
+
* "uniVer": "√",
|
|
94
|
+
* "unixVer": "√"
|
|
95
|
+
* },
|
|
96
|
+
* "qq": {
|
|
97
|
+
* "hostVer": "√",
|
|
98
|
+
* "uniVer": "√",
|
|
99
|
+
* "unixVer": "x"
|
|
100
|
+
* },
|
|
101
|
+
* "kuaishou": {
|
|
102
|
+
* "hostVer": "√",
|
|
103
|
+
* "uniVer": "√",
|
|
104
|
+
* "unixVer": "x"
|
|
105
|
+
* },
|
|
106
|
+
* "jd": {
|
|
107
|
+
* "hostVer": "√",
|
|
108
|
+
* "uniVer": "√",
|
|
109
|
+
* "unixVer": "x"
|
|
110
|
+
* }
|
|
111
|
+
* },
|
|
112
|
+
* "web": {
|
|
113
|
+
* "uniVer": "√",
|
|
114
|
+
* "unixVer": "4.0"
|
|
115
|
+
* }
|
|
116
|
+
* }
|
|
117
|
+
*/
|
|
118
|
+
getClipboardData(options: GetClipboardDataOptions): void;
|
|
119
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Uni as UniOrigin,
|
|
3
|
+
GetLocale as GetLocaleOrigin,
|
|
4
|
+
SetLocale as SetLocaleOrigin,
|
|
5
|
+
OnLocaleChangeCallback as OnLocaleChangeCallbackOrigin,
|
|
6
|
+
OnLocaleChange as OnLocaleChangeOrigin,
|
|
7
|
+
} from "./interface"
|
|
8
|
+
|
|
9
|
+
declare global {
|
|
10
|
+
type GetLocale = GetLocaleOrigin
|
|
11
|
+
type SetLocale = SetLocaleOrigin
|
|
12
|
+
type OnLocaleChangeCallback = OnLocaleChangeCallbackOrigin
|
|
13
|
+
type OnLocaleChange = OnLocaleChangeOrigin
|
|
14
|
+
interface Uni extends UniOrigin {}
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GetLocale, SetLocale, OnLocaleChangeCallback, OnLocaleChange } from "./interface"
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
export interface Uni {
|
|
2
|
+
/**
|
|
3
|
+
* 获取当前设置的语言
|
|
4
|
+
*
|
|
5
|
+
* @tutorial https://uniapp.dcloud.io/api/ui/locale.html#getlocale
|
|
6
|
+
* @tutorial-uni-app https://uniapp.dcloud.io/api/ui/locale.html#getlocale
|
|
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.24",
|
|
22
|
+
* "unixVer": "x"
|
|
23
|
+
* }
|
|
24
|
+
* },
|
|
25
|
+
* "mp": {
|
|
26
|
+
* "weixin": {
|
|
27
|
+
* "hostVer": "√",
|
|
28
|
+
* "uniVer": "√",
|
|
29
|
+
* "unixVer": "x"
|
|
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": "√"
|
|
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
|
+
getLocale: GetLocale;
|
|
74
|
+
/**
|
|
75
|
+
* 设置当前语言
|
|
76
|
+
*
|
|
77
|
+
* @tutorial https://uniapp.dcloud.io/api/ui/locale.html#setlocale
|
|
78
|
+
* @tutorial-uni-app https://uniapp.dcloud.io/api/ui/locale.html#setlocale
|
|
79
|
+
* @uniPlatform {
|
|
80
|
+
* "app": {
|
|
81
|
+
* "android": {
|
|
82
|
+
* "osVer": "5.0",
|
|
83
|
+
* "uniVer": "√",
|
|
84
|
+
* "unixVer": "x"
|
|
85
|
+
* },
|
|
86
|
+
* "ios": {
|
|
87
|
+
* "osVer": "12.0",
|
|
88
|
+
* "uniVer": "√",
|
|
89
|
+
* "unixVer": "x"
|
|
90
|
+
* },
|
|
91
|
+
* "harmony": {
|
|
92
|
+
* "osVer": "3.0",
|
|
93
|
+
* "uniVer": "4.24",
|
|
94
|
+
* "unixVer": "x"
|
|
95
|
+
* }
|
|
96
|
+
* },
|
|
97
|
+
* "mp": {
|
|
98
|
+
* "weixin": {
|
|
99
|
+
* "hostVer": "√",
|
|
100
|
+
* "uniVer": "√",
|
|
101
|
+
* "unixVer": "x"
|
|
102
|
+
* },
|
|
103
|
+
* "alipay": {
|
|
104
|
+
* "hostVer": "√",
|
|
105
|
+
* "uniVer": "√",
|
|
106
|
+
* "unixVer": "x"
|
|
107
|
+
* },
|
|
108
|
+
* "baidu": {
|
|
109
|
+
* "hostVer": "√",
|
|
110
|
+
* "uniVer": "√",
|
|
111
|
+
* "unixVer": "x"
|
|
112
|
+
* },
|
|
113
|
+
* "toutiao": {
|
|
114
|
+
* "hostVer": "√",
|
|
115
|
+
* "uniVer": "√",
|
|
116
|
+
* "unixVer": "x"
|
|
117
|
+
* },
|
|
118
|
+
* "lark": {
|
|
119
|
+
* "hostVer": "√",
|
|
120
|
+
* "uniVer": "√",
|
|
121
|
+
* "unixVer": "√"
|
|
122
|
+
* },
|
|
123
|
+
* "qq": {
|
|
124
|
+
* "hostVer": "√",
|
|
125
|
+
* "uniVer": "√",
|
|
126
|
+
* "unixVer": "x"
|
|
127
|
+
* },
|
|
128
|
+
* "kuaishou": {
|
|
129
|
+
* "hostVer": "√",
|
|
130
|
+
* "uniVer": "√",
|
|
131
|
+
* "unixVer": "x"
|
|
132
|
+
* },
|
|
133
|
+
* "jd": {
|
|
134
|
+
* "hostVer": "√",
|
|
135
|
+
* "uniVer": "√",
|
|
136
|
+
* "unixVer": "x"
|
|
137
|
+
* }
|
|
138
|
+
* },
|
|
139
|
+
* "web": {
|
|
140
|
+
* "uniVer": "√",
|
|
141
|
+
* "unixVer": "4.0"
|
|
142
|
+
* }
|
|
143
|
+
* }
|
|
144
|
+
*/
|
|
145
|
+
setLocale: SetLocale;
|
|
146
|
+
/**
|
|
147
|
+
* 设置当前语言
|
|
148
|
+
*
|
|
149
|
+
* @tutorial https://uniapp.dcloud.io/api/ui/locale.html#onlocalechange
|
|
150
|
+
* @tutorial-uni-app https://uniapp.dcloud.io/api/ui/locale.html#onlocalechange
|
|
151
|
+
* @uniPlatform {
|
|
152
|
+
* "app": {
|
|
153
|
+
* "android": {
|
|
154
|
+
* "osVer": "5.0",
|
|
155
|
+
* "uniVer": "√",
|
|
156
|
+
* "unixVer": "x"
|
|
157
|
+
* },
|
|
158
|
+
* "ios": {
|
|
159
|
+
* "osVer": "12.0",
|
|
160
|
+
* "uniVer": "√",
|
|
161
|
+
* "unixVer": "x"
|
|
162
|
+
* },
|
|
163
|
+
* "harmony": {
|
|
164
|
+
* "osVer": "3.0",
|
|
165
|
+
* "uniVer": "4.24",
|
|
166
|
+
* "unixVer": "x"
|
|
167
|
+
* }
|
|
168
|
+
* },
|
|
169
|
+
* "mp": {
|
|
170
|
+
* "weixin": {
|
|
171
|
+
* "hostVer": "√",
|
|
172
|
+
* "uniVer": "√",
|
|
173
|
+
* "unixVer": "x"
|
|
174
|
+
* },
|
|
175
|
+
* "alipay": {
|
|
176
|
+
* "hostVer": "√",
|
|
177
|
+
* "uniVer": "√",
|
|
178
|
+
* "unixVer": "x"
|
|
179
|
+
* },
|
|
180
|
+
* "baidu": {
|
|
181
|
+
* "hostVer": "√",
|
|
182
|
+
* "uniVer": "√",
|
|
183
|
+
* "unixVer": "x"
|
|
184
|
+
* },
|
|
185
|
+
* "toutiao": {
|
|
186
|
+
* "hostVer": "√",
|
|
187
|
+
* "uniVer": "√",
|
|
188
|
+
* "unixVer": "x"
|
|
189
|
+
* },
|
|
190
|
+
* "lark": {
|
|
191
|
+
* "hostVer": "√",
|
|
192
|
+
* "uniVer": "√",
|
|
193
|
+
* "unixVer": "√"
|
|
194
|
+
* },
|
|
195
|
+
* "qq": {
|
|
196
|
+
* "hostVer": "√",
|
|
197
|
+
* "uniVer": "√",
|
|
198
|
+
* "unixVer": "x"
|
|
199
|
+
* },
|
|
200
|
+
* "kuaishou": {
|
|
201
|
+
* "hostVer": "√",
|
|
202
|
+
* "uniVer": "√",
|
|
203
|
+
* "unixVer": "x"
|
|
204
|
+
* },
|
|
205
|
+
* "jd": {
|
|
206
|
+
* "hostVer": "√",
|
|
207
|
+
* "uniVer": "√",
|
|
208
|
+
* "unixVer": "x"
|
|
209
|
+
* }
|
|
210
|
+
* },
|
|
211
|
+
* "web": {
|
|
212
|
+
* "uniVer": "√",
|
|
213
|
+
* "unixVer": "4.0"
|
|
214
|
+
* }
|
|
215
|
+
* }
|
|
216
|
+
*/
|
|
217
|
+
onLocaleChange: OnLocaleChange;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export type GetLocale = () => string;
|
|
221
|
+
export type SetLocale = (locale: string) => void;
|
|
222
|
+
export type OnLocaleChangeCallbackResult = {
|
|
223
|
+
/**
|
|
224
|
+
* 当前语言
|
|
225
|
+
*/
|
|
226
|
+
locale?: string | null
|
|
227
|
+
};
|
|
228
|
+
export type OnLocaleChangeCallback = (result: OnLocaleChangeCallbackResult) => void;
|
|
229
|
+
export type OnLocaleChange = (callback: OnLocaleChangeCallback) => void;
|