@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.
Files changed (116) hide show
  1. package/README.md +39 -0
  2. package/package.json +5 -3
  3. package/types/app.d.ts +36 -82
  4. package/types/native/CSSStyleDeclaration.d.ts +2 -2
  5. package/types/native/CustomEvent.d.ts +0 -2
  6. package/types/native/DOMRect.d.ts +4 -4
  7. package/types/native/DomNode.d.ts +48 -0
  8. package/types/native/DrawableContext.d.ts +42 -16
  9. package/types/native/Element.d.ts +234 -0
  10. package/types/native/Event.d.ts +14 -3
  11. package/types/native/IDocument.d.ts +6 -6
  12. package/types/native/IPage.d.ts +27 -11
  13. package/types/native/IPageManager.d.ts +2 -2
  14. package/types/native/ITabsNode.d.ts +4 -4
  15. package/types/native/IUniError.d.ts +20 -0
  16. package/types/native/IWebViewNode.d.ts +2 -2
  17. package/types/native/InputBlurEvent.d.ts +13 -0
  18. package/types/native/InputConfirmEvent.d.ts +13 -0
  19. package/types/native/InputEvent.d.ts +21 -0
  20. package/types/native/InputFocusEvent.d.ts +17 -0
  21. package/types/native/InputKeyboardHeightChangeEvent.d.ts +17 -0
  22. package/types/native/MouseEvent.d.ts +13 -1
  23. package/types/native/NestedPreScrollEvent.d.ts +23 -0
  24. package/types/native/ScrollToLowerEvent.d.ts +4 -1
  25. package/types/native/ScrollToUpperEvent.d.ts +5 -2
  26. package/types/native/SourceError.d.ts +0 -2
  27. package/types/native/StartNestedScrollEvent.d.ts +12 -0
  28. package/types/native/SwiperAnimationFinishEvent.d.ts +11 -0
  29. package/types/native/SwiperChangeEvent.d.ts +11 -0
  30. package/types/native/SwiperTransitionEvent.d.ts +11 -0
  31. package/types/native/TextareaBlurEvent.d.ts +17 -0
  32. package/types/native/TextareaFocusEvent.d.ts +17 -0
  33. package/types/native/TextareaLineChangeEvent.d.ts +21 -0
  34. package/types/native/TouchEvent.d.ts +5 -1
  35. package/types/native/UniError.d.ts +7 -3
  36. package/types/native/index.d.ts +18 -3
  37. package/types/page.d.ts +57 -212
  38. package/types/uni/core/index.d.ts +9 -7
  39. package/types/uni/core/lib/base/event/interface.d.ts +4 -4
  40. package/types/uni/core/lib/lifecycle/interface.d.ts +1 -1
  41. package/types/uni/core/lib/performance/interface.d.ts +0 -20
  42. package/types/uni/core/lib/route/index.d.ts +0 -10
  43. package/types/uni/core/lib/route/interface.d.ts +1805 -10
  44. package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +242 -2
  45. package/types/uni/core/lib/ui/get-element-by-id/index.d.ts +9 -0
  46. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +72 -0
  47. package/types/uni/core/lib/ui/load-font-face/interface.d.ts +486 -3
  48. package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +0 -2
  49. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +93 -9
  50. package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +0 -2
  51. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +2 -5
  52. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +373 -4
  53. package/types/uni/core/lib/ui/tab-bar/index.d.ts +2 -18
  54. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +32 -35
  55. package/types/uni/index.d.ts +2 -1
  56. package/types/uni/{ext → uts-plugin-api}/index.d.ts +18 -17
  57. package/types/uni/{ext → uts-plugin-api}/lib/uni-audio/utssdk/interface.d.ts +2 -2
  58. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +11 -0
  59. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +98 -0
  60. package/types/uni/{ext → uts-plugin-api}/lib/uni-exit/utssdk/interface.d.ts +1 -1
  61. package/types/uni/{ext → uts-plugin-api}/lib/uni-file-manager/utssdk/interface.d.ts +4 -32
  62. package/types/uni/{ext → uts-plugin-api}/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +1 -1
  63. package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +108 -10
  64. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +233 -0
  65. package/types/uni/{ext → uts-plugin-api}/lib/uni-getDeviceInfo/utssdk/interface.d.ts +58 -46
  66. package/types/uni/{ext → uts-plugin-api}/lib/uni-getLocation-system/utssdk/index.d.ts +0 -2
  67. package/types/uni/{ext → uts-plugin-api}/lib/uni-getLocation-system/utssdk/interface.d.ts +14 -10
  68. package/types/uni/{ext → uts-plugin-api}/lib/uni-getNetworkType/utssdk/interface.d.ts +8 -5
  69. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +213 -0
  70. package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemInfo/utssdk/interface.d.ts +108 -163
  71. package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemSetting/utssdk/interface.d.ts +3 -3
  72. package/types/uni/{ext → uts-plugin-api}/lib/uni-media/utssdk/index.d.ts +0 -20
  73. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +794 -0
  74. package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/app-ios/interface.d.ts +60 -19
  75. package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/index.d.ts +4 -0
  76. package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/interface.d.ts +138 -49
  77. package/types/uni/{ext → uts-plugin-api}/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +8 -5
  78. package/types/uni/{ext → uts-plugin-api}/lib/uni-prompt/utssdk/interface.d.ts +6 -6
  79. package/types/uni/{ext → uts-plugin-api}/lib/uni-storage/utssdk/index.d.ts +0 -10
  80. package/types/uni/{ext → uts-plugin-api}/lib/uni-storage/utssdk/interface.d.ts +33 -117
  81. package/types/uni/{ext → uts-plugin-api}/lib/uni-websocket/utssdk/index.d.ts +2 -0
  82. package/types/uni/{ext → uts-plugin-api}/lib/uni-websocket/utssdk/interface.d.ts +60 -35
  83. package/types/uni/uts-plugin-component/index.d.ts +1 -0
  84. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +15 -0
  85. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +171 -0
  86. package/types/uni-cloud/index.d.ts +59 -333
  87. package/types/uni-cloud/interface.d.ts +786 -0
  88. package/types/vue/CheckboxGroupChangeEvent.d.ts +1 -1
  89. package/types/vue/PickerViewChangeEvent.d.ts +1 -1
  90. package/types/vue/ProgressActiveendEvent.d.ts +1 -1
  91. package/types/vue/RadioGroupChangeEvent.d.ts +1 -1
  92. package/types/vue/SliderChangeEvent.d.ts +10 -1
  93. package/types/vue/SwitchChangeEvent.d.ts +1 -1
  94. package/uts-plugin.d.ts +10 -0
  95. package/.env +0 -3
  96. package/tsconfig.json +0 -5
  97. package/types/native/INode.d.ts +0 -181
  98. package/types/native/UTSError.d.ts +0 -15
  99. package/types/native/UTSPromise.d.ts +0 -74
  100. package/types/uni/ext/lib/uni-file-manager/utssdk/index.d.ts +0 -35
  101. package/types/uni/ext/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +0 -120
  102. package/types/uni/ext/lib/uni-getRecorderManager/utssdk/interface.d.ts +0 -213
  103. package/types/uni/ext/lib/uni-media/utssdk/interface.d.ts +0 -877
  104. /package/types/uni/{ext → uts-plugin-api}/lib/uni-audio/utssdk/index.d.ts +0 -0
  105. /package/types/uni/{ext → uts-plugin-api}/lib/uni-exit/utssdk/index.d.ts +0 -0
  106. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +0 -0
  107. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +0 -0
  108. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppBaseInfo/utssdk/index.d.ts +0 -0
  109. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getDeviceInfo/utssdk/index.d.ts +0 -0
  110. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getNetworkType/utssdk/index.d.ts +0 -0
  111. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getRecorderManager/utssdk/index.d.ts +0 -0
  112. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemInfo/utssdk/index.d.ts +0 -0
  113. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemSetting/utssdk/index.d.ts +0 -0
  114. /package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/app-ios/index.d.ts +0 -0
  115. /package/types/uni/{ext → uts-plugin-api}/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +0 -0
  116. /package/types/uni/{ext → uts-plugin-api}/lib/uni-prompt/utssdk/index.d.ts +0 -0
@@ -0,0 +1,213 @@
1
+ export type RecorderManagerStartOptions = {
2
+ /**
3
+ * 指定录音的时长,单位 ms ,如果传入了合法的 duration ,在到达指定的 duration 后会自动停止录音,最大值 600000(10 分钟),默认值 60000(1 分钟)
4
+ */
5
+ duration : (number) | null;
6
+ /**
7
+ * 采样率,有效值 8000/16000/44100
8
+ */
9
+ sampleRate : (number) | null;
10
+ /**
11
+ * 录音通道数,有效值 1/2
12
+ */
13
+ numberOfChannels : (number) | null;
14
+ /**
15
+ * 编码码率,有效值见下表格
16
+ */
17
+ encodeBitRate : (number) | null;
18
+ /**
19
+ * 音频格式,有效值 aac/mp3
20
+ */
21
+ format : (string) | null;
22
+ /**
23
+ * 指定帧大小,单位 KB。传入 frameSize 后,每录制指定帧大小的内容后,会回调录制的文件内容,不指定则不会回调。暂仅支持 mp3 格式。
24
+ */
25
+ frameSize : (number) | null;
26
+ }
27
+
28
+ export type RecordManagerCallback = (result : any) => void
29
+
30
+
31
+ export interface RecorderManager {
32
+ /**
33
+ * 开始录音
34
+ * @description 开始录音
35
+ * @uniPlatform {
36
+ * "app": {
37
+ * "android": {
38
+ * "osVer": "4.4",
39
+ * "uniVer": "√",
40
+ * "unixVer": "3.9.0"
41
+ * }
42
+ * }
43
+ * }
44
+ * @uniVueVersion 2,3
45
+ */
46
+ start(options : RecorderManagerStartOptions) : void;
47
+ /**
48
+ * 暂停录音
49
+ * @description 暂停录音
50
+ * @uniPlatform {
51
+ * "app": {
52
+ * "android": {
53
+ * "osVer": "4.4",
54
+ * "uniVer": "√",
55
+ * "unixVer": "3.9.0"
56
+ * }
57
+ * }
58
+ * }
59
+ * @uniVueVersion 2,3
60
+ */
61
+ pause() : void;
62
+ /**
63
+ * 暂停录音
64
+ * @description 暂停录音
65
+ * @uniPlatform {
66
+ * "app": {
67
+ * "android": {
68
+ * "osVer": "4.4",
69
+ * "uniVer": "√",
70
+ * "unixVer": "3.9.0"
71
+ * }
72
+ * }
73
+ * }
74
+ * @uniVueVersion 2,3
75
+ */
76
+ resume() : void;
77
+ /**
78
+ * 停止录音
79
+ * @description 停止录音
80
+ * @uniPlatform {
81
+ * "app": {
82
+ * "android": {
83
+ * "osVer": "4.4",
84
+ * "uniVer": "√",
85
+ * "unixVer": "3.9.0"
86
+ * }
87
+ * }
88
+ * }
89
+ * @uniVueVersion 2,3
90
+ */
91
+ stop() : void;
92
+ /**
93
+ * 录音开始事件
94
+ * @description 录音开始事件
95
+ * @uniPlatform {
96
+ * "app": {
97
+ * "android": {
98
+ * "osVer": "4.4",
99
+ * "uniVer": "√",
100
+ * "unixVer": "3.9.0"
101
+ * }
102
+ * }
103
+ * }
104
+ * @uniVueVersion 2,3
105
+ */
106
+ onStart(options : RecordManagerCallback) : void;
107
+ /**
108
+ * 录音暂停事件
109
+ * @description 录音暂停事件
110
+ * @uniPlatform {
111
+ * "app": {
112
+ * "android": {
113
+ * "osVer": "4.4",
114
+ * "uniVer": "√",
115
+ * "unixVer": "3.9.0"
116
+ * }
117
+ * }
118
+ * }
119
+ * @uniVueVersion 2,3
120
+ */
121
+ onPause(options : RecordManagerCallback) : void;
122
+ /**
123
+ * 录音恢复事件
124
+ * @description 录音恢复事件
125
+ * @uniPlatform {
126
+ * "app": {
127
+ * "android": {
128
+ * "osVer": "4.4",
129
+ * "uniVer": "√",
130
+ * "unixVer": "3.9.0"
131
+ * }
132
+ * }
133
+ * }
134
+ * @uniVueVersion 2,3
135
+ */
136
+ onResume(options : RecordManagerCallback) : void;
137
+ /**
138
+ * 录音停止事件,会回调文件地址
139
+ * @description 录音停止事件,会回调文件地址
140
+ * @uniPlatform {
141
+ * "app": {
142
+ * "android": {
143
+ * "osVer": "4.4",
144
+ * "uniVer": "√",
145
+ * "unixVer": "3.9.0"
146
+ * }
147
+ * }
148
+ * }
149
+ * @uniVueVersion 2,3
150
+ */
151
+ onStop(options : RecordManagerCallback) : void;
152
+ /**
153
+ * 已录制完指定帧大小的文件,会回调录音分片结果数据。如果设置了 frameSize ,则会回调此事件
154
+ * @description 已录制完指定帧大小的文件,会回调录音分片结果数据。如果设置了 frameSize ,则会回调此事件
155
+ * @uniPlatform {
156
+ * "app": {
157
+ * "android": {
158
+ * "osVer": "4.4",
159
+ * "uniVer": "√",
160
+ * "unixVer": "3.9.0"
161
+ * }
162
+ * }
163
+ * }
164
+ * @uniVueVersion 2,3
165
+ */
166
+ onFrameRecorded(options : RecordManagerCallback) : void;
167
+ /**
168
+ * 录音错误事件, 会回调错误信息
169
+ * @description 录音错误事件, 会回调错误信息
170
+ * @uniPlatform {
171
+ * "app": {
172
+ * "android": {
173
+ * "osVer": "4.4",
174
+ * "uniVer": "√",
175
+ * "unixVer": "3.9.0"
176
+ * }
177
+ * }
178
+ * }
179
+ * @uniVueVersion 2,3
180
+ */
181
+ onError(options : RecordManagerCallback) : void;
182
+ }
183
+
184
+ export type GetRecorderManager = () => RecorderManager
185
+
186
+ export interface Uni {
187
+ /**
188
+ * 录音管理
189
+ * @description 录音管理
190
+ * @uniPlatform {
191
+ * "app": {
192
+ * "android": {
193
+ * "osVer": "4.4",
194
+ * "uniVer": "√",
195
+ * "unixVer": "3.9.0"
196
+ * }
197
+ * }
198
+ * }
199
+ * @uniVueVersion 2,3
200
+ * @tutorial http://uniapp.dcloud.io/api/media/record-manager?id=getrecordermanager
201
+ * @example
202
+ * ```typescript
203
+ * var manager = uni.getRecorderManager()
204
+ * manager.start({
205
+ * format:"mp3"
206
+ * })
207
+ * manager.onStop((e)=>{
208
+ * console.log("录音结束")
209
+ * })
210
+ * ```
211
+ */
212
+ getRecorderManager() : RecorderManager;
213
+ }
@@ -16,7 +16,7 @@ export interface Uni {
16
16
  * "ios": {
17
17
  * "osVer": "9.0",
18
18
  * "uniVer": "√",
19
- * "unixVer": "3.9.0"
19
+ * "unixVer": "x"
20
20
  * }
21
21
  * }
22
22
  * }
@@ -32,7 +32,7 @@ export interface Uni {
32
32
  })
33
33
  ```
34
34
  */
35
- getSystemInfo: GetSystemInfo;
35
+ getSystemInfo(options: GetSystemInfoOptions): void;
36
36
 
37
37
  /**
38
38
  * getSystemInfoSync()
@@ -51,7 +51,7 @@ export interface Uni {
51
51
  * "ios": {
52
52
  * "osVer": "9.0",
53
53
  * "uniVer": "√",
54
- * "unixVer": "3.9.0"
54
+ * "unixVer": "x"
55
55
  * }
56
56
  * }
57
57
  * }
@@ -60,7 +60,7 @@ export interface Uni {
60
60
  uni.getSystemInfoSync()
61
61
  ```
62
62
  */
63
- getSystemInfoSync: GetSystemInfoSync;
63
+ getSystemInfoSync(): GetSystemInfoResult;
64
64
 
65
65
  /**
66
66
  * getWindowInfo()
@@ -79,7 +79,7 @@ export interface Uni {
79
79
  * "ios": {
80
80
  * "osVer": "9.0",
81
81
  * "uniVer": "√",
82
- * "unixVer": "3.9.0"
82
+ * "unixVer": "x"
83
83
  * }
84
84
  * }
85
85
  * }
@@ -88,7 +88,7 @@ export interface Uni {
88
88
  uni.getWindowInfo()
89
89
  ```
90
90
  */
91
- getWindowInfo: GetWindowInfo;
91
+ getWindowInfo(): GetWindowInfoResult;
92
92
  }
93
93
 
94
94
  export type GetSystemInfo = (options: GetSystemInfoOptions) => void;
@@ -143,44 +143,55 @@ export type GetSystemInfoResult = {
143
143
  * 客户端基础库版本
144
144
  */
145
145
  SDKVersion: string,
146
- /**
147
- * 当前运行的客户端
148
- */
149
- app: string | null,
150
146
  /**
151
147
  * `manifest.json` 中应用appid。
152
148
  */
153
149
  appId: string,
154
150
  /**
155
- * 应用设置的语言。仅 App、H5 支持
151
+ * 应用设置的语言。
156
152
  */
157
- appLanguage: string | null,
153
+ appLanguage: string,
158
154
  /**
159
- * `manifest.json` 中应用名称。和`字节跳动小程序、飞书小程序`字段冲突,原字端与`hostName`一致
155
+ * `manifest.json` 中应用名称。
160
156
  */
161
157
  appName: string,
162
158
  /**
163
- * `manifest.json` 中应用版本名称。
159
+ * `manifest.json` 中应用版本名称(真机运行时,为基座的版本名称)。
164
160
  */
165
161
  appVersion: string,
166
162
  /**
167
- * `manifest.json` 中应用版本名号
163
+ * `manifest.json` 中应用版本名号(真机运行时,为基座的版本号)。
168
164
  */
169
165
  appVersionCode: number,
170
166
  /**
171
- * 应用资源(wgt)的版本名称。(仅 App 支持)
167
+ * 应用资源(wgt)的版本名称。
168
+ *
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
+ * }
182
+ * }
172
183
  */
173
184
  appWgtVersion: string | null,
174
185
  /**
175
- * 手机品牌。H5 不支持
186
+ * 手机品牌。
176
187
  */
177
- brand: string | null,
188
+ brand: string,
178
189
  /**
179
190
  * 浏览器名称。`App` 端是系统 webview 的名字,比如 wkwebview、chrome。小程序端为空
180
191
  */
181
192
  browserName: string,
182
193
  /**
183
- * 浏览器版本、webview 版本。小程序端为空
194
+ * 浏览器版本、webview 版本。
184
195
  */
185
196
  browserVersion: string,
186
197
  /**
@@ -188,9 +199,9 @@ export type GetSystemInfoResult = {
188
199
  */
189
200
  deviceId: string,
190
201
  /**
191
- * 设备品牌。如:`apple`、`huawei`。H5 不支持
202
+ * 设备品牌。如:`apple`、`huawei`。
192
203
  */
193
- deviceBrand: string | null,
204
+ deviceBrand: string,
194
205
  /**
195
206
  * 设备型号
196
207
  */
@@ -210,46 +221,10 @@ export type GetSystemInfoResult = {
210
221
  * @type 'portrait' | 'landscape'
211
222
  */
212
223
  deviceOrientation: string,
213
- /**
214
- * 用户字体大小设置
215
- */
216
- fontSizeSetting: number | null,
217
- /**
218
- * 宿主平台
219
- */
220
- host: string | null,
221
- /**
222
- * 用户字体大小设置
223
- */
224
- hostFontSizeSetting: number | null,
225
- /**
226
- * 客户端基础库版本
227
- */
228
- hostSDKVersion: string | null,
229
- /**
230
- * App、小程序宿主名称,如:`WeChat`、`FeiShu`、`alipay`、`DINGTALK`。H5 不支持
231
- */
232
- hostName: string | null,
233
- /**
234
- * App、小程序宿主版本。如:微信版本号。H5 不支持
235
- */
236
- hostVersion: string | null,
237
- /**
238
- * 小程序宿主语言、app 语言
239
- */
240
- hostLanguage: string | null,
241
- /**
242
- * App 主题 `light`、`dark`。H5 端为空,小程序端为系统当前主题
243
- */
244
- hostTheme: string | null,
245
- /**
246
- * 小程序宿主包名。仅 App 支持,其他平台为空
247
- */
248
- hostPackageName: string | null,
249
224
  /**
250
225
  * 程序设置的语言
251
226
  */
252
- language: string | null,
227
+ language: string,
253
228
  /**
254
229
  * 手机型号
255
230
  */
@@ -263,11 +238,26 @@ export type GetSystemInfoResult = {
263
238
  */
264
239
  osVersion: string,
265
240
  /**
266
- * 操作系统语言,小程序端与 `version` 相同,H5 与浏览器语言一致
267
- */
268
- osLanguage: string | null,
269
- /**
270
- * |操作系统主题 light、dark。小程序端为小程序主题,H5 端为空
241
+ * 操作系统语言
242
+ */
243
+ osLanguage: string,
244
+ /**
245
+ * 操作系统主题 light、dark
246
+ *
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
+ * }
260
+ * }
271
261
  */
272
262
  osTheme: string | null,
273
263
  /**
@@ -289,15 +279,7 @@ export type GetSystemInfoResult = {
289
279
  /**
290
280
  * 状态栏的高度
291
281
  */
292
- statusBarHeight: number | null,
293
- /**
294
- * 设备磁盘容量
295
- */
296
- storage: string | null,
297
- /**
298
- * 宿主平台版本号
299
- */
300
- swanNativeVersion: string | null,
282
+ statusBarHeight: number,
301
283
  /**
302
284
  * 操作系统版本
303
285
  */
@@ -305,17 +287,17 @@ export type GetSystemInfoResult = {
305
287
  /**
306
288
  * 在竖屏正方向下的安全区域
307
289
  */
308
- safeArea: SafeArea | null,
290
+ safeArea: SafeArea,
309
291
  /**
310
292
  * 在竖屏正方向下的安全区域插入位置
311
293
  */
312
- safeAreaInsets: SafeAreaInsets | null,
294
+ safeAreaInsets: SafeAreaInsets,
313
295
  /**
314
296
  * 用户标识。小程序端为空
315
297
  */
316
298
  ua: string,
317
299
  /**
318
- * uni 编译器版本号
300
+ * uni 编译器版本
319
301
  */
320
302
  uniCompileVersion: string,
321
303
  /**
@@ -325,19 +307,28 @@ export type GetSystemInfoResult = {
325
307
  /**
326
308
  * uni 运行时版本
327
309
  */
328
- uniRuntimeVersion: string,
310
+ uniRuntimeVersion: string,
311
+ /**
312
+ * uni 编译器版本号
313
+ */
314
+ uniCompileVersionCode: number,
315
+ /**
316
+ * uni 运行时版本号
317
+ */
318
+ uniRuntimeVersionCode: number,
329
319
  /**
330
- * 引擎版本号
320
+ * 引擎版本号
321
+ * @deprecated 已废弃,仅为了向下兼容保留
331
322
  */
332
323
  version: string,
333
324
  /**
334
325
  * rom 名称。Android 部分机型获取不到值。iOS 恒为 `ios`
335
326
  */
336
- romName: string | null,
327
+ romName: string,
337
328
  /**
338
329
  * rom 版本号。Android 部分机型获取不到值。iOS 恒为 `ios 版本号`
339
330
  */
340
- romVersion: string | null,
331
+ romVersion: string,
341
332
  /**
342
333
  * 可使用窗口宽度
343
334
  */
@@ -346,22 +337,6 @@ export type GetSystemInfoResult = {
346
337
  * 可使用窗口高度
347
338
  */
348
339
  windowHeight: number,
349
- /**
350
- * 导航栏的高度
351
- */
352
- navigationBarHeight: number | null,
353
- /**
354
- * 标题栏高度
355
- */
356
- titleBarHeight: number | null,
357
- /**
358
- * 当前电量百分比
359
- */
360
- currentBattery: string | null,
361
- /**
362
- * App平台
363
- */
364
- AppPlatform: string | null,
365
340
  /**
366
341
  * 可使用窗口的顶部位置
367
342
  */
@@ -371,74 +346,41 @@ export type GetSystemInfoResult = {
371
346
  */
372
347
  windowBottom: number,
373
348
  /**
374
- * 允许微信使用相册的开关(仅 iOS 有效)
375
- * @type boolean
376
- */
377
- albumAuthorized: boolean | null,
378
- /**
379
- * 允许微信使用摄像头的开关
380
- * @type boolean
381
- */
382
- cameraAuthorized: boolean | null,
383
- /**
384
- * 允许微信使用定位的开关
385
- * @type boolean
386
- */
387
- locationAuthorized: boolean | null,
388
- /**
389
- * 允许微信使用麦克风的开关
390
- * @type boolean
391
- */
392
- microphoneAuthorized: boolean | null,
393
- /**
394
- * 允许微信通知的开关
395
- * @type boolean
396
- */
397
- notificationAuthorized: boolean | null,
398
- /**
399
- * 允许微信通知带有提醒的开关(仅 iOS 有效)
400
- * @type boolean
401
- */
402
- notificationAlertAuthorized: boolean | null,
403
- /**
404
- * 允许微信通知带有标记的开关(仅 iOS 有效)
405
- * @type boolean
406
- */
407
- notificationBadgeAuthorized: boolean | null,
408
- /**
409
- * 允许微信通知带有声音的开关(仅 iOS 有效)
410
- * @type boolean
411
- */
412
- notificationSoundAuthorized: boolean | null,
413
- /**
414
- * 蓝牙的系统开关
415
- * @type boolean
416
- */
417
- bluetoothEnabled: boolean | null,
418
- /**
419
- * 地理位置的系统开关
420
- * @type boolean
421
- */
422
- locationEnabled: boolean | null,
423
- /**
424
- * Wi-Fi 的系统开关
425
- * @type boolean
426
- */
427
- wifiEnabled: boolean | null,
428
- /**
429
- * 上一次缓存的位置信息
430
- */
431
- cacheLocation: any | null,
432
- /**
433
- * 系统当前主题,取值为light或dark。仅微信小程序支持
434
- */
435
- theme: string | null
436
- /**
437
- * oaid
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
+ * }
438
365
  */
439
366
  oaid: string | null
440
367
  /**
441
- * Android 系统API库的版本。
368
+ * Android 系统API库的版本。
369
+ *
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
+ * }
383
+ * }
442
384
  */
443
385
  osAndroidAPILevel: number | null
444
386
  };
@@ -449,15 +391,18 @@ export type GetSystemInfoComplete = any;
449
391
  export type GetSystemInfoCompleteCallback = (result: GetSystemInfoComplete) => void;
450
392
  export type GetSystemInfoOptions = {
451
393
  /**
452
- * 接口调用成功的回调函数
394
+ * 接口调用成功的回调函数
395
+ * @defaultValue null
453
396
  */
454
397
  success?: GetSystemInfoSuccessCallback | null,
455
398
  /**
456
- * 接口调用失败的回调函数
399
+ * 接口调用失败的回调函数
400
+ * @defaultValue null
457
401
  */
458
402
  fail?: GetSystemInfoFailCallback | null,
459
403
  /**
460
- * 接口调用结束的回调函数(调用成功、失败都会执行)
404
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
405
+ * @defaultValue null
461
406
  */
462
407
  complete?: GetSystemInfoCompleteCallback | null
463
408
  };
@@ -12,7 +12,7 @@ export type GetSystemSettingResult = {
12
12
  /**
13
13
  * 位置是否开启
14
14
  */
15
- locationEnabled?: boolean,
15
+ locationEnabled : boolean,
16
16
  /**
17
17
  * wifi是否开启
18
18
  */
@@ -24,7 +24,7 @@ export type GetSystemSettingResult = {
24
24
  /**
25
25
  * 设备方向
26
26
  */
27
- deviceOrientation?: string
27
+ deviceOrientation : string
28
28
  }
29
29
 
30
30
 
@@ -57,5 +57,5 @@ export interface Uni {
57
57
  uni.getSystemSetting()
58
58
  ```
59
59
  */
60
- getSystemSetting: GetSystemSetting
60
+ getSystemSetting(): GetSystemSettingResult;
61
61
  }