@dcloudio/uni-app-x 0.5.5 → 0.5.6
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 +17 -8
- package/types/native/AsyncApiResult.d.ts +1 -1
- package/types/native/CSSStyleDeclaration.d.ts +2 -2
- package/types/native/DrawableContext.d.ts +2 -2
- package/types/native/Element.d.ts +36 -5
- package/types/native/IDocument.d.ts +2 -3
- package/types/native/IPage.d.ts +1 -1
- package/types/native/IUniError.d.ts +1 -1
- package/types/native/NodeData.d.ts +1 -1
- package/types/native/SnapshotOptions.d.ts +63 -0
- package/types/native/UniAppManager.d.ts +1 -1
- package/types/native/UniElement.d.ts +97 -0
- package/types/native/UniTabsElement.d.ts +86 -0
- package/types/native/UniTextElement.d.ts +13 -0
- package/types/native/UniVideoElement.d.ts +70 -0
- package/types/native/{IWebViewNode.d.ts → UniWebViewElement.d.ts} +5 -2
- package/types/native/WebViewDownloadEvent.d.ts +37 -0
- package/types/native/WebViewErrorEvent.d.ts +26 -7
- package/types/native/WebViewLoadedEvent.d.ts +15 -2
- package/types/native/WebViewLoadingEvent.d.ts +15 -2
- package/types/native/WebViewMessageEvent.d.ts +15 -7
- package/types/native/WebViewStyles.d.ts +20 -0
- package/types/native/index.d.ts +8 -4
- package/types/shims-vue.d.ts +4 -2
- package/types/uni/core/lib/base/event/interface.d.ts +3 -6
- package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +3 -2
- package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +4 -0
- package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +10 -1
- package/types/uni/core/lib/ui/tab-bar/interface.d.ts +4 -8
- package/types/uni/uts-plugin-api/index.d.ts +1 -2
- package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +86 -86
- package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +103 -103
- package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +52 -52
- package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +4 -4
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +82 -82
- package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +10 -10
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +59 -56
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +116 -97
- package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +4 -4
- package/types/uni/uts-plugin-api/lib/uni-push/utssdk/index.d.ts +55 -0
- package/types/uni/uts-plugin-api/lib/uni-push/utssdk/interface.d.ts +338 -0
- package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +39 -39
- package/types/uni-cloud/interface.d.ts +10 -10
- package/types/vue/CheckboxGroupChangeEvent.d.ts +13 -0
- package/types/vue/PickerViewChangeEvent.d.ts +13 -0
- package/types/vue/ProgressActiveendEvent.d.ts +7 -0
- package/types/vue/RadioGroupChangeEvent.d.ts +13 -0
- package/types/vue/SliderChangeEvent.d.ts +2 -2
- package/types/vue/SwitchChangeEvent.d.ts +7 -0
- package/types/vue/UniButtonElement.d.ts +7 -0
- package/types/vue/UniCloudDBElement.d.ts +213 -0
- package/types/vue/UniNavigatorElement.d.ts +7 -0
- package/types/vue/index.d.ts +3 -0
- package/types/native/DomNode.d.ts +0 -48
- package/types/native/ITabsNode.d.ts +0 -36
- package/types/uni/uts-plugin-api/lib/uni-audio/utssdk/index.d.ts +0 -17
- package/types/uni/uts-plugin-api/lib/uni-audio/utssdk/interface.d.ts +0 -804
- package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/index.d.ts +0 -15
- package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +0 -213
package/package.json
CHANGED
package/types/app.d.ts
CHANGED
|
@@ -137,6 +137,7 @@ interface AppInstance<T extends AnyObject = {}> {
|
|
|
137
137
|
/**
|
|
138
138
|
* 全局对象
|
|
139
139
|
* 文档:[https://uniapp.dcloud.io/collocation/App?id=globaldata](https://uniapp.dcloud.io/collocation/App?id=globaldata)
|
|
140
|
+
* @autodoc false
|
|
140
141
|
* @uniPlatform {
|
|
141
142
|
* "app": {
|
|
142
143
|
* "android": {
|
|
@@ -205,6 +206,7 @@ interface AppInstance<T extends AnyObject = {}> {
|
|
|
205
206
|
* 应用初始化完成时触发,全局只触发一次。
|
|
206
207
|
*
|
|
207
208
|
* @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
|
|
209
|
+
* @autodoc false
|
|
208
210
|
* @uniPlatform {
|
|
209
211
|
* "app": {
|
|
210
212
|
* "android": {
|
|
@@ -266,13 +268,14 @@ interface AppInstance<T extends AnyObject = {}> {
|
|
|
266
268
|
* }
|
|
267
269
|
*}
|
|
268
270
|
*/
|
|
269
|
-
onLaunch?(options
|
|
271
|
+
onLaunch?(options: OnLaunchOptions): void;
|
|
270
272
|
/**
|
|
271
273
|
* 生命周期回调 监听应用显示
|
|
272
274
|
*
|
|
273
275
|
* 应用启动,或从后台进入前台显示时触发
|
|
274
276
|
*
|
|
275
277
|
* @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
|
|
278
|
+
* @autodoc false
|
|
276
279
|
* @uniPlatform {
|
|
277
280
|
* "app": {
|
|
278
281
|
* "android": {
|
|
@@ -334,13 +337,14 @@ interface AppInstance<T extends AnyObject = {}> {
|
|
|
334
337
|
* }
|
|
335
338
|
*}
|
|
336
339
|
*/
|
|
337
|
-
onShow?(options
|
|
340
|
+
onShow?(options: OnShowOptions): void;
|
|
338
341
|
/**
|
|
339
342
|
* 生命周期回调 监听应用隐藏
|
|
340
343
|
*
|
|
341
344
|
* 应用从前台进入后台时触发
|
|
342
345
|
*
|
|
343
346
|
* @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
|
|
347
|
+
* @autodoc false
|
|
344
348
|
* @uniPlatform {
|
|
345
349
|
* "app": {
|
|
346
350
|
* "android": {
|
|
@@ -409,6 +413,7 @@ interface AppInstance<T extends AnyObject = {}> {
|
|
|
409
413
|
* @param error 错误信息,包含堆栈
|
|
410
414
|
*
|
|
411
415
|
* @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
|
|
416
|
+
* @autodoc false
|
|
412
417
|
* @uniPlatform {
|
|
413
418
|
* "app": {
|
|
414
419
|
* "android": {
|
|
@@ -481,6 +486,7 @@ interface AppInstance<T extends AnyObject = {}> {
|
|
|
481
486
|
* 2. 如果 `onPageNotFound` 回调中又重定向到另一个不存在的页面,将推入微信客户端原生的页面不存在提示页面,并且不再回调 `onPageNotFound`。
|
|
482
487
|
*
|
|
483
488
|
* @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
|
|
489
|
+
* @autodoc false
|
|
484
490
|
* @uniPlatform {
|
|
485
491
|
* "app": {
|
|
486
492
|
* "android": {
|
|
@@ -617,9 +623,9 @@ interface AppInstance<T extends AnyObject = {}> {
|
|
|
617
623
|
* }
|
|
618
624
|
*}
|
|
619
625
|
*/
|
|
620
|
-
|
|
626
|
+
|
|
621
627
|
// onUnhandledRejection?(options: UniNamespace.OnUnhandledRejectionCallbackResult): void;
|
|
622
|
-
|
|
628
|
+
|
|
623
629
|
/**
|
|
624
630
|
* 监听系统主题变化
|
|
625
631
|
*
|
|
@@ -696,13 +702,14 @@ interface AppInstance<T extends AnyObject = {}> {
|
|
|
696
702
|
*/
|
|
697
703
|
|
|
698
704
|
// onThemeChange?(options: UniNamespace.OnThemeChangeCallbackResult): void;
|
|
699
|
-
|
|
705
|
+
|
|
700
706
|
/**
|
|
701
707
|
* 监听 nvue 页面消息
|
|
702
708
|
*
|
|
703
709
|
* nvue 页面使用 `uni.postMessage` 发送消息时触发
|
|
704
710
|
*
|
|
705
711
|
* @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
|
|
712
|
+
* @autodoc false
|
|
706
713
|
* @uniPlatform {
|
|
707
714
|
* "app": {
|
|
708
715
|
* "android": {
|
|
@@ -778,6 +785,7 @@ interface AppInstance<T extends AnyObject = {}> {
|
|
|
778
785
|
* 监听应用退出。app-uvue-android 3.9+
|
|
779
786
|
*
|
|
780
787
|
* @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
|
|
788
|
+
* @autodoc false
|
|
781
789
|
* @uniPlatform {
|
|
782
790
|
* "app": {
|
|
783
791
|
* "android": {
|
|
@@ -853,6 +861,7 @@ interface AppInstance<T extends AnyObject = {}> {
|
|
|
853
861
|
* 最后一个页面按下Android back键,常用于自定义退出。app-uvue-android 3.9+
|
|
854
862
|
*
|
|
855
863
|
* @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
|
|
864
|
+
* @autodoc false
|
|
856
865
|
* @uniPlatform {
|
|
857
866
|
* "app": {
|
|
858
867
|
* "android": {
|
|
@@ -932,9 +941,9 @@ type AppConstructor = <T extends AnyObject & AppInstance>(
|
|
|
932
941
|
|
|
933
942
|
|
|
934
943
|
/**
|
|
935
|
-
* `getApp()`
|
|
936
|
-
* @tutorial https://uniapp.dcloud.net.cn/
|
|
944
|
+
* `getApp()` 函数用于获取当前应用实例,可通过应用实例调用 App.uvue methods 中定义的方法。
|
|
945
|
+
* @tutorial https://uniapp.dcloud.net.cn/tutorial/page.html#getapp
|
|
937
946
|
*/
|
|
938
|
-
type GetApp =
|
|
947
|
+
type GetApp = () => AppInstance;
|
|
939
948
|
|
|
940
949
|
declare const getApp: GetApp;
|
|
@@ -9,12 +9,12 @@ declare class CSSStyleDeclaration {
|
|
|
9
9
|
* @param name CSS样式名称
|
|
10
10
|
* @param value 要设置的新CSS样式值
|
|
11
11
|
*/
|
|
12
|
-
setProperty(name: string|
|
|
12
|
+
setProperty(name: string|string.cssPropertyString, value: any|null): void
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* 获取CSS指定的样式值,如果指定的样式不存在则返回null。
|
|
16
16
|
* @param property 要获取的CSS样式名称
|
|
17
17
|
*/
|
|
18
|
-
getPropertyValue(property: string|
|
|
18
|
+
getPropertyValue(property: string|string.cssPropertyString): any|null
|
|
19
19
|
|
|
20
20
|
}
|
|
@@ -12,7 +12,7 @@ declare class DrawableContext {
|
|
|
12
12
|
* 设置填充颜色
|
|
13
13
|
* @defaultValue #000 (黑色)
|
|
14
14
|
*/
|
|
15
|
-
fillStyle : string
|
|
15
|
+
fillStyle : string.ColorString
|
|
16
16
|
/**
|
|
17
17
|
* 指定如何绘制每一条线条末端的属性,可选值:`butt`线段末端以方形结束;`round`线段末端以圆形结束;`square`线段末端以方形结束,但是会增加一个一半宽度的矩形区域。
|
|
18
18
|
* @defaultValue butt
|
|
@@ -36,7 +36,7 @@ declare class DrawableContext {
|
|
|
36
36
|
* 设置边框的颜色
|
|
37
37
|
* @defaultValue #000 (黑色)
|
|
38
38
|
*/
|
|
39
|
-
strokeStyle : string
|
|
39
|
+
strokeStyle : string.ColorString
|
|
40
40
|
/**
|
|
41
41
|
* 设置文本的对齐方式,可取值:`left`左对齐;`center`居中对齐;`right`右对齐。
|
|
42
42
|
* @defaultValue left
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference path="./Event.d.ts" />
|
|
2
|
+
/// <reference path='./SnapshotOptions.d.ts' />
|
|
2
3
|
|
|
3
4
|
/**
|
|
5
|
+
* UVUE DOM 元素对象,描述了 UVUE DOM 元素所普通具有的属性和方法。
|
|
4
6
|
* @package io.dcloud.uniapp.runtime
|
|
5
7
|
*/
|
|
6
|
-
interface Element {
|
|
8
|
+
declare interface Element {
|
|
7
9
|
/**
|
|
8
10
|
* 获取当前元素的的第一个子元素,如果元素是无子元素,则返回 null。
|
|
9
11
|
*/
|
|
@@ -32,12 +34,12 @@ interface Element {
|
|
|
32
34
|
|
|
33
35
|
/**
|
|
34
36
|
* 获取在 DOM 树中紧跟在其后面的同级元素,如果指定的元素为最后一个元素,则返回 null。
|
|
37
|
+
* @autodoc false
|
|
35
38
|
*/
|
|
36
39
|
nextSibling: Element | null
|
|
37
40
|
|
|
38
41
|
/**
|
|
39
42
|
* 获取在 DOM 树中紧跟在其后面的同级元素,如果指定的元素为最后一个元素,则返回 null。
|
|
40
|
-
* @autodoc false
|
|
41
43
|
*/
|
|
42
44
|
nextElementSibling: Element | null
|
|
43
45
|
|
|
@@ -45,6 +47,11 @@ interface Element {
|
|
|
45
47
|
* 获取当前元素包含的子元素的集合
|
|
46
48
|
*/
|
|
47
49
|
children: Element[]
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 获取当前节点包含的子节点的集合
|
|
53
|
+
* @autodoc false
|
|
54
|
+
*/
|
|
48
55
|
childNodes: Element[]
|
|
49
56
|
|
|
50
57
|
/**
|
|
@@ -124,6 +131,29 @@ interface Element {
|
|
|
124
131
|
*/
|
|
125
132
|
getNodeId(): string
|
|
126
133
|
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* 对当前组件进行截图,调用此方法会将当前组件(包含子节点)渲染结果导出成图片
|
|
137
|
+
* 成功会返回图片对应的临时文件路径,目前默认png格式
|
|
138
|
+
*
|
|
139
|
+
* @param options 组件截图的参数对象
|
|
140
|
+
* @uniPlatform {
|
|
141
|
+
* "app": {
|
|
142
|
+
* "android": {
|
|
143
|
+
* "osVer": "5.0",
|
|
144
|
+
* "uniVer": "x",
|
|
145
|
+
* "unixVer": "3.93"
|
|
146
|
+
* },
|
|
147
|
+
* "ios": {
|
|
148
|
+
* "osVer": "x",
|
|
149
|
+
* "uniVer": "x",
|
|
150
|
+
* "unixVer": "x"
|
|
151
|
+
* }
|
|
152
|
+
* }
|
|
153
|
+
* }
|
|
154
|
+
*/
|
|
155
|
+
takeSnapshot(options: TakeSnapshotOptions):void
|
|
156
|
+
|
|
127
157
|
/**
|
|
128
158
|
* 将一个元素添加到指定父元素的子元素列表的末尾处。如果将被插入的元素已经存在于当前文档的文档树中,那么将会它从原先的位置移动到新的位置。
|
|
129
159
|
* @param {Element} aChild 插入子元素对象
|
|
@@ -140,15 +170,15 @@ interface Element {
|
|
|
140
170
|
/**
|
|
141
171
|
* 设置指定元素上的某个属性值。如果设置的属性已经存在,则更新该属性值;否则使用指定的名称和值添加一个新的属性。
|
|
142
172
|
* @param {string} key 属性名称
|
|
143
|
-
* @param {
|
|
173
|
+
* @param {string} value 属性值域
|
|
144
174
|
*/
|
|
145
|
-
setAttribute(key: string, value:
|
|
175
|
+
setAttribute(key: string, value: string): void
|
|
146
176
|
|
|
147
177
|
/**
|
|
148
178
|
* 获取元素指定的属性值,如果指定的属性不存在则返回null。
|
|
149
179
|
* @param {string} key 属性名称
|
|
150
180
|
*/
|
|
151
|
-
getAttribute(key: string):
|
|
181
|
+
getAttribute(key: string): string | null
|
|
152
182
|
|
|
153
183
|
/**
|
|
154
184
|
* 返回改元素是否包含有指定的属性,属性存在则返回true,否则返回false。
|
|
@@ -236,3 +266,4 @@ interface Element {
|
|
|
236
266
|
}
|
|
237
267
|
|
|
238
268
|
type INode = Element
|
|
269
|
+
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/// <reference path='./Element.d.ts' />
|
|
2
|
-
/// <reference path='./ITabsNode.d.ts' />
|
|
3
2
|
/// <reference path='./NodeData.d.ts' />
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* @package io.dcloud.uniapp.runtime
|
|
7
6
|
* @autodoc false
|
|
8
7
|
*/
|
|
9
|
-
interface IDocument extends Element {
|
|
8
|
+
declare interface IDocument extends Element {
|
|
10
9
|
body: Element
|
|
11
10
|
|
|
12
|
-
getRealDomNodeById<T>(tag: string):
|
|
11
|
+
getRealDomNodeById<T>(tag: string): T | null
|
|
13
12
|
|
|
14
13
|
startRender(): unknown
|
|
15
14
|
|
package/types/native/IPage.d.ts
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 组件截图成功的返回数据
|
|
3
|
+
*/
|
|
4
|
+
declare type TakeSnapshotSuccess = {
|
|
5
|
+
/**
|
|
6
|
+
* 截图保存的临时文件路径
|
|
7
|
+
*/
|
|
8
|
+
tempFilePath: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 组件截图失败的返回数据
|
|
13
|
+
*/
|
|
14
|
+
declare type TakeSnapshotFail = {
|
|
15
|
+
errMsg: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 成功回调函数定义
|
|
21
|
+
*/
|
|
22
|
+
declare type TakeSnapshotSuccessCallback = (res: TakeSnapshotSuccess) => void
|
|
23
|
+
/**
|
|
24
|
+
* 失败回调函数定义
|
|
25
|
+
*/
|
|
26
|
+
declare type TakeSnapshotFailCallback = (res: TakeSnapshotFail) => void
|
|
27
|
+
/**
|
|
28
|
+
* 完成回调函数定义
|
|
29
|
+
*/
|
|
30
|
+
declare type TakeSnapshotCompleteCallback = (res: any) => void
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 组件截图的参数配置选项
|
|
34
|
+
*/
|
|
35
|
+
declare class TakeSnapshotOptions{
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 截图导出类型,目前仅支持 'file' 保存到临时文件目录
|
|
39
|
+
* @default "file"
|
|
40
|
+
*/
|
|
41
|
+
type : string
|
|
42
|
+
/**
|
|
43
|
+
* 截图文件格式,目前仅支持 'png'
|
|
44
|
+
* @default "png"
|
|
45
|
+
*/
|
|
46
|
+
format : string
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 接口调用成功的回调函数
|
|
50
|
+
*/
|
|
51
|
+
success?: TakeSnapshotSuccessCallback | null
|
|
52
|
+
/**
|
|
53
|
+
* 接口调用失败的回调函数
|
|
54
|
+
*/
|
|
55
|
+
fail?: TakeSnapshotFailCallback | null
|
|
56
|
+
/**
|
|
57
|
+
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
|
58
|
+
*/
|
|
59
|
+
complete?: TakeSnapshotCompleteCallback | null
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/// <reference path='./Element.d.ts' />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* view元素对象
|
|
5
|
+
* @package io.dcloud.uniapp.runtime
|
|
6
|
+
* @autodoc false
|
|
7
|
+
*/
|
|
8
|
+
declare interface UniElement extends Element {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* view元素对象
|
|
13
|
+
* @package io.dcloud.uniapp.runtime
|
|
14
|
+
* @autodoc false
|
|
15
|
+
*/
|
|
16
|
+
declare interface UniViewElement extends UniElement {
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* scroll-view元素对象
|
|
21
|
+
* @package io.dcloud.uniapp.runtime
|
|
22
|
+
* @autodoc false
|
|
23
|
+
*/
|
|
24
|
+
declare interface UniScrollViewElement extends UniElement {
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* list-view元素对象
|
|
29
|
+
* @package io.dcloud.uniapp.runtime
|
|
30
|
+
* @autodoc false
|
|
31
|
+
*/
|
|
32
|
+
declare interface UniListViewElement extends UniScrollViewElement{
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* list-item元素对象
|
|
37
|
+
* @package io.dcloud.uniapp.runtime
|
|
38
|
+
* @autodoc false
|
|
39
|
+
*/
|
|
40
|
+
declare interface UniListItemElement extends UniElement {
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* swiper元素对象
|
|
45
|
+
* @package io.dcloud.uniapp.runtime
|
|
46
|
+
* @autodoc false
|
|
47
|
+
*/
|
|
48
|
+
declare interface UniSwiperElement extends UniElement {
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* swiper-item元素对象
|
|
53
|
+
* @package io.dcloud.uniapp.runtime
|
|
54
|
+
* @autodoc false
|
|
55
|
+
*/
|
|
56
|
+
declare interface UniSwiperItemElement extends UniElement {
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* image元素对象
|
|
61
|
+
* @package io.dcloud.uniapp.runtime
|
|
62
|
+
* @autodoc false
|
|
63
|
+
*/
|
|
64
|
+
declare interface UniImageElement extends UniElement {
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* input元素对象
|
|
69
|
+
* @package io.dcloud.uniapp.runtime
|
|
70
|
+
* @autodoc false
|
|
71
|
+
*/
|
|
72
|
+
declare interface UniInputElement extends UniElement {
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* textarea元素对象
|
|
77
|
+
* @package io.dcloud.uniapp.runtime
|
|
78
|
+
* @autodoc false
|
|
79
|
+
*/
|
|
80
|
+
declare interface UniTextareaElement extends UniElement {
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* rich-text元素对象
|
|
85
|
+
* @package io.dcloud.uniapp.runtime
|
|
86
|
+
* @autodoc false
|
|
87
|
+
*/
|
|
88
|
+
declare interface UniRichTextElement extends UniElement {
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* sticky-header元素对象
|
|
93
|
+
* @package io.dcloud.uniapp.runtime
|
|
94
|
+
* @autodoc false
|
|
95
|
+
*/
|
|
96
|
+
declare interface UniStickyHeaderElement extends UniElement {
|
|
97
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/// <reference path='./UniElement.d.ts' />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* tabs元素对象
|
|
5
|
+
* @package io.dcloud.uniapp.runtime
|
|
6
|
+
* @autodoc false
|
|
7
|
+
*/
|
|
8
|
+
declare interface UniTabsElement extends UniElement {
|
|
9
|
+
/**
|
|
10
|
+
* 添加item
|
|
11
|
+
* @param pageId 页面id
|
|
12
|
+
*/
|
|
13
|
+
appendItem(pageId: string): void
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 添加item
|
|
17
|
+
* @param itemElement item的元素对象
|
|
18
|
+
*/
|
|
19
|
+
appendItem(itemElement: Element): void
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 初始化tabBar
|
|
23
|
+
*/
|
|
24
|
+
initTabBar(style: Map<string, any | null>): void
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 添加自定义tabBar
|
|
28
|
+
* @param tabBar tabBar元素
|
|
29
|
+
* @param direction 排列方向
|
|
30
|
+
*/
|
|
31
|
+
appendCustomTabBar(tabBar: Element, direction: string): void
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* item选中高亮
|
|
35
|
+
* @param 被选中页面id
|
|
36
|
+
* @index item下标
|
|
37
|
+
*/
|
|
38
|
+
switchSelect(pageId: string, index: number): void
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 隐藏TabBar
|
|
42
|
+
*/
|
|
43
|
+
hideTabBar(op: Map<string, any | null>): void
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 显示tabBar
|
|
47
|
+
*/
|
|
48
|
+
showTabBar(op: Map<string, any | null>): void
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 为 tabBar 某一项的右上角添加文本
|
|
52
|
+
*/
|
|
53
|
+
setTabBarBadge(op: Map<string, any | null>): void
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 移除 tabBar 某一项右上角的文本
|
|
57
|
+
*/
|
|
58
|
+
removeTabBarBadge(op: Map<string, any | null>): void
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 显示 tabBar 某一项的右上角的红点
|
|
62
|
+
*/
|
|
63
|
+
showTabBarRedDot(op: Map<string, any | null>): void
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 隐藏 tabBar 某一项的右上角的红点
|
|
67
|
+
*/
|
|
68
|
+
hideTabBarRedDot(op: Map<string, any | null>): void
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 动态设置 tabBar 的整体样式
|
|
72
|
+
*/
|
|
73
|
+
setTabBarStyle(op: Map<string, any | null>): void
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 动态设置 tabBar 某一项的内容
|
|
77
|
+
*/
|
|
78
|
+
setTabBarItem(op: Map<string, any | null>): void
|
|
79
|
+
/**
|
|
80
|
+
* tabBar是否隐藏
|
|
81
|
+
*/
|
|
82
|
+
isTabBarVisible: boolean
|
|
83
|
+
currentItemId: string | null
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
type ITabsNode = UniTabsElement
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/// <reference path='./Element.d.ts' />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* video元素对象
|
|
5
|
+
* @package io.dcloud.uniapp.runtime
|
|
6
|
+
* @autodoc false
|
|
7
|
+
*/
|
|
8
|
+
declare interface UniVideoElement extends Element {
|
|
9
|
+
/**
|
|
10
|
+
* 播放
|
|
11
|
+
*/
|
|
12
|
+
play(): void
|
|
13
|
+
/**
|
|
14
|
+
* 暂停
|
|
15
|
+
*/
|
|
16
|
+
pause(): void
|
|
17
|
+
/**
|
|
18
|
+
* 跳转到指定位置
|
|
19
|
+
* @param {number} position 跳转到指定位置(秒)
|
|
20
|
+
*/
|
|
21
|
+
seek(position: number): void
|
|
22
|
+
/**
|
|
23
|
+
* 停止视频
|
|
24
|
+
*/
|
|
25
|
+
stop(): void
|
|
26
|
+
/**
|
|
27
|
+
* 发送弹幕
|
|
28
|
+
* @param {Danmu} danmu 弹幕数据
|
|
29
|
+
*/
|
|
30
|
+
sendDanmu(danmu: Danmu): void
|
|
31
|
+
/**
|
|
32
|
+
* 设置倍速播放
|
|
33
|
+
* @param {number} rate 支持倍率 0.5/0.8/1.0/1.25/1.5
|
|
34
|
+
*/
|
|
35
|
+
playbackRate(rate: number): void
|
|
36
|
+
/**
|
|
37
|
+
* 进入全屏
|
|
38
|
+
* @param {RequestFullScreenOptions} direction 0|正常竖向, 90|屏幕逆时针90度, -90|屏幕顺时针90度
|
|
39
|
+
*/
|
|
40
|
+
requestFullScreen(direction: RequestFullScreenOptions | null): void
|
|
41
|
+
/**
|
|
42
|
+
* 退出全屏
|
|
43
|
+
*/
|
|
44
|
+
exitFullScreen(): void
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare type Danmu = {
|
|
48
|
+
/**
|
|
49
|
+
* 弹幕文字
|
|
50
|
+
*/
|
|
51
|
+
text: string | null
|
|
52
|
+
/**
|
|
53
|
+
* 弹幕颜色
|
|
54
|
+
*/
|
|
55
|
+
color: string | null
|
|
56
|
+
/**
|
|
57
|
+
* 显示时刻
|
|
58
|
+
*/
|
|
59
|
+
time: number | null
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare type RequestFullScreenOptions = {
|
|
63
|
+
/**
|
|
64
|
+
* direction
|
|
65
|
+
* - 0: 正常竖向
|
|
66
|
+
* - 90: 屏幕逆时针90度
|
|
67
|
+
* - -90: 屏幕顺时针90度
|
|
68
|
+
*/
|
|
69
|
+
direction: number | null
|
|
70
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/// <reference path='./
|
|
1
|
+
/// <reference path='./UniElement.d.ts' />
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
+
* web-view元素对象
|
|
4
5
|
* @package io.dcloud.uniapp.runtime
|
|
5
6
|
* @autodoc false
|
|
6
7
|
*/
|
|
7
|
-
interface
|
|
8
|
+
declare interface UniWebViewElement extends UniElement {
|
|
8
9
|
/**
|
|
9
10
|
* 后退
|
|
10
11
|
*/
|
|
@@ -26,3 +27,5 @@ interface IWebViewNode extends Element {
|
|
|
26
27
|
*/
|
|
27
28
|
evalJS(js: string): void
|
|
28
29
|
}
|
|
30
|
+
|
|
31
|
+
type IWebViewNode = UniWebViewElement
|