@dcloudio/uni-app-x 0.7.1 → 0.7.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "author": "DCloud",
@@ -3,7 +3,7 @@ import { Event } from './Event'
3
3
  /**
4
4
  * @package io.dcloud.uniapp.runtime
5
5
  */
6
- export class MouseEvent extends Event {
6
+ export class PointerEvent extends Event {
7
7
  /**
8
8
  * 相对于页面可显示区域左边的距离
9
9
  */
@@ -38,7 +38,7 @@ export class MouseEvent extends Event {
38
38
  screenY: number
39
39
 
40
40
  /**
41
- * 创建一个新的 MouseEvent 对象
41
+ * 创建一个新的 PointerEvent 对象
42
42
  * @param {string} type 事件类型
43
43
  * @param {number} x 相对于页面可显示区域左边的距离
44
44
  * @param {number} y 相对于页面可显示区域顶部的距离
@@ -61,3 +61,6 @@ export class MouseEvent extends Event {
61
61
  screenY: number
62
62
  )
63
63
  }
64
+
65
+ export type MouseEvent = PointerEvent
66
+ export const MouseEvent: typeof PointerEvent
@@ -23,6 +23,15 @@ export class ViewToTempFilePathOptions {
23
23
  * 组件id
24
24
  */
25
25
  id: string | null
26
+ /**
27
+ * X轴偏移量,单位px
28
+ */
29
+ offsetX: string | null
30
+ /**
31
+ * Y轴偏移量,单位px
32
+ */
33
+ offsetY: string | null
34
+
26
35
  /**
27
36
  * 是否截取完整内容,包括屏幕外不可见的内容。传入id时会忽略此参数
28
37
  */
@@ -60,6 +60,9 @@ import {
60
60
  RichTextItemClickEvent as RichTextItemClickEventOrigin,
61
61
  ResizeEvent as ResizeEventOrigin,
62
62
  RefresherEvent as RefresherEventOrigin,
63
+ PointerEvent as PointerEventOrigin,
64
+ MouseEvent as MouseEventOrigin,
65
+ MouseEvent as MouseEventOrigin,
63
66
  PageScrollEvent as PageScrollEventOrigin,
64
67
  PageNode as PageNodeOrigin,
65
68
  PageEvent as PageEventOrigin,
@@ -68,7 +71,6 @@ import {
68
71
  NestedPreScrollEvent as NestedPreScrollEventOrigin,
69
72
  NativeLoadFontFaceFail as NativeLoadFontFaceFailOrigin,
70
73
  NativeLoadFontFaceOptions as NativeLoadFontFaceOptionsOrigin,
71
- MouseEvent as MouseEventOrigin,
72
74
  InputKeyboardHeightChangeEvent as InputKeyboardHeightChangeEventOrigin,
73
75
  InputFocusEvent as InputFocusEventOrigin,
74
76
  InputEvent as InputEventOrigin,
@@ -215,6 +217,10 @@ declare global {
215
217
  type ResizeEvent = ResizeEventOrigin
216
218
  const RefresherEvent: typeof RefresherEventOrigin
217
219
  type RefresherEvent = RefresherEventOrigin
220
+ const PointerEvent: typeof PointerEventOrigin
221
+ type PointerEvent = PointerEventOrigin
222
+ const MouseEvent: typeof MouseEventOrigin
223
+ type MouseEvent = MouseEventOrigin
218
224
  const PageScrollEvent: typeof PageScrollEventOrigin
219
225
  type PageScrollEvent = PageScrollEventOrigin
220
226
  const PageNode: typeof PageNodeOrigin
@@ -230,8 +236,6 @@ declare global {
230
236
  type NativeLoadFontFaceFail = NativeLoadFontFaceFailOrigin
231
237
  const NativeLoadFontFaceOptions: typeof NativeLoadFontFaceOptionsOrigin
232
238
  type NativeLoadFontFaceOptions = NativeLoadFontFaceOptionsOrigin
233
- const MouseEvent: typeof MouseEventOrigin
234
- type MouseEvent = MouseEventOrigin
235
239
  const InputKeyboardHeightChangeEvent: typeof InputKeyboardHeightChangeEventOrigin
236
240
  type InputKeyboardHeightChangeEvent = InputKeyboardHeightChangeEventOrigin
237
241
  const InputFocusEvent: typeof InputFocusEventOrigin
@@ -39,13 +39,13 @@ export * from './ScrollEvent'
39
39
  export * from './RichTextItemClickEvent'
40
40
  export * from './ResizeEvent'
41
41
  export * from './RefresherEvent'
42
+ export * from './PointerEvent'
42
43
  export * from './PageScrollEvent'
43
44
  export * from './PageNode'
44
45
  export * from './PageEvent'
45
46
  export * from './NodeData'
46
47
  export * from './NestedPreScrollEvent'
47
48
  export * from './NativeLoadFontFaceOptions'
48
- export * from './MouseEvent'
49
49
  export * from './InputKeyboardHeightChangeEvent'
50
50
  export * from './InputFocusEvent'
51
51
  export * from './InputEvent'
package/types/page.d.ts CHANGED
@@ -849,7 +849,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
849
849
  * }
850
850
  *}
851
851
  */
852
- onShareAppMessage?(options: OnShareAppMessageOption): CustomShareContent | Promise<Omit<CustomShareContent, "promise">>;
852
+ onShareAppMessage?(options: OnShareAppMessageOption): CustomShareContent | Promise<Omit<CustomShareContent, "promise">>;
853
853
  /**
854
854
  * 用户点击右上角转发到朋友圈
855
855
  *
@@ -985,7 +985,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
985
985
  * }
986
986
  *}
987
987
  */
988
- onAddToFavorites?(options: OnAddToFavoritesOption): CustomFavoritesContent;
988
+ onAddToFavorites?(options: OnAddToFavoritesOption): CustomFavoritesContent;
989
989
  /**
990
990
  * 页面滚动触发事件的处理函数
991
991
  *
@@ -1054,7 +1054,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1054
1054
  * }
1055
1055
  *}
1056
1056
  */
1057
- onPageScroll?(options: OnPageScrollOptions): void;
1057
+ onPageScroll?(options: OnPageScrollOptions): void;
1058
1058
  /**
1059
1059
  * 页面尺寸改变时触发
1060
1060
  * @param options 页面滚动参数
@@ -1121,7 +1121,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1121
1121
  * }
1122
1122
  *}
1123
1123
  */
1124
- onResize?(options: OnResizeOptions): void;
1124
+ onResize?(options: OnResizeOptions): void;
1125
1125
  /**
1126
1126
  * 当前是 tab 页时,点击 tab 时触发
1127
1127
  * @param options tab 点击参数
@@ -1188,7 +1188,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1188
1188
  * }
1189
1189
  *}
1190
1190
  */
1191
- onTabItemTap?(options: OnTabItemTapOption): void;
1191
+ onTabItemTap?(options: OnTabItemTapOption): void;
1192
1192
  /**
1193
1193
  * 监听原生标题栏按钮点击事件
1194
1194
  * @param options tab 点击参数
@@ -1255,7 +1255,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1255
1255
  * }
1256
1256
  *}
1257
1257
  */
1258
- onNavigationBarButtonTap?(options: OnNavigationBarButtonTapOption): void;
1258
+ onNavigationBarButtonTap?(options: OnNavigationBarButtonTapOption): void;
1259
1259
  /**
1260
1260
  * 监听页面返回
1261
1261
  * @param options tab 点击参数
@@ -1323,7 +1323,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1323
1323
  * }
1324
1324
  *}
1325
1325
  */
1326
- onBackPress?(options: OnBackPressOptions): any;
1326
+ onBackPress?(options: OnBackPressOptions): boolean | null;
1327
1327
  /**
1328
1328
  * 监听原生标题栏搜索输入框输入内容变化事件
1329
1329
  *
@@ -346,7 +346,7 @@ export interface Uni {
346
346
  /**
347
347
  * 返回一个SelectorQuery对象实例
348
348
  *
349
- * @tutorial http://uniapp.dcloud.io/api/ui/nodes-info?id=createselectorquery
349
+ * @tutorial https://uniapp.dcloud.io/uni-app-x/api/nodes-info.html
350
350
  * @uniPlatform {
351
351
  * "app": {
352
352
  * "android": {
@@ -357,7 +357,7 @@ export interface Uni {
357
357
  * "ios": {
358
358
  * "osVer": "10.0",
359
359
  * "uniVer": "√",
360
- * "unixVer": ""
360
+ * "unixVer": "x"
361
361
  * }
362
362
  * },
363
363
  * "mp": {
@@ -404,7 +404,7 @@ export interface Uni {
404
404
  * },
405
405
  * "web": {
406
406
  * "uniVer": "√",
407
- * "unixVer": ""
407
+ * "unixVer": "4.0+"
408
408
  * }
409
409
  * }
410
410
  */
@@ -49,8 +49,8 @@ export type PageScrollToOptions = {
49
49
  * }
50
50
  * },
51
51
  * "web": {
52
- * "uniVer": "x",
53
- * "unixVer": "x"
52
+ * "uniVer": "",
53
+ * "unixVer": "4.0+"
54
54
  * }
55
55
  * }
56
56
  */
@@ -77,7 +77,7 @@ export interface Uni {
77
77
  /**
78
78
  * 将页面滚动到目标位置
79
79
  *
80
- * @tutorial http://uniapp.dcloud.io/api/ui/scroll?id=pagescrollto
80
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/page-scroll-to.html
81
81
  * @uniPlatform {
82
82
  * "app": {
83
83
  * "android": {
@@ -88,7 +88,7 @@ export interface Uni {
88
88
  * "ios": {
89
89
  * "osVer": "10.0",
90
90
  * "uniVer": "√",
91
- * "unixVer": ""
91
+ * "unixVer": "x"
92
92
  * }
93
93
  * },
94
94
  * "mp": {
@@ -135,7 +135,7 @@ export interface Uni {
135
135
  * },
136
136
  * "web": {
137
137
  * "uniVer": "√",
138
- * "unixVer": ""
138
+ * "unixVer": "4.0+"
139
139
  * }
140
140
  * }
141
141
  */
@@ -5,7 +5,7 @@ export type CreateWebviewContext = (webviewId : string.WebviewIdString, componen
5
5
  export interface WebviewContext {
6
6
  /**
7
7
  * @description 后退到 web-view 组件网页加载历史的上一页,如果不存在上一页则没有任何效果。
8
- * @uniplatform {
8
+ * @uniPlatform {
9
9
  * "app": {
10
10
  * "android": {
11
11
  * "osVer": "4.4",
@@ -20,7 +20,7 @@ export interface WebviewContext {
20
20
 
21
21
  /**
22
22
  * @description 前进到 web-view 组件网页加载历史的下一页,如果不存在下一页则没有任何效果。
23
- * @uniplatform {
23
+ * @uniPlatform {
24
24
  * "app": {
25
25
  * "android": {
26
26
  * "osVer": "4.4",
@@ -35,7 +35,7 @@ export interface WebviewContext {
35
35
 
36
36
  /**
37
37
  * @description 重新加载 web-view 组件当前页面。
38
- * @uniplatform {
38
+ * @uniPlatform {
39
39
  * "app": {
40
40
  * "android": {
41
41
  * "osVer": "4.4",
@@ -50,7 +50,7 @@ export interface WebviewContext {
50
50
 
51
51
  /**
52
52
  * @description 停止加载 web-view 组件当前网页,该方法不能阻止已经加载的 html 文档,但是能够阻止未完成的图片及延迟加载的资源。
53
- * @uniplatform {
53
+ * @uniPlatform {
54
54
  * "app": {
55
55
  * "android": {
56
56
  * "osVer": "4.4",
@@ -65,7 +65,7 @@ export interface WebviewContext {
65
65
 
66
66
  /**
67
67
  * @description 在网页中执行指定的js脚本,在 uvue 页面中可通过此方法向 web-view 组件加载的页面发送数据
68
- * @uniplatform {
68
+ * @uniPlatform {
69
69
  * "app": {
70
70
  * "android": {
71
71
  * "osVer": "4.4",
@@ -82,7 +82,7 @@ export interface WebviewContext {
82
82
  export interface Uni {
83
83
  /**
84
84
  * @description 创建 web-view 组件的上下文对象,用于操作 web-view 的行为。
85
- * @uniplatform {
85
+ * @uniPlatform {
86
86
  * "app": {
87
87
  * "android": {
88
88
  * "osVer": "4.4",
@@ -8,20 +8,21 @@ export interface Uni {
8
8
  * @description
9
9
  * 获取app基本信息
10
10
  * @return {object}
11
- * @uniPlatform {
12
- * "app": {
13
- * "android": {
14
- * "osVer": "4.4",
15
- * "uniVer": "x",
16
- * "unixVer": "3.9+"
17
- * },
18
- * "ios": {
19
- * "osVer": "9.0",
20
- * "uniVer": "x",
21
- * "unixVer": "3.9+"
22
- * }
23
- * }
24
- * }
11
+ * @uniPlatform
12
+ * {
13
+ * "app": {
14
+ * "android": {
15
+ * "osVer": "4.4",
16
+ * "uniVer": "x",
17
+ * "unixVer": "3.9+"
18
+ * },
19
+ * "ios": {
20
+ * "osVer": "x",
21
+ * "uniVer": "x",
22
+ * "unixVer": "x"
23
+ * }
24
+ * }
25
+ * }
25
26
  * @example
26
27
  ```typescript
27
28
  uni.getAccessibilityInfo()
@@ -6,20 +6,21 @@ export interface Uni {
6
6
  * @param {void}
7
7
  * @return {GetAppAuthorizeSettingResult}
8
8
  * @tutorial http://uniapp.dcloud.io/api/system/getappauthorizesetting
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.getAppAuthorizeSetting()
@@ -37,22 +38,23 @@ export type GetAppAuthorizeSettingResult = {
37
38
  * - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限)
38
39
  * - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关)
39
40
  * @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
- * }
41
+ * @uniPlatform
42
+ * {
43
+ * "app": {
44
+ * "android": {
45
+ * "osVer": "x",
46
+ * "uniVer": "x",
47
+ * "unixVer": "x"
48
+ * },
49
+ * "ios": {
50
+ * "osVer": "9.0",
51
+ * "uniVer": "",
52
+ * "unixVer": "x"
53
+ * }
54
+ * }
53
55
  * }
54
56
  */
55
- albumAuthorized: string | null,
57
+ albumAuthorized?: 'authorized' | 'denied' | 'not determined' | null,
56
58
  /**
57
59
  * 允许 App 使用蓝牙的开关(仅 iOS 支持)
58
60
  * - authorized: 已经获得授权,无需再次请求授权
@@ -60,22 +62,23 @@ export type GetAppAuthorizeSettingResult = {
60
62
  * - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关)
61
63
  * - config error: Android平台没有该值;iOS平台:表示没有在 `manifest.json -> App模块配置` 中配置 `BlueTooth(低功耗蓝牙)` 模块
62
64
  * @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
- * }
65
+ * @uniPlatform
66
+ * {
67
+ * "app": {
68
+ * "android": {
69
+ * "osVer": "x",
70
+ * "uniVer": "x",
71
+ * "unixVer": "x"
72
+ * },
73
+ * "ios": {
74
+ * "osVer": "9.0",
75
+ * "uniVer": "",
76
+ * "unixVer": "x"
77
+ * }
78
+ * }
76
79
  * }
77
80
  */
78
- bluetoothAuthorized: string | null,
81
+ bluetoothAuthorized?: 'authorized' | 'denied' | 'not determined' | 'config error' | null,
79
82
  /**
80
83
  * 允许 App 使用摄像头的开关
81
84
  * - authorized: 已经获得授权,无需再次请求授权
@@ -84,7 +87,7 @@ export type GetAppAuthorizeSettingResult = {
84
87
  * - config error: Android平台:表示没有授予 `android.permission.CAMERA` 权限;iOS平台没有该值
85
88
  * @type 'authorized' | 'denied' | 'not determined' | 'config error'
86
89
  */
87
- cameraAuthorized: string,
90
+ cameraAuthorized: 'authorized' | 'denied' | 'not determined' | 'config error',
88
91
  /**
89
92
  * 允许 App 使用定位的开关
90
93
  * - authorized: 已经获得授权,无需再次请求授权
@@ -93,7 +96,7 @@ export type GetAppAuthorizeSettingResult = {
93
96
  * - config error: Android平台:表示没有授予 `android.permission.ACCESS_COARSE_LOCATION` 权限;iOS平台:表示没有在 `manifest.json -> App模块配置` 中配置 `Geolocation(定位)` 模块
94
97
  * @type 'authorized' | 'denied' | 'not determined' | 'config error'
95
98
  */
96
- locationAuthorized: string,
99
+ locationAuthorized: 'authorized' | 'denied' | 'not determined' | 'config error',
97
100
  /**
98
101
  * 定位准确度。
99
102
  * - reduced: 模糊定位
@@ -101,26 +104,27 @@ export type GetAppAuthorizeSettingResult = {
101
104
  * - unsupported: 不支持(包括用户拒绝定位权限和没有在 `manifest.json -> App模块配置` 中配置 `Geolocation(定位)` 模块)
102
105
  * @type 'reduced' | 'full' | 'unsupported'
103
106
  */
104
- locationAccuracy: string | null,
107
+ locationAccuracy?: 'reduced' | 'full' | 'unsupported' | null,
105
108
  /**
106
109
  * 定位准确度(推荐使用 locationAccuracy 属性)。true 表示模糊定位,false 表示精确定位(仅 iOS 支持)
107
110
  * @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
- * }
111
+ * @uniPlatform
112
+ * {
113
+ * "app": {
114
+ * "android": {
115
+ * "osVer": "x",
116
+ * "uniVer": "x",
117
+ * "unixVer": "x"
118
+ * },
119
+ * "ios": {
120
+ * "osVer": "9.0",
121
+ * "uniVer": "",
122
+ * "unixVer": "x"
123
+ * }
124
+ * }
121
125
  * }
122
126
  */
123
- locationReducedAccuracy: boolean | null,
127
+ locationReducedAccuracy?: boolean | null,
124
128
  /**
125
129
  * 允许 App 使用麦克风的开关
126
130
  * - authorized: 已经获得授权,无需再次请求授权
@@ -129,7 +133,7 @@ export type GetAppAuthorizeSettingResult = {
129
133
  * - config error: Android平台:表示没有授予 `android.permission.RECORD_AUDIO` 权限;iOS平台没有该值
130
134
  * @type 'authorized' | 'denied' | 'not determined' | 'config error'
131
135
  */
132
- microphoneAuthorized: string,
136
+ microphoneAuthorized: 'authorized' | 'denied' | 'not determined' | 'config error',
133
137
  /**
134
138
  * 允许 App 通知的开关
135
139
  * - authorized: 已经获得授权,无需再次请求授权
@@ -138,7 +142,7 @@ export type GetAppAuthorizeSettingResult = {
138
142
  * - config error: Android平台没有该值;iOS平台:表示没有在 `manifest.json -> App模块配置` 中配置 `Push(推送)` 模块
139
143
  * @type 'authorized' | 'denied' | 'not determined' | 'config error'
140
144
  */
141
- notificationAuthorized: string,
145
+ notificationAuthorized: 'authorized' | 'denied' | 'not determined' | 'config error',
142
146
  /**
143
147
  * 允许 App 通知带有提醒的开关(仅 iOS 10.0+ 支持)
144
148
  * - authorized: 已经获得授权,无需再次请求授权
@@ -146,22 +150,23 @@ export type GetAppAuthorizeSettingResult = {
146
150
  * - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关)
147
151
  * - config error: 没有在 `manifest.json -> App模块配置` 中配置 `Push(推送)` 模块
148
152
  * @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
- * }
153
+ * @uniPlatform
154
+ * {
155
+ * "app": {
156
+ * "android": {
157
+ * "osVer": "x",
158
+ * "uniVer": "x",
159
+ * "unixVer": "x"
160
+ * },
161
+ * "ios": {
162
+ * "osVer": "10.0",
163
+ * "uniVer": "",
164
+ * "unixVer": "x"
165
+ * }
166
+ * }
162
167
  * }
163
168
  */
164
- notificationAlertAuthorized: string | null,
169
+ notificationAlertAuthorized?: 'authorized' | 'denied' | 'not determined' | 'config error' | null,
165
170
  /**
166
171
  * 允许 App 通知带有标记的开关(仅 iOS 10.0+ 支持)
167
172
  * - authorized: 已经获得授权,无需再次请求授权
@@ -169,22 +174,23 @@ export type GetAppAuthorizeSettingResult = {
169
174
  * - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关)
170
175
  * - config error: 没有在 `manifest.json -> App模块配置` 中配置 `Push(推送)` 模块
171
176
  * @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
- * }
177
+ * @uniPlatform
178
+ * {
179
+ * "app": {
180
+ * "android": {
181
+ * "osVer": "x",
182
+ * "uniVer": "x",
183
+ * "unixVer": "x"
184
+ * },
185
+ * "ios": {
186
+ * "osVer": "10.0",
187
+ * "uniVer": "",
188
+ * "unixVer": "x"
189
+ * }
190
+ * }
185
191
  * }
186
192
  */
187
- notificationBadgeAuthorized: string | null,
193
+ notificationBadgeAuthorized?: 'authorized' | 'denied' | 'not determined' | 'config error' | null,
188
194
  /**
189
195
  * 允许 App 通知带有声音的开关(仅 iOS 10.0+ 支持)
190
196
  * - authorized: 已经获得授权,无需再次请求授权
@@ -192,42 +198,44 @@ export type GetAppAuthorizeSettingResult = {
192
198
  * - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关)
193
199
  * - config error: 没有在 `manifest.json -> App模块配置` 中配置 `Push(推送)` 模块
194
200
  * @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
- * }
201
+ * @uniPlatform
202
+ * {
203
+ * "app": {
204
+ * "android": {
205
+ * "osVer": "x",
206
+ * "uniVer": "x",
207
+ * "unixVer": "x"
208
+ * },
209
+ * "ios": {
210
+ * "osVer": "10.0",
211
+ * "uniVer": "",
212
+ * "unixVer": "x"
213
+ * }
214
+ * }
208
215
  * }
209
216
  */
210
- notificationSoundAuthorized: string | null,
217
+ notificationSoundAuthorized?: 'authorized' | 'denied' | 'not determined' | 'config error' | null,
211
218
  /**
212
219
  * 允许读写日历的开关(仅微信小程序支持)
213
220
  * - authorized: 已经获得授权,无需再次请求授权
214
221
  * - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限)
215
222
  * - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关)
216
223
  * @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
- * }
224
+ * @uniPlatform
225
+ * {
226
+ * "app": {
227
+ * "android": {
228
+ * "osVer": "x",
229
+ * "uniVer": "x",
230
+ * "unixVer": "x"
231
+ * },
232
+ * "ios": {
233
+ * "osVer": "x",
234
+ * "uniVer": "x",
235
+ * "unixVer": "x"
236
+ * }
237
+ * }
230
238
  * }
231
239
  */
232
- phoneCalendarAuthorized: string | null
240
+ phoneCalendarAuthorized?: 'authorized' | 'denied' | 'not determined' | null
233
241
  };