@dcloudio/uni-app-x 0.5.4 → 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.
Files changed (62) hide show
  1. package/package.json +1 -1
  2. package/types/app.d.ts +17 -8
  3. package/types/native/AsyncApiResult.d.ts +1 -1
  4. package/types/native/CSSStyleDeclaration.d.ts +2 -2
  5. package/types/native/DrawableContext.d.ts +2 -2
  6. package/types/native/Element.d.ts +52 -17
  7. package/types/native/IDocument.d.ts +2 -3
  8. package/types/native/IPage.d.ts +1 -1
  9. package/types/native/IUniError.d.ts +1 -1
  10. package/types/native/NodeData.d.ts +1 -1
  11. package/types/native/SnapshotOptions.d.ts +63 -0
  12. package/types/native/UniAppManager.d.ts +1 -1
  13. package/types/native/UniElement.d.ts +97 -0
  14. package/types/native/UniTabsElement.d.ts +86 -0
  15. package/types/native/UniTextElement.d.ts +13 -0
  16. package/types/native/UniVideoElement.d.ts +70 -0
  17. package/types/native/{IWebViewNode.d.ts → UniWebViewElement.d.ts} +5 -2
  18. package/types/native/WebViewDownloadEvent.d.ts +37 -0
  19. package/types/native/WebViewErrorEvent.d.ts +26 -7
  20. package/types/native/WebViewLoadedEvent.d.ts +15 -2
  21. package/types/native/WebViewLoadingEvent.d.ts +15 -2
  22. package/types/native/WebViewMessageEvent.d.ts +15 -7
  23. package/types/native/WebViewStyles.d.ts +20 -0
  24. package/types/native/index.d.ts +8 -4
  25. package/types/shims-vue.d.ts +4 -2
  26. package/types/uni/core/lib/base/event/interface.d.ts +3 -6
  27. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +3 -2
  28. package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +4 -0
  29. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +10 -1
  30. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +4 -8
  31. package/types/uni/uts-plugin-api/index.d.ts +1 -2
  32. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +2 -2
  33. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +86 -86
  34. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +103 -103
  35. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +52 -52
  36. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +4 -4
  37. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +82 -82
  38. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +2 -2
  39. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +10 -10
  40. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +59 -56
  41. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +116 -97
  42. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +4 -4
  43. package/types/uni/uts-plugin-api/lib/uni-push/utssdk/index.d.ts +55 -0
  44. package/types/uni/uts-plugin-api/lib/uni-push/utssdk/interface.d.ts +338 -0
  45. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +39 -39
  46. package/types/uni-cloud/interface.d.ts +10 -10
  47. package/types/vue/CheckboxGroupChangeEvent.d.ts +13 -0
  48. package/types/vue/PickerViewChangeEvent.d.ts +13 -0
  49. package/types/vue/ProgressActiveendEvent.d.ts +7 -0
  50. package/types/vue/RadioGroupChangeEvent.d.ts +13 -0
  51. package/types/vue/SliderChangeEvent.d.ts +2 -2
  52. package/types/vue/SwitchChangeEvent.d.ts +7 -0
  53. package/types/vue/UniButtonElement.d.ts +7 -0
  54. package/types/vue/UniCloudDBElement.d.ts +213 -0
  55. package/types/vue/UniNavigatorElement.d.ts +7 -0
  56. package/types/vue/index.d.ts +3 -0
  57. package/types/native/DomNode.d.ts +0 -48
  58. package/types/native/ITabsNode.d.ts +0 -36
  59. package/types/uni/uts-plugin-api/lib/uni-audio/utssdk/index.d.ts +0 -17
  60. package/types/uni/uts-plugin-api/lib/uni-audio/utssdk/interface.d.ts +0 -804
  61. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/index.d.ts +0 -15
  62. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +0 -213
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "author": "DCloud",
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?: OnLaunchOptions): void;
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?: OnShowOptions): void;
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/uni-app-x/api/getapp.html#getapp
944
+ * `getApp()` 函数用于获取当前应用实例,可通过应用实例调用 App.uvue methods 中定义的方法。
945
+ * @tutorial https://uniapp.dcloud.net.cn/tutorial/page.html#getapp
937
946
  */
938
- type GetApp = <T extends AnyObject>() => AppInstance<T> & T;
947
+ type GetApp = () => AppInstance;
939
948
 
940
949
  declare const getApp: GetApp;
@@ -2,6 +2,6 @@
2
2
  * @package io.dcloud.uniapp
3
3
  * @autodoc false
4
4
  */
5
- interface AsyncApiResult {
5
+ declare interface AsyncApiResult {
6
6
  errMsg: string
7
7
  }
@@ -9,12 +9,12 @@ declare class CSSStyleDeclaration {
9
9
  * @param name CSS样式名称
10
10
  * @param value 要设置的新CSS样式值
11
11
  */
12
- setProperty(name: string|HBuilderX.cssPropertyString, value: any|null): void
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|HBuilderX.cssPropertyString): any|null
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
  */
@@ -19,7 +21,7 @@ interface Element {
19
21
  * @autodoc false
20
22
  */
21
23
  parentNode: Element | null
22
-
24
+
23
25
  /**
24
26
  * 获取当前元素在 DOM 树中的父元素,如果没有父元素(如未添加到DOM树中),则返回null。
25
27
  */
@@ -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
 
@@ -46,6 +48,12 @@ interface Element {
46
48
  */
47
49
  children: Element[]
48
50
 
51
+ /**
52
+ * 获取当前节点包含的子节点的集合
53
+ * @autodoc false
54
+ */
55
+ childNodes: Element[]
56
+
49
57
  /**
50
58
  * 获取当前元素的标签名
51
59
  */
@@ -96,22 +104,22 @@ interface Element {
96
104
  * 元素的左边界偏移值 单位px
97
105
  */
98
106
  offsetLeft: number
99
-
107
+
100
108
  /**
101
109
  * 元素的右边界偏移值 单位px
102
110
  */
103
111
  offsetTop: number
104
-
112
+
105
113
  /**
106
114
  * 元素高度 单位px
107
115
  */
108
116
  offsetWidth: number
109
-
117
+
110
118
  /**
111
119
  * 元素宽度 单位px
112
120
  */
113
121
  offsetHeight: number
114
-
122
+
115
123
  /**
116
124
  * 扩展属性
117
125
  */
@@ -123,6 +131,29 @@ interface Element {
123
131
  */
124
132
  getNodeId(): string
125
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
+
126
157
  /**
127
158
  * 将一个元素添加到指定父元素的子元素列表的末尾处。如果将被插入的元素已经存在于当前文档的文档树中,那么将会它从原先的位置移动到新的位置。
128
159
  * @param {Element} aChild 插入子元素对象
@@ -131,23 +162,23 @@ interface Element {
131
162
 
132
163
  /**
133
164
  * 在参考元素之前插入一个拥有指定父元素的子元素。如果给定的子元素是对文档中现有元素的引用,insertBefore() 会将其从当前位置移动到新位置。
134
- * @param {Element} newChild 插入子元素对象
135
- * @param {Element} refChild 已存在父元素的子元素对象
165
+ * @param newChild 插入子元素对象
166
+ * @param refChild 已存在父元素的子元素对象
136
167
  */
137
- insertBefore(newChild: Element, refChild: Element): void
168
+ insertBefore(newChild: Element, refChild?: Element | null): void
138
169
 
139
170
  /**
140
171
  * 设置指定元素上的某个属性值。如果设置的属性已经存在,则更新该属性值;否则使用指定的名称和值添加一个新的属性。
141
172
  * @param {string} key 属性名称
142
- * @param {any | null} value 属性值域 可为空
173
+ * @param {string} value 属性值域
143
174
  */
144
- setAttribute(key: string, value: any | null): void
175
+ setAttribute(key: string, value: string): void
145
176
 
146
177
  /**
147
178
  * 获取元素指定的属性值,如果指定的属性不存在则返回null。
148
179
  * @param {string} key 属性名称
149
180
  */
150
- getAttribute(key: string): any | null
181
+ getAttribute(key: string): string | null
151
182
 
152
183
  /**
153
184
  * 返回改元素是否包含有指定的属性,属性存在则返回true,否则返回false。
@@ -186,9 +217,10 @@ interface Element {
186
217
 
187
218
  /**
188
219
  * 删除使用 addEventListener 方法添加的事件监听器。
189
- * @param {string} type 事件类型
220
+ * @param type 事件类型
221
+ * @param callback 事件监听器 T表示event类型,R表示返回值类型
190
222
  */
191
- removeEventListener(type: string): void
223
+ removeEventListener<T extends Event, R>(type: string, callback?: ((event: T) => R) | null): void
192
224
 
193
225
  /**
194
226
  * 从元素中删除一个子元素,返回删除的元素。
@@ -221,14 +253,17 @@ interface Element {
221
253
  * @param {number} y y轴要滚动的距离(单位px)
222
254
  */
223
255
  scrollBy(x: number, y: number): void
224
-
256
+
225
257
  /**
226
258
  * 使元素获取焦点 仅input、Textarea组件支持
227
259
  */
228
260
  focus(): void
229
-
261
+
230
262
  /**
231
263
  * 使元素丢失焦点 仅input、Textarea组件支持
232
264
  */
233
265
  blur(): void
234
266
  }
267
+
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): ITabsNode | null
11
+ getRealDomNodeById<T>(tag: string): T | null
13
12
 
14
13
  startRender(): unknown
15
14
 
@@ -5,7 +5,7 @@
5
5
  * @package io.dcloud.uniapp.runtime
6
6
  * @autodoc false
7
7
  */
8
- interface IPage {
8
+ declare interface IPage {
9
9
  /**
10
10
  * 页面id
11
11
  */
@@ -1,6 +1,6 @@
1
1
  /// <reference path="./AsyncApiResult.d.ts" />
2
2
 
3
- interface IUniError extends AsyncApiResult {
3
+ declare interface IUniError extends AsyncApiResult {
4
4
  /**
5
5
  * 统一错误码
6
6
  */
@@ -2,7 +2,7 @@
2
2
  * @package io.dcloud.uniapp.interfaces
3
3
  * @autodoc false
4
4
  */
5
- interface INodeData {
5
+ declare interface INodeData {
6
6
  id: string
7
7
  name: string
8
8
  attrs?: Map<string, any | null>
@@ -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
+
@@ -8,7 +8,7 @@ declare const UniAppManager: {
8
8
  getCurrentApp(): CurrentApp
9
9
  }
10
10
 
11
- interface CurrentApp {
11
+ declare interface CurrentApp {
12
12
  pageManager: {
13
13
  createPage(url: string, id: unknown, styles: unknown): IPage
14
14
  }
@@ -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,13 @@
1
+ /// <reference path='./UniElement.d.ts' />
2
+
3
+ /**
4
+ * text元素对象
5
+ * @package io.dcloud.uniapp.runtime
6
+ * @autodoc false
7
+ */
8
+ declare interface UniTextElement extends UniElement {
9
+ /**
10
+ * text元素的文案内容
11
+ */
12
+ value: string
13
+ }