@dcloudio/uni-app-x 0.5.0 → 0.5.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.
Files changed (108) hide show
  1. package/README.md +39 -0
  2. package/package.json +5 -3
  3. package/types/app.d.ts +26 -72
  4. package/types/native/CSSStyleDeclaration.d.ts +2 -2
  5. package/types/native/DOMRect.d.ts +4 -4
  6. package/types/native/DomNode.d.ts +48 -0
  7. package/types/native/DrawableContext.d.ts +42 -16
  8. package/types/native/Element.d.ts +234 -0
  9. package/types/native/Event.d.ts +14 -3
  10. package/types/native/IDocument.d.ts +6 -6
  11. package/types/native/IPage.d.ts +28 -10
  12. package/types/native/IPageManager.d.ts +2 -2
  13. package/types/native/ITabsNode.d.ts +4 -4
  14. package/types/native/IUniError.d.ts +20 -0
  15. package/types/native/IWebViewNode.d.ts +2 -2
  16. package/types/native/InputBlurEvent.d.ts +13 -0
  17. package/types/native/InputConfirmEvent.d.ts +13 -0
  18. package/types/native/InputEvent.d.ts +21 -0
  19. package/types/native/InputFocusEvent.d.ts +17 -0
  20. package/types/native/InputKeyboardHeightChangeEvent.d.ts +17 -0
  21. package/types/native/MouseEvent.d.ts +13 -1
  22. package/types/native/NestedPreScrollEvent.d.ts +23 -0
  23. package/types/native/ScrollToLowerEvent.d.ts +4 -1
  24. package/types/native/ScrollToUpperEvent.d.ts +5 -2
  25. package/types/native/StartNestedScrollEvent.d.ts +12 -0
  26. package/types/native/SwiperAnimationFinishEvent.d.ts +11 -0
  27. package/types/native/SwiperChangeEvent.d.ts +11 -0
  28. package/types/native/SwiperTransitionEvent.d.ts +11 -0
  29. package/types/native/TextareaBlurEvent.d.ts +17 -0
  30. package/types/native/TextareaFocusEvent.d.ts +17 -0
  31. package/types/native/TextareaLineChangeEvent.d.ts +21 -0
  32. package/types/native/UniError.d.ts +7 -2
  33. package/types/native/index.d.ts +18 -1
  34. package/types/page.d.ts +38 -193
  35. package/types/uni/core/index.d.ts +9 -8
  36. package/types/uni/core/lib/base/event/interface.d.ts +4 -4
  37. package/types/uni/core/lib/lifecycle/interface.d.ts +1 -1
  38. package/types/uni/core/lib/route/index.d.ts +0 -10
  39. package/types/uni/core/lib/route/interface.d.ts +1805 -10
  40. package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +242 -2
  41. package/types/uni/core/lib/ui/get-element-by-id/index.d.ts +9 -0
  42. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +72 -0
  43. package/types/uni/core/lib/ui/load-font-face/interface.d.ts +486 -3
  44. package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +0 -2
  45. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +93 -9
  46. package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +0 -2
  47. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +2 -5
  48. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +373 -4
  49. package/types/uni/core/lib/ui/tab-bar/index.d.ts +2 -18
  50. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +32 -35
  51. package/types/uni/index.d.ts +2 -1
  52. package/types/uni/{ext → uts-plugin-api}/index.d.ts +18 -17
  53. package/types/uni/{ext → uts-plugin-api}/lib/uni-audio/utssdk/interface.d.ts +2 -2
  54. package/types/uni/{ext → uts-plugin-api}/lib/uni-createWebviewContext/utssdk/interface.d.ts +9 -9
  55. package/types/uni/{ext → uts-plugin-api}/lib/uni-exit/utssdk/interface.d.ts +1 -1
  56. package/types/uni/{ext → uts-plugin-api}/lib/uni-file-manager/utssdk/interface.d.ts +2 -2
  57. package/types/uni/{ext → uts-plugin-api}/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +1 -1
  58. package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +108 -10
  59. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +233 -0
  60. package/types/uni/{ext → uts-plugin-api}/lib/uni-getDeviceInfo/utssdk/interface.d.ts +58 -46
  61. package/types/uni/{ext → uts-plugin-api}/lib/uni-getLocation-system/utssdk/interface.d.ts +13 -1
  62. package/types/uni/{ext → uts-plugin-api}/lib/uni-getNetworkType/utssdk/interface.d.ts +8 -5
  63. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +213 -0
  64. package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemInfo/utssdk/interface.d.ts +108 -36
  65. package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemSetting/utssdk/interface.d.ts +3 -3
  66. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +794 -0
  67. package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/app-ios/interface.d.ts +60 -19
  68. package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/index.d.ts +4 -0
  69. package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/interface.d.ts +138 -49
  70. package/types/uni/{ext → uts-plugin-api}/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +8 -5
  71. package/types/uni/{ext → uts-plugin-api}/lib/uni-prompt/utssdk/interface.d.ts +6 -6
  72. package/types/uni/{ext → uts-plugin-api}/lib/uni-storage/utssdk/interface.d.ts +27 -27
  73. package/types/uni/{ext → uts-plugin-api}/lib/uni-websocket/utssdk/index.d.ts +2 -0
  74. package/types/uni/{ext → uts-plugin-api}/lib/uni-websocket/utssdk/interface.d.ts +60 -35
  75. package/types/uni/uts-plugin-component/index.d.ts +1 -0
  76. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +15 -0
  77. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +171 -0
  78. package/types/uni-cloud/index.d.ts +59 -330
  79. package/types/uni-cloud/interface.d.ts +786 -0
  80. package/types/vue/CheckboxGroupChangeEvent.d.ts +1 -1
  81. package/types/vue/PickerViewChangeEvent.d.ts +1 -1
  82. package/types/vue/ProgressActiveendEvent.d.ts +1 -1
  83. package/types/vue/RadioGroupChangeEvent.d.ts +1 -1
  84. package/types/vue/SliderChangeEvent.d.ts +10 -1
  85. package/types/vue/SwitchChangeEvent.d.ts +1 -1
  86. package/uts-plugin.d.ts +10 -0
  87. package/types/native/INode.d.ts +0 -181
  88. package/types/uni/ext/lib/uni-file-manager/utssdk/index.d.ts +0 -31
  89. package/types/uni/ext/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +0 -120
  90. package/types/uni/ext/lib/uni-getRecorderManager/utssdk/interface.d.ts +0 -213
  91. package/types/uni/ext/lib/uni-media/utssdk/interface.d.ts +0 -795
  92. /package/types/uni/{ext → uts-plugin-api}/lib/uni-audio/utssdk/index.d.ts +0 -0
  93. /package/types/uni/{ext → uts-plugin-api}/lib/uni-createWebviewContext/utssdk/index.d.ts +0 -0
  94. /package/types/uni/{ext → uts-plugin-api}/lib/uni-exit/utssdk/index.d.ts +0 -0
  95. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +0 -0
  96. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +0 -0
  97. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppBaseInfo/utssdk/index.d.ts +0 -0
  98. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getDeviceInfo/utssdk/index.d.ts +0 -0
  99. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getLocation-system/utssdk/index.d.ts +0 -0
  100. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getNetworkType/utssdk/index.d.ts +0 -0
  101. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getRecorderManager/utssdk/index.d.ts +0 -0
  102. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemInfo/utssdk/index.d.ts +0 -0
  103. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemSetting/utssdk/index.d.ts +0 -0
  104. /package/types/uni/{ext → uts-plugin-api}/lib/uni-media/utssdk/index.d.ts +0 -0
  105. /package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/app-ios/index.d.ts +0 -0
  106. /package/types/uni/{ext → uts-plugin-api}/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +0 -0
  107. /package/types/uni/{ext → uts-plugin-api}/lib/uni-prompt/utssdk/index.d.ts +0 -0
  108. /package/types/uni/{ext → uts-plugin-api}/lib/uni-storage/utssdk/index.d.ts +0 -0
@@ -11,6 +11,6 @@ declare class CheckboxGroupChangeEventDetail {
11
11
  /**
12
12
  * @package io.dcloud.uniapp.framework
13
13
  */
14
- export declare class CheckboxGroupChangeEvent extends CustomEvent<CheckboxGroupChangeEventDetail> {
14
+ declare class CheckboxGroupChangeEvent extends CustomEvent<CheckboxGroupChangeEventDetail> {
15
15
  constructor (value: string[])
16
16
  }
@@ -11,6 +11,6 @@ declare class PickerViewChangeEventDetail {
11
11
  /**
12
12
  * @package io.dcloud.uniapp.framework
13
13
  */
14
- export declare class PickerViewChangeEvent extends CustomEvent<PickerViewChangeEventDetail> {
14
+ declare class PickerViewChangeEvent extends CustomEvent<PickerViewChangeEventDetail> {
15
15
  constructor (value: number[])
16
16
  }
@@ -11,6 +11,6 @@ declare class ProgressActiveendEventDetail {
11
11
  /**
12
12
  * @package io.dcloud.uniapp.framework
13
13
  */
14
- export declare class ProgressActiveendEvent extends CustomEvent<ProgressActiveendEventDetail> {
14
+ declare class ProgressActiveendEvent extends CustomEvent<ProgressActiveendEventDetail> {
15
15
  constructor (value: number)
16
16
  }
@@ -11,6 +11,6 @@ declare class RadioGroupChangeEventDetail {
11
11
  /**
12
12
  * @package io.dcloud.uniapp.framework
13
13
  */
14
- export declare class RadioGroupChangeEvent extends CustomEvent<RadioGroupChangeEventDetail> {
14
+ declare class RadioGroupChangeEvent extends CustomEvent<RadioGroupChangeEventDetail> {
15
15
  constructor (value: string)
16
16
  }
@@ -1,4 +1,5 @@
1
1
  /// <reference path="../native/CustomEvent.d.ts" />
2
+ /// <reference path="../native/DomNode.d.ts" />
2
3
 
3
4
  /**
4
5
  * @package io.dcloud.uniapp.framework
@@ -11,6 +12,14 @@ declare class SliderChangeEventDetail {
11
12
  /**
12
13
  * @package io.dcloud.uniapp.framework
13
14
  */
14
- export declare class SliderChangeEvent extends CustomEvent<SliderChangeEventDetail> {
15
+ declare class SliderChangeEvent extends CustomEvent<SliderChangeEventDetail> {
15
16
  constructor (value: number)
16
17
  }
18
+
19
+ /**
20
+ * @package io.dcloud.uniapp.framework
21
+ */
22
+ declare class SliderElement extends DomNode {
23
+ get value(): number
24
+ set value(value: number)
25
+ }
@@ -11,6 +11,6 @@ declare class SwitchChangeEventDetail {
11
11
  /**
12
12
  * @package io.dcloud.uniapp.framework
13
13
  */
14
- export declare class SwitchChangeEvent extends CustomEvent<SwitchChangeEventDetail> {
14
+ declare class SwitchChangeEvent extends CustomEvent<SwitchChangeEventDetail> {
15
15
  constructor (value: boolean)
16
16
  }
@@ -0,0 +1,10 @@
1
+ /// <reference path='./types/native/UniError.d.ts' />
2
+ /// <reference path='./types/native/SourceError.d.ts' />
3
+ /// <reference path='./types/native/UniAggregateError.d.ts' />
4
+ /// <reference path='./types/uni/base/index.d.ts' />
5
+ /// <reference path='./types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/index.d.ts' />
6
+ /// <reference path='./types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/index.d.ts' />
7
+ /// <reference path='./types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/index.d.ts' />
8
+ /// <reference path='./types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts' />
9
+ /// <reference path='./types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts' />
10
+ /// <reference path='./types/uni/uts-plugin-api/lib/uni-storage/utssdk/index.d.ts' />
@@ -1,181 +0,0 @@
1
- /// <reference path="./Event.d.ts" />
2
-
3
- /**
4
- * @package io.dcloud.uniapp.runtime
5
- */
6
- interface INode {
7
- /**
8
- * 获取当前节点的的第一个子节点,如果节点是无子节点,则返回 null。
9
- */
10
- firstChild: INode | null
11
-
12
- /**
13
- * 获取当前节点的最后一个子节点,如果没有子节点,则返回 null。
14
- */
15
- lastChild: INode | null
16
-
17
- /**
18
- * 获取当前节点在 DOM 树中的父节点,如果没有父节点(如未添加到DOM树中),则返回null。
19
- */
20
- parentNode: INode | null
21
-
22
- /**
23
- * 获取当前节点的前一个同级节点,没有则返回null。
24
- */
25
- previousSibling: INode | null
26
-
27
- /**
28
- * 获取在 DOM 树中紧跟在其后面的同级节点,如果指定的节点为最后一个节点,则返回 null。
29
- */
30
- nextSibling: INode | null
31
-
32
- /**
33
- * 获取在 DOM 树中紧跟在其后面的同级节点,如果指定的节点为最后一个节点,则返回 null。
34
- * @autodoc false
35
- */
36
- nextElementSibling: INode | null
37
-
38
- /**
39
- * 获取当前节点包含的子节点的集合
40
- */
41
- childNodes: INode[]
42
-
43
- /**
44
- * 获取当前节点的标签名
45
- * @autodoc false
46
- */
47
- tagName: string
48
-
49
- /**
50
- * 获取当前节点的节点名称
51
- */
52
- nodeName: string
53
-
54
- /**
55
- * 获取当前节点的扩展参数
56
- * @autodoc false
57
- */
58
- ext: Map<string, any>
59
-
60
- /**
61
- * 获取节点上自定义数据属性(data-*)的集合
62
- */
63
- dataset: Map<string, any | null>
64
-
65
- /**
66
- * 获取节点上所有属性节点的集合
67
- */
68
- attributes: Map<string, any | null>
69
-
70
- /**
71
- * 获取节点的CSS样式对象
72
- */
73
- style: CSSStyleDeclaration
74
-
75
- /**
76
- * 表示节点的滚动视图高度
77
- */
78
- scrollHeight: number
79
-
80
- /**
81
- * 表示该节点横向滚动条距离最左的位移。
82
- */
83
- scrollLeft: number
84
-
85
- /**
86
- * 表示该节点纵向滚动条距离
87
- */
88
- scrollTop: number
89
-
90
- /**
91
- * 表示节点的滚动视图宽度
92
- */
93
- scrollWidth: Float
94
-
95
- /**
96
- * 获取节点标识。
97
- * @autoDoc false
98
- */
99
- getNodeId(): string
100
-
101
- /**
102
- * 将一个节点添加到指定父节点的子节点列表的末尾处。如果将被插入的节点已经存在于当前文档的文档树中,那么将会它从原先的位置移动到新的位置。
103
- */
104
- appendChild(aChild: INode): void
105
-
106
- /**
107
- * 在参考节点之前插入一个拥有指定父节点的子节点。如果给定的子节点是对文档中现有节点的引用,insertBefore() 会将其从当前位置移动到新位置。
108
- */
109
- insertBefore(newChild: INode, refChild: INode): void
110
-
111
- /**
112
- * 设置指定节点上的某个属性值。如果设置的属性已经存在,则更新该属性值;否则使用指定的名称和值添加一个新的属性。
113
- */
114
- setAttribute(key: string, value: any | null): void
115
-
116
- /**
117
- * 获取节点指定的属性值,如果指定的属性不存在则返回null。
118
- */
119
- getAttribute(key: string): any | null
120
-
121
- /**
122
- * 返回改节点是否包含有指定的属性,属性存在则返回true,否则返回false。
123
- */
124
- hasAttribute(key: string): boolean
125
-
126
- /**
127
- * 从节点中删除一个属性,如果指定的属性不存在,则不做任何操作,也不会产生错误。
128
- */
129
- removeAttribute(key: string): void
130
-
131
- /**
132
- * 更新节点的样式。
133
- * @autodoc false
134
- */
135
- updateStyle(map: Map<string, any>): void
136
-
137
- /**
138
- * 获取节点的大小及其相对于窗口的位置信息。
139
- */
140
- getBoundingClientRect(): DOMRect
141
-
142
- /**
143
- * 获取组件的绘制对象,仅uvue页面中的 view 组件支持,其它组件不支持则返回null。
144
- */
145
- getDrawableContext(): DrawableContext | null
146
-
147
- /**
148
- * 将指定的监听器注册到节点对象上,当该对象触发指定的事件时,指定的回调函数就会被执行。
149
- */
150
- addEventListener<T extends Event, R>(type: string, callback: (event: T) => R): void
151
-
152
- /**
153
- * 删除使用 addEventListener 方法添加的事件监听器。
154
- */
155
- removeEventListener(type: string): void
156
-
157
- /**
158
- * 从节点中删除一个子节点,返回删除的节点。
159
- */
160
- removeChild(aChild: INode): INode
161
-
162
- /**
163
- * 把节点对象从它所属的 DOM 树中删除。
164
- */
165
- remove(): void
166
-
167
- /**
168
- * 向一个指定的事件目标派发一个 Event,并以合适的顺序(同步地)调用此事件的监听器回调函数。
169
- */
170
- dispatchEvent(type: string, value: Event): void
171
-
172
- /**
173
- * 使界面滚动到给定元素的指定坐标位置
174
- */
175
- scrollTo(x: number, y: number): void
176
-
177
- /**
178
- * 使得元素滚动一段特定距离
179
- */
180
- scrollBy(x: number, y: number): void
181
- }
@@ -1,31 +0,0 @@
1
- import {
2
- ReadFileSuccessResult as ReadFileSuccessResultOrigin,
3
- ReadFileSuccessCallback as ReadFileSuccessCallbackOrigin,
4
- ReadFileFailCallback as ReadFileFailCallbackOrigin,
5
- ReadFileCompleteCallback as ReadFileCompleteCallbackOrigin,
6
- ReadFileOptions as ReadFileOptionsOrigin,
7
- WriteFileSuccessResult as WriteFileSuccessResultOrigin,
8
- WriteFileSuccessCallback as WriteFileSuccessCallbackOrigin,
9
- WriteFileFailCallback as WriteFileFailCallbackOrigin,
10
- WriteFileCompleteCallback as WriteFileCompleteCallbackOrigin,
11
- WriteFileOptions as WriteFileOptionsOrigin,
12
- FileSystemManager as FileSystemManagerOrigin,
13
- GetFileSystemManager as GetFileSystemManagerOrigin,
14
- Uni as UniOrigin
15
- } from './interface'
16
-
17
- declare global {
18
- type ReadFileSuccessResult = ReadFileSuccessResultOrigin
19
- type ReadFileSuccessCallback = ReadFileSuccessCallbackOrigin
20
- type ReadFileFailCallback = ReadFileFailCallbackOrigin
21
- type ReadFileCompleteCallback = ReadFileCompleteCallbackOrigin
22
- type ReadFileOptions = ReadFileOptionsOrigin
23
- type WriteFileSuccessResult = WriteFileSuccessResultOrigin
24
- type WriteFileSuccessCallback = WriteFileSuccessCallbackOrigin
25
- type WriteFileFailCallback = WriteFileFailCallbackOrigin
26
- type WriteFileCompleteCallback = WriteFileCompleteCallbackOrigin
27
- type WriteFileOptions = WriteFileOptionsOrigin
28
- type FileSystemManager = FileSystemManagerOrigin
29
- type GetFileSystemManager = GetFileSystemManagerOrigin
30
- interface Uni extends UniOrigin { }
31
- }
@@ -1,120 +0,0 @@
1
-
2
- /**
3
- * 过滤app基本信息,其中filter参数可设置为
4
- "appId",
5
- "appName",
6
- "appVersion",
7
- "appVersionCode",
8
- "appLanguage",
9
- "language",
10
- "version",
11
- "appWgtVersion",
12
- "hostLanguage",
13
- "hostVersion",
14
- "hostName",
15
- "hostPackageName",
16
- "hostSDKVersion",
17
- "hostTheme",
18
- */
19
- export type GetAppBaseInfoOptions = {
20
- filter: Array<string>
21
- };
22
-
23
- export type GetAppBaseInfoResult = {
24
- /**
25
- * manifest.json 中应用appid,即DCloud appid。
26
- */
27
- appId?: string,
28
- /**
29
- * manifest.json 中应用名称
30
- */
31
- appName?: string,
32
- /**
33
- * manifest.json 中应用版本名称。
34
- */
35
- appVersion?: string,
36
- /**
37
- * manifest.json 中应用版本名号。
38
- */
39
- appVersionCode?: string,
40
- /**
41
- * 应用设置的语言en、zh-Hans、zh-Hant、fr、es
42
- */
43
- appLanguage?: string,
44
- /**
45
- * 应用设置的语言
46
- */
47
- language?: string,
48
- /**
49
- * 引擎版本号
50
- */
51
- version?: string,
52
- /**
53
- * 应用资源(wgt)的版本名称。
54
- */
55
- appWgtVersion?: string,
56
- /**
57
- * 小程序宿主语言
58
- */
59
- hostLanguage?: string,
60
- /**
61
- * App、小程序宿主版本。
62
- */
63
- hostVersion?: string,
64
- /**
65
- * 小程序宿主名称
66
- */
67
- hostName?: string,
68
- /**
69
- * 小程序宿主包名
70
- */
71
- hostPackageName?: string,
72
- /**
73
- * uni小程序SDK版本、小程序客户端基础库版本
74
- */
75
- hostSDKVersion?: string,
76
- /**
77
- * 系统当前主题,取值为light或dark。微信小程序全局配置"darkmode":true时才能获取,否则为 undefined (不支持小游戏)
78
- */
79
- hostTheme?: string,
80
- /**
81
- * 是否uni-app x
82
- */
83
- isUniAppX: boolean
84
- }
85
-
86
-
87
- export type GetAppBaseInfo = (config?: GetAppBaseInfoOptions | null) => GetAppBaseInfoResult;
88
-
89
-
90
- export interface Uni {
91
- /**
92
- * GetAppBaseInfo(Object object)
93
- * @description
94
- * 获取app基本信息
95
- * @param {AppBaseInfoOptions} option
96
- * @return {object}
97
- * @tutorial https://uniapp.dcloud.net.cn/api/system/getAppBaseInfo.html
98
- * @uniPlatform {
99
- * "app": {
100
- * "android": {
101
- * "osVer": "4.4",
102
- * "uniVer": "√",
103
- * "unixVer": "3.9.0"
104
- * },
105
- * "ios": {
106
- * "osVer": "9.0",
107
- * "uniVer": "√",
108
- * "unixVer": "3.9.0"
109
- * }
110
- * }
111
- * }
112
- * @example
113
- ```typescript
114
- uni.getAppBaseInfo({
115
- filter:[]
116
- })
117
- ```
118
- */
119
- getAppBaseInfo: GetAppBaseInfo
120
- }
@@ -1,213 +0,0 @@
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: GetRecorderManager;
213
- }