@dcloudio/uni-app-x 0.7.1 → 0.7.2

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.
@@ -6,20 +6,21 @@ export interface Uni {
6
6
  * @param {GetSystemInfoOptions} options
7
7
  * @return {void}
8
8
  * @tutorial http://uniapp.dcloud.io/api/system/info?id=getsysteminfo
9
- * @uniPlatform {
10
- * "app": {
11
- * "android": {
12
- * "osVer": "4.4",
13
- * "uniVer": "",
14
- * "unixVer": "3.9+"
15
- * },
16
- * "ios": {
17
- * "osVer": "9.0",
18
- * "uniVer": "",
19
- * "unixVer": "x"
20
- * }
21
- * }
22
- * }
9
+ * @uniPlatform
10
+ * {
11
+ * "app": {
12
+ * "android": {
13
+ * "osVer": "4.4",
14
+ * "uniVer": "",
15
+ * "unixVer": "3.9+"
16
+ * },
17
+ * "ios": {
18
+ * "osVer": "9.0",
19
+ * "uniVer": "",
20
+ * "unixVer": "x"
21
+ * }
22
+ * }
23
+ * }
23
24
  * @example
24
25
  ```typescript
25
26
  uni.getSystemInfo({
@@ -41,20 +42,21 @@ export interface Uni {
41
42
  * @param {void}
42
43
  * @return {GetSystemInfoResult}
43
44
  * @tutorial http://uniapp.dcloud.io/api/system/info?id=getsysteminfosync
44
- * @uniPlatform {
45
- * "app": {
46
- * "android": {
47
- * "osVer": "4.4",
48
- * "uniVer": "",
49
- * "unixVer": "3.9+"
50
- * },
51
- * "ios": {
52
- * "osVer": "9.0",
53
- * "uniVer": "",
54
- * "unixVer": "x"
55
- * }
56
- * }
57
- * }
45
+ * @uniPlatform
46
+ * {
47
+ * "app": {
48
+ * "android": {
49
+ * "osVer": "4.4",
50
+ * "uniVer": "",
51
+ * "unixVer": "3.9+"
52
+ * },
53
+ * "ios": {
54
+ * "osVer": "9.0",
55
+ * "uniVer": "",
56
+ * "unixVer": "x"
57
+ * }
58
+ * }
59
+ * }
58
60
  * @example
59
61
  ```typescript
60
62
  uni.getSystemInfoSync()
@@ -69,20 +71,21 @@ export interface Uni {
69
71
  * @param {void}
70
72
  * @return {GetWindowInfoResult} result
71
73
  * @tutorial http://uniapp.dcloud.io/api/system/getWindowInfo.html
72
- * @uniPlatform {
73
- * "app": {
74
- * "android": {
75
- * "osVer": "4.4",
76
- * "uniVer": "",
77
- * "unixVer": "3.9+"
78
- * },
79
- * "ios": {
80
- * "osVer": "9.0",
81
- * "uniVer": "",
82
- * "unixVer": "x"
83
- * }
84
- * }
85
- * }
74
+ * @uniPlatform
75
+ * {
76
+ * "app": {
77
+ * "android": {
78
+ * "osVer": "4.4",
79
+ * "uniVer": "",
80
+ * "unixVer": "3.9+"
81
+ * },
82
+ * "ios": {
83
+ * "osVer": "9.0",
84
+ * "uniVer": "",
85
+ * "unixVer": "x"
86
+ * }
87
+ * }
88
+ * }
86
89
  * @example
87
90
  ```typescript
88
91
  uni.getWindowInfo()
@@ -166,22 +169,23 @@ export type GetSystemInfoResult = {
166
169
  /**
167
170
  * 应用资源(wgt)的版本名称。
168
171
  *
169
- * @uniPlatform {
170
- * "app": {
171
- * "android": {
172
- * "osVer": "4.4",
173
- * "uniVer": "",
174
- * "unixVer": "x"
175
- * },
176
- * "ios": {
177
- * "osVer": "9.0",
178
- * "uniVer": "",
179
- * "unixVer": "x"
180
- * }
181
- * }
172
+ * @uniPlatform
173
+ * {
174
+ * "app": {
175
+ * "android": {
176
+ * "osVer": "4.4",
177
+ * "uniVer": "",
178
+ * "unixVer": "x"
179
+ * },
180
+ * "ios": {
181
+ * "osVer": "9.0",
182
+ * "uniVer": "",
183
+ * "unixVer": "x"
184
+ * }
185
+ * }
182
186
  * }
183
187
  */
184
- appWgtVersion: string | null,
188
+ appWgtVersion?: string | null,
185
189
  /**
186
190
  * 手机品牌。
187
191
  */
@@ -207,20 +211,18 @@ export type GetSystemInfoResult = {
207
211
  */
208
212
  deviceModel: string,
209
213
  /**
210
- * 设备类型。`phone`、`pad`、`pc`
214
+ * 设备类型。
211
215
  */
212
- deviceType: string,
216
+ deviceType: 'phone' | 'pad' | 'tv' | 'watch' | 'pc' | 'undefined' | 'car' | 'vr' | 'appliance',
213
217
  /**
214
218
  * 设备像素比
215
219
  */
216
220
  devicePixelRatio: number,
217
221
  /**
218
- * 设备方向。如:`竖屏 portrait`、`横屏 landscape`
219
- * - portrait: 竖屏
220
- * - landscape: 横屏
222
+ * 设备方向。
221
223
  * @type 'portrait' | 'landscape'
222
224
  */
223
- deviceOrientation: string,
225
+ deviceOrientation: 'portrait' | 'landscape',
224
226
  /**
225
227
  * 程序设置的语言
226
228
  */
@@ -230,9 +232,9 @@ export type GetSystemInfoResult = {
230
232
  */
231
233
  model: string,
232
234
  /**
233
- * ios、android、windows、mac、linux
235
+ * 系统名称
234
236
  */
235
- osName: string,
237
+ osName: 'ios' | 'android' | 'mac' | 'windows' | 'linux',
236
238
  /**
237
239
  * 操作系统版本。如 ios 版本,andriod 版本
238
240
  */
@@ -242,24 +244,25 @@ export type GetSystemInfoResult = {
242
244
  */
243
245
  osLanguage: string,
244
246
  /**
245
- * 操作系统主题 light、dark。
247
+ * 操作系统主题
246
248
  *
247
- * @uniPlatform {
248
- * "app": {
249
- * "android": {
250
- * "osVer": "4.4",
251
- * "uniVer": "",
252
- * "unixVer": "x"
253
- * },
254
- * "ios": {
255
- * "osVer": "9.0",
256
- * "uniVer": "",
257
- * "unixVer": "x"
258
- * }
259
- * }
249
+ * @uniPlatform
250
+ * {
251
+ * "app": {
252
+ * "android": {
253
+ * "osVer": "4.4",
254
+ * "uniVer": "",
255
+ * "unixVer": "√"
256
+ * },
257
+ * "ios": {
258
+ * "osVer": "9.0",
259
+ * "uniVer": "",
260
+ * "unixVer": "x"
261
+ * }
262
+ * }
260
263
  * }
261
264
  */
262
- osTheme: string | null,
265
+ osTheme?: 'light' | 'dark' | null,
263
266
  /**
264
267
  * 设备像素比
265
268
  */
@@ -267,7 +270,7 @@ export type GetSystemInfoResult = {
267
270
  /**
268
271
  * 客户端平台
269
272
  */
270
- platform: string,
273
+ platform: 'ios' | 'android' | 'mac' | 'windows' | 'linux',
271
274
  /**
272
275
  * 屏幕宽度
273
276
  */
@@ -295,23 +298,33 @@ export type GetSystemInfoResult = {
295
298
  /**
296
299
  * 用户标识。小程序端为空
297
300
  */
298
- ua: string,
301
+ ua: string,
302
+ /**
303
+ * uni 编译器版本
304
+ * @deprecated 已废弃,仅为了向下兼容保留
305
+ */
306
+ uniCompileVersion: string,
299
307
  /**
300
308
  * uni 编译器版本
301
309
  */
302
- uniCompileVersion: string,
310
+ uniCompilerVersion: string,
303
311
  /**
304
- * uni-app 运行平台。如:`app`、`mp-weixin`、`web`
312
+ * uni-app 运行平台。
305
313
  */
306
- uniPlatform: string,
314
+ uniPlatform: 'app' | 'web' | 'mp-weixin' | 'mp-alipay' | 'mp-baidu' | 'mp-toutiao' | 'mp-lark' | 'mp-qq' | 'mp-kuaishou' | 'mp-jd' | 'mp-360' | 'quickapp-webview' | 'quickapp-webview-union' | 'quickapp-webview-huawei',
307
315
  /**
308
316
  * uni 运行时版本
309
317
  */
310
- uniRuntimeVersion: string,
318
+ uniRuntimeVersion: string,
319
+ /**
320
+ * uni 编译器版本号
321
+ * @deprecated 已废弃,仅为了向下兼容保留
322
+ */
323
+ uniCompileVersionCode: number,
311
324
  /**
312
325
  * uni 编译器版本号
313
326
  */
314
- uniCompileVersionCode: number,
327
+ uniCompilerVersionCode: number,
315
328
  /**
316
329
  * uni 运行时版本号
317
330
  */
@@ -345,44 +358,26 @@ export type GetSystemInfoResult = {
345
358
  * 可使用窗口的底部位置
346
359
  */
347
360
  windowBottom: number,
348
- /**
349
- * oaid
350
- *
351
- * @uniPlatform {
352
- * "app": {
353
- * "android": {
354
- * "osVer": "4.4",
355
- * "uniVer": "√",
356
- * "unixVer": "√"
357
- * },
358
- * "ios": {
359
- * "osVer": "x",
360
- * "uniVer": "x",
361
- * "unixVer": "x"
362
- * }
363
- * }
364
- * }
365
- */
366
- oaid: string | null
367
361
  /**
368
362
  * Android 系统API库的版本。
369
363
  *
370
- * @uniPlatform {
371
- * "app": {
372
- * "android": {
373
- * "osVer": "4.4",
374
- * "uniVer": "",
375
- * "unixVer": "√"
376
- * },
377
- * "ios": {
378
- * "osVer": "x",
379
- * "uniVer": "x",
380
- * "unixVer": "x"
381
- * }
382
- * }
364
+ * @uniPlatform
365
+ * {
366
+ * "app": {
367
+ * "android": {
368
+ * "osVer": "4.4",
369
+ * "uniVer": "√",
370
+ * "unixVer": "√"
371
+ * },
372
+ * "ios": {
373
+ * "osVer": "x",
374
+ * "uniVer": "x",
375
+ * "unixVer": "x"
376
+ * }
377
+ * }
383
378
  * }
384
379
  */
385
- osAndroidAPILevel: number | null
380
+ osAndroidAPILevel?: number | null
386
381
  };
387
382
  export type GetSystemInfoSuccessCallback = (result: GetSystemInfoResult) => void;
388
383
  type GetSystemInfoFail = UniError;
@@ -24,7 +24,7 @@ export type GetSystemSettingResult = {
24
24
  /**
25
25
  * 设备方向
26
26
  */
27
- deviceOrientation : string
27
+ deviceOrientation : 'portrait' | 'landscape',
28
28
  }
29
29
 
30
30
 
@@ -38,20 +38,21 @@ export interface Uni {
38
38
  * 获取系统设置
39
39
  * @return {object}
40
40
  * @tutorial https://uniapp.dcloud.net.cn/api/system/getsystemsetting.html
41
- * @uniPlatform {
42
- * "app": {
43
- * "android": {
44
- * "osVer": "4.4",
45
- * "uniVer": "",
46
- * "unixVer": "3.9+"
47
- * },
48
- * "ios": {
49
- * "osVer": "9.0",
50
- * "uniVer": "",
51
- * "unixVer": "3.9+"
52
- * }
53
- * }
54
- * }
41
+ * @uniPlatform
42
+ * {
43
+ * "app": {
44
+ * "android": {
45
+ * "osVer": "4.4",
46
+ * "uniVer": "",
47
+ * "unixVer": "3.9+"
48
+ * },
49
+ * "ios": {
50
+ * "osVer": "9.0",
51
+ * "uniVer": "",
52
+ * "unixVer": "x"
53
+ * }
54
+ * }
55
+ * }
55
56
  * @example
56
57
  ```typescript
57
58
  uni.getSystemSetting()