@dcloudio/uni-app-x 0.7.7 → 0.7.8

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 (215) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +1 -1
  3. package/options.d.ts +9 -9
  4. package/package.json +27 -27
  5. package/types/app.d.ts +843 -843
  6. package/types/index.d.ts +7 -7
  7. package/types/native/AsyncApiResult.d.ts +7 -7
  8. package/types/native/CSSStyleDeclaration.d.ts +25 -25
  9. package/types/native/DOMRect.d.ts +56 -56
  10. package/types/native/DrawableContext.d.ts +162 -162
  11. package/types/native/INavigationBar.d.ts +22 -22
  12. package/types/native/IUniElement.d.ts +762 -755
  13. package/types/native/IUniError.d.ts +20 -20
  14. package/types/native/IUniForm.d.ts +9 -9
  15. package/types/native/NativeLoadFontFaceOptions.d.ts +11 -11
  16. package/types/native/NodeData.d.ts +22 -22
  17. package/types/native/PageNode.d.ts +6 -6
  18. package/types/native/SnapshotOptions.d.ts +63 -63
  19. package/types/native/SourceError.d.ts +46 -46
  20. package/types/native/UTSAndroidHookProxy.d.ts +14 -14
  21. package/types/native/UniAggregateError.d.ts +19 -19
  22. package/types/native/UniApp.d.ts +66 -66
  23. package/types/native/UniCallbackWrapper.d.ts +7 -7
  24. package/types/native/UniCustomEvent.d.ts +24 -24
  25. package/types/native/UniDocument.d.ts +35 -35
  26. package/types/native/UniElement.d.ts +74 -74
  27. package/types/native/UniError.d.ts +70 -70
  28. package/types/native/UniEvent.d.ts +62 -62
  29. package/types/native/UniFormControl.d.ts +8 -8
  30. package/types/native/UniFormControlElement.d.ts +14 -14
  31. package/types/native/UniImageErrorEvent.d.ts +15 -15
  32. package/types/native/UniImageLoadEvent.d.ts +19 -19
  33. package/types/native/UniInputBlurEvent.d.ts +19 -19
  34. package/types/native/UniInputConfirmEvent.d.ts +15 -15
  35. package/types/native/UniInputEvent.d.ts +33 -24
  36. package/types/native/UniInputFocusEvent.d.ts +33 -33
  37. package/types/native/{UniPage.d.ts → UniNativePage.d.ts} +141 -96
  38. package/types/native/UniPageEvent.d.ts +10 -10
  39. package/types/native/UniPageManager.d.ts +17 -17
  40. package/types/native/UniPageScrollEvent.d.ts +13 -13
  41. package/types/native/UniPointerEvent.d.ts +74 -73
  42. package/types/native/UniRefresherEvent.d.ts +18 -14
  43. package/types/native/UniResizeEvent.d.ts +34 -34
  44. package/types/native/UniRichTextItemClickEvent.d.ts +23 -23
  45. package/types/native/UniScrollEvent.d.ts +42 -36
  46. package/types/native/UniScrollToLowerEvent.d.ts +23 -16
  47. package/types/native/UniScrollToUpperEvent.d.ts +23 -16
  48. package/types/native/UniStartNestedScrollEvent.d.ts +33 -33
  49. package/types/native/UniStopNestedScrollEvent.d.ts +28 -28
  50. package/types/native/UniSwiperAnimationFinishEvent.d.ts +19 -19
  51. package/types/native/UniSwiperChangeEvent.d.ts +19 -19
  52. package/types/native/UniSwiperTransitionEvent.d.ts +19 -19
  53. package/types/native/UniTabTapEvent.d.ts +18 -18
  54. package/types/native/UniTabsElement.d.ts +29 -29
  55. package/types/native/UniTextElement.d.ts +17 -17
  56. package/types/native/UniTextareaFocusEvent.d.ts +34 -34
  57. package/types/native/UniTouchEvent.d.ts +64 -60
  58. package/types/native/UniVideoElement.d.ts +70 -70
  59. package/types/native/UniWebViewDownloadEvent.d.ts +42 -42
  60. package/types/native/UniWebViewElement.d.ts +10 -10
  61. package/types/native/UniWebViewErrorEvent.d.ts +37 -37
  62. package/types/native/UniWebViewLoadEvent.d.ts +26 -26
  63. package/types/native/UniWebViewLoadingEvent.d.ts +27 -27
  64. package/types/native/UniWebViewMessageEvent.d.ts +26 -26
  65. package/types/native/UniWebViewServiceMessageEvent.d.ts +8 -8
  66. package/types/native/ViewToTempFilePathOptions.d.ts +47 -47
  67. package/types/native/WebViewStyles.d.ts +20 -20
  68. package/types/native/global.d.ts +446 -429
  69. package/types/native/index.d.ts +65 -65
  70. package/types/native-global/index.d.ts +1 -1
  71. package/types/page.d.ts +1593 -1593
  72. package/types/process.d.ts +5 -5
  73. package/types/uni/base/index.d.ts +3 -3
  74. package/types/uni/core/global.d.ts +13 -13
  75. package/types/uni/core/index.d.ts +13 -13
  76. package/types/uni/core/lib/base/event/global.d.ts +16 -16
  77. package/types/uni/core/lib/base/event/index.d.ts +7 -7
  78. package/types/uni/core/lib/base/event/interface.d.ts +277 -277
  79. package/types/uni/core/lib/base/interceptor/global.d.ts +18 -18
  80. package/types/uni/core/lib/base/interceptor/index.d.ts +8 -8
  81. package/types/uni/core/lib/base/interceptor/interface.d.ts +150 -150
  82. package/types/uni/core/lib/interface.d.ts +28 -28
  83. package/types/uni/core/lib/lifecycle/global.d.ts +10 -10
  84. package/types/uni/core/lib/lifecycle/index.d.ts +4 -4
  85. package/types/uni/core/lib/lifecycle/interface.d.ts +37 -37
  86. package/types/uni/core/lib/performance/global.d.ts +22 -22
  87. package/types/uni/core/lib/performance/index.d.ts +10 -10
  88. package/types/uni/core/lib/performance/interface.d.ts +157 -157
  89. package/types/uni/core/lib/route/global.d.ts +68 -68
  90. package/types/uni/core/lib/route/index.d.ts +33 -33
  91. package/types/uni/core/lib/route/interface.d.ts +2031 -2031
  92. package/types/uni/core/lib/ui/create-selector-query/global.d.ts +20 -20
  93. package/types/uni/core/lib/ui/create-selector-query/index.d.ts +9 -9
  94. package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +412 -412
  95. package/types/uni/core/lib/ui/get-element-by-id/global.d.ts +10 -10
  96. package/types/uni/core/lib/ui/get-element-by-id/index.d.ts +4 -4
  97. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +73 -73
  98. package/types/uni/core/lib/ui/load-font-face/global.d.ts +26 -26
  99. package/types/uni/core/lib/ui/load-font-face/index.d.ts +12 -12
  100. package/types/uni/core/lib/ui/load-font-face/interface.d.ts +560 -560
  101. package/types/uni/core/lib/ui/page-scroll-to/global.d.ts +26 -26
  102. package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +12 -12
  103. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +145 -145
  104. package/types/uni/core/lib/ui/pull-down-refresh/global.d.ts +28 -28
  105. package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +13 -13
  106. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +176 -176
  107. package/types/uni/core/lib/ui/set-navigation-bar-color/global.d.ts +28 -28
  108. package/types/uni/core/lib/ui/set-navigation-bar-color/index.d.ts +13 -13
  109. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +431 -431
  110. package/types/uni/core/lib/ui/set-navigation-bar-title/global.d.ts +28 -28
  111. package/types/uni/core/lib/ui/set-navigation-bar-title/index.d.ts +13 -13
  112. package/types/uni/core/lib/ui/set-navigation-bar-title/interface.d.ts +368 -368
  113. package/types/uni/core/lib/ui/tab-bar/global.d.ts +130 -130
  114. package/types/uni/core/lib/ui/tab-bar/index.d.ts +64 -64
  115. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +928 -928
  116. package/types/uni/env/index.d.ts +64 -64
  117. package/types/uni/global.d.ts +6 -6
  118. package/types/uni/index.d.ts +3 -3
  119. package/types/uni/uts-plugin-api/global.d.ts +23 -22
  120. package/types/uni/uts-plugin-api/index.d.ts +23 -22
  121. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/global.d.ts +18 -18
  122. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/index.d.ts +8 -8
  123. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +43 -43
  124. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/global.d.ts +12 -12
  125. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +5 -5
  126. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +101 -101
  127. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/global.d.ts +26 -26
  128. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/index.d.ts +12 -12
  129. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +82 -82
  130. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/global.d.ts +66 -66
  131. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +32 -32
  132. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +423 -423
  133. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/global.d.ts +10 -10
  134. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +4 -4
  135. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/global.d.ts +12 -12
  136. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +5 -5
  137. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/global.d.ts +14 -14
  138. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/index.d.ts +6 -6
  139. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +350 -350
  140. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/global.d.ts +14 -14
  141. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/index.d.ts +6 -6
  142. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/global.d.ts +20 -20
  143. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +9 -9
  144. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +151 -151
  145. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/global.d.ts +24 -24
  146. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +11 -11
  147. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +24 -0
  148. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +11 -0
  149. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +87 -0
  150. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/global.d.ts +30 -30
  151. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/index.d.ts +14 -14
  152. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/global.d.ts +12 -12
  153. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/index.d.ts +5 -5
  154. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/global.d.ts +24 -24
  155. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/index.d.ts +11 -11
  156. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +158 -158
  157. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +78 -78
  158. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +906 -906
  159. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +68 -68
  160. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +33 -33
  161. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/global.d.ts +72 -72
  162. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +35 -35
  163. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/global.d.ts +24 -24
  164. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +11 -11
  165. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/global.d.ts +74 -62
  166. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +36 -30
  167. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +40 -8
  168. package/types/uni/uts-plugin-api/lib/uni-requestPayment-alipay/utssdk/global.d.ts +28 -28
  169. package/types/uni/uts-plugin-api/lib/uni-requestPayment-alipay/utssdk/index.d.ts +13 -13
  170. package/types/uni/uts-plugin-api/lib/uni-requestPayment-alipay/utssdk/interface.d.ts +1 -1
  171. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/global.d.ts +10 -10
  172. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/index.d.ts +4 -4
  173. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +33 -33
  174. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/global.d.ts +78 -78
  175. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/index.d.ts +38 -38
  176. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +531 -531
  177. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/global.d.ts +58 -58
  178. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/index.d.ts +28 -28
  179. package/types/uni/uts-plugin-biz/global.d.ts +4 -4
  180. package/types/uni/uts-plugin-biz/index.d.ts +4 -4
  181. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/global.d.ts +36 -36
  182. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/index.d.ts +17 -17
  183. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +132 -132
  184. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/global.d.ts +28 -28
  185. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +13 -13
  186. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +141 -141
  187. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/global.d.ts +56 -56
  188. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/index.d.ts +27 -27
  189. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/global.d.ts +46 -46
  190. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/index.d.ts +22 -22
  191. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +203 -203
  192. package/types/uni/uts-plugin-component/global.d.ts +1 -1
  193. package/types/uni/uts-plugin-component/index.d.ts +1 -1
  194. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/global.d.ts +64 -64
  195. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +31 -31
  196. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +356 -356
  197. package/types/uni-cloud/index.d.ts +59 -59
  198. package/types/uni-cloud/interface.d.ts +801 -801
  199. package/types/uni-cloud/unicloud-db/index.ts +313 -313
  200. package/types/uni-global/index.d.ts +1 -1
  201. package/types/vue/CheckboxGroupChangeEvent.d.ts +36 -36
  202. package/types/vue/LifeCycle.d.ts +55 -55
  203. package/types/vue/PickerViewChangeEvent.d.ts +36 -36
  204. package/types/vue/ProgressActiveendEvent.d.ts +30 -30
  205. package/types/vue/RadioGroupChangeEvent.d.ts +36 -36
  206. package/types/vue/SliderChangeEvent.d.ts +32 -32
  207. package/types/vue/SwitchChangeEvent.d.ts +30 -30
  208. package/types/vue/UniCanvasElement.d.ts +270 -270
  209. package/types/vue/UniCloudDBElement.d.ts +215 -215
  210. package/types/vue/UniFormElement.d.ts +51 -51
  211. package/types/vue/UniNavigatorElement.d.ts +7 -7
  212. package/types/vue/index.d.ts +11 -11
  213. package/uts-plugin.d.ts +26 -26
  214. package/types/uni-cloud/unicloud-db/index.d.ts +0 -81
  215. package/types/vue/UniButtonElement.d.ts +0 -7
@@ -1,755 +1,762 @@
1
- import { DrawableContext } from "./DrawableContext"
2
- import { TakeSnapshotOptions } from "./SnapshotOptions"
3
- import { UniEvent } from './UniEvent'
4
- import { CSSStyleDeclaration } from "./CSSStyleDeclaration"
5
- import { DOMRect } from "./DOMRect"
6
- import { UniCallbackWrapper } from "./UniCallbackWrapper";
7
-
8
- /**
9
- * UVUE DOM 元素对象,描述了 UVUE DOM 元素所普通具有的属性和方法。
10
- * @package io.dcloud.uniapp.runtime
11
- */
12
- export interface UniElement {
13
- /**
14
- * 只读属性 获取当前元素的的 class 属性的动态集合。
15
- */
16
- classList: string[]
17
-
18
- /**
19
- * 只读属性 获取当前元素的的第一个子元素,如果元素是无子元素,则返回 null。
20
- */
21
- readonly firstChild: UniElement | null
22
-
23
- /**
24
- * 只读属性 获取当前元素的最后一个子元素,如果没有子元素,则返回 null。
25
- */
26
- readonly lastChild: UniElement | null
27
-
28
- /**
29
- * 只读属性 获取当前元素在 DOM 树中的父元素,如果没有父元素(如未添加到DOM树中),则返回null。
30
- * @internal
31
- */
32
- readonly parentNode: UniElement | null
33
-
34
- /**
35
- * 只读属性 获取当前元素在 DOM 树中的父元素,如果没有父元素(如未添加到DOM树中),则返回null。
36
- */
37
- readonly parentElement: UniElement | null
38
-
39
- /**
40
- * 只读属性 获取当前元素的前一个同级元素,没有则返回null。
41
- */
42
- readonly previousSibling: UniElement | null
43
-
44
- /**
45
- * 只读属性 获取在 DOM 树中紧跟在其后面的同级元素,如果指定的元素为最后一个元素,则返回 null。
46
- * @internal
47
- */
48
- readonly nextSibling: UniElement | null
49
-
50
- /**
51
- * 只读属性 获取在 DOM 树中紧跟在其后面的同级元素,如果指定的元素为最后一个元素,则返回 null。
52
- */
53
- readonly nextElementSibling: UniElement | null
54
-
55
- /**
56
- * 只读属性 获取当前元素包含的子元素的集合
57
- */
58
- readonly children: UniElement[]
59
-
60
- /**
61
- * 只读属性 获取当前节点包含的子节点的集合
62
- * @internal
63
- */
64
- readonly childNodes: UniElement[]
65
-
66
- /**
67
- * 只读属性 获取当前元素的标签名
68
- */
69
- readonly tagName: string
70
-
71
- /**
72
- * 只读属性 获取当前元素的元素名称
73
- */
74
- readonly nodeName: string
75
-
76
- /**
77
- * 只读属性 获取元素上自定义数据属性(data-*)的集合
78
- */
79
- readonly dataset: Map<string, any | null>
80
-
81
- /**
82
- * 只读属性 获取元素上所有属性元素的集合
83
- */
84
- readonly attributes: Map<string, any | null>
85
-
86
- /**
87
- * 只读属性 获取元素的CSS样式对象
88
- */
89
- readonly style: CSSStyleDeclaration
90
-
91
- /**
92
- * 只读属性 获取可滚动元素内容的总宽度,仅scroll-view、list-view组件支持,其他组件返回视图宽度
93
- */
94
- readonly scrollWidth: number
95
-
96
- /**
97
- * 只读属性 获取可滚动元素内容的总高度,仅scroll-view、list-view组件支持,其他组件返回视图高度
98
- */
99
- readonly scrollHeight: number
100
-
101
- /**
102
- * 获取或修改元素滚动条到元素左边的距离像素数,仅scroll-view、list-view组件支持。其他组件返回0
103
- */
104
- scrollLeft: number
105
-
106
- /**
107
- * 获取或修改元素滚动条到元素顶部的距离像素数,仅scroll-view、list-view组件支持。其他组件返回0
108
- */
109
- scrollTop: number
110
-
111
- /**
112
- * 只读属性 元素的左边界偏移值 单位px
113
- */
114
- readonly offsetLeft: number
115
-
116
- /**
117
- * 只读属性 元素的顶部边界偏移值 单位px
118
- */
119
- readonly offsetTop: number
120
-
121
- /**
122
- * 只读属性 元素的布局宽度,宽度包含border、padding的数据值 单位px
123
- */
124
- readonly offsetWidth: number
125
-
126
- /**
127
- * 只读属性 元素的布局高度,高度包含border、padding的数据值 单位px
128
- */
129
- readonly offsetHeight: number
130
-
131
- /**
132
- * 只读属性 扩展属性
133
- */
134
- readonly ext: Map<string, any | null>
135
-
136
- /**
137
- * 获取元素标识。
138
- * @internal
139
- */
140
- getNodeId(): string
141
-
142
-
143
- /**
144
- * 对当前组件进行截图,调用此方法会将当前组件(包含子节点)渲染结果导出成图片。
145
- * 成功会返回图片对应的临时文件路径,目前默认png格式
146
- *
147
- * @param options 组件截图的参数对象
148
- * @uniPlatform {
149
- * "app": {
150
- * "android": {
151
- * "osVer": "5.0",
152
- * "uniVer": "x",
153
- * "unixVer": "3.93"
154
- * },
155
- * "ios": {
156
- * "osVer": "x",
157
- * "uniVer": "x",
158
- * "unixVer": "x"
159
- * }
160
- * }
161
- * "web": {
162
- * "uniVer": "x",
163
- * "unixVer": "x"
164
- * }
165
- * }
166
- */
167
- takeSnapshot(options: TakeSnapshotOptions): void
168
-
169
- /**
170
- * 将一个元素添加到指定父元素的子元素列表的末尾处。如果将被插入的元素已经存在于当前文档的文档树中,那么将会它从原先的位置移动到新的位置。
171
- * @param {UniElement} aChild 插入子元素对象
172
- */
173
- appendChild(aChild: UniElement): void
174
-
175
- /**
176
- * 在参考元素之前插入一个拥有指定父元素的子元素。如果给定的子元素是对文档中现有元素的引用,insertBefore() 会将其从当前位置移动到新位置。
177
- * @param newChild 插入子元素对象
178
- * @param refChild 已存在父元素的子元素对象
179
- */
180
- insertBefore(newChild: UniElement, refChild?: UniElement | null): UniElement | null
181
-
182
- /**
183
- * 将一个元素添加到指定父元素的子元素列表的末尾处 功能等同于appendChild
184
- * @param newChild 插入子元素对象
185
- */
186
- insertBefore(newChild: UniElement): UniElement | null
187
-
188
- /**
189
- * 设置指定元素上的某个属性值。如果设置的属性已经存在,则更新该属性值;否则使用指定的名称和值添加一个新的属性。
190
- * @param {string} key 属性名称
191
- * @param {string} value 属性值域
192
- */
193
- setAttribute(key: string, value: string): void
194
-
195
- /**
196
- * 设置指定元素上的某个属性值。功能等同setAttribute value支持任意类型
197
- * @param {string} key 属性名称
198
- * @param {string} value 属性值域
199
- * @internal
200
- */
201
- setAnyAttribute(key: string, value: any): void
202
-
203
- /**
204
- * 获取元素指定的属性值,如果指定的属性不存在则返回null。
205
- * @param {string} key 属性名称
206
- */
207
- getAttribute(key: string): string | null
208
-
209
- /**
210
- * 返回元素上一个指定的属性值。如果指定的属性不存在,则返回 null
211
- * @param {string} key 属性名称
212
- * @internal
213
- */
214
- getAnyAttribute(key: string): any | null
215
-
216
- /**
217
- * 返回改元素是否包含有指定的属性,属性存在则返回true,否则返回false。
218
- * @param {string} key 属性名称
219
- */
220
- hasAttribute(key: string): boolean
221
-
222
- /**
223
- * 从元素中删除一个属性,如果指定的属性不存在,则不做任何操作,也不会产生错误。
224
- * @param {string} key 属性名称
225
- */
226
- removeAttribute(key: string): void
227
-
228
- /**
229
- * 更新元素的样式。
230
- * @internal
231
- */
232
- updateStyle(map: Map<string, any | null>): void
233
-
234
- /**
235
- * 获取元素的大小及其相对于窗口的位置信息。
236
- */
237
- getBoundingClientRect(): DOMRect
238
-
239
- /**
240
- * 获取组件的绘制对象,仅uvue页面中的 view 组件支持,其它组件不支持则返回null。
241
- * @uniPlatform {
242
- * "app": {
243
- * "android": {
244
- * "osVer": "5.0",
245
- * "uniVer": "x",
246
- * "unixVer": "3.9+"
247
- * },
248
- * "ios": {
249
- * "osVer": "x",
250
- * "uniVer": "x",
251
- * "unixVer": "x"
252
- * }
253
- * }
254
- * "web": {
255
- * "uniVer": "x",
256
- * "unixVer": "x"
257
- * }
258
- * }
259
- */
260
- getDrawableContext(): DrawableContext | null
261
-
262
- /**
263
- * 将指定的监听器注册到元素对象上,当该对象触发指定的事件时,指定的回调函数就会被执行。
264
- * @param {string} type 事件类型
265
- * @param {(event: T) => R} callback 事件监听器 T表示event类型,R表示返回值类型
266
- */
267
- addEventListener<T extends UniEvent, R>(type: string, callback: (event: T) => R): UniCallbackWrapper
268
-
269
- /**
270
- * 删除使用 addEventListener 方法添加的事件监听器。
271
- * @param type 事件类型
272
- * @param callbackWrapper 事件监听回调封装类
273
- */
274
- removeEventListener(type: string, callbackWrapper: UniCallbackWrapper): void
275
-
276
- /**
277
- * 从元素中删除一个子元素,返回删除的元素。
278
- * @param {UniElement} aChild 被删除子元素对象
279
- */
280
- removeChild(aChild: UniElement): UniElement | null
281
-
282
- /**
283
- * 把元素对象从它所属的 DOM 树中删除。
284
- */
285
- remove(): void
286
-
287
- /**
288
- * 向一个指定的事件目标派发一个 Event,并以合适的顺序(同步地)调用此事件的监听器回调函数。
289
- * @param {string} type 事件类型
290
- * @param {UniEvent} value 事件返回对象
291
- */
292
- dispatchEvent(type: string, value: UniEvent): void
293
-
294
- /**
295
- * 使界面滚动到给定元素的指定坐标位置 仅scroll-view、list-view组件支持
296
- * @param {number} x x轴要滚动到坐标位置(单位px)
297
- * @param {number} y y轴要滚动到坐标位置(单位px)
298
- */
299
- scrollTo(x: number, y: number): void
300
-
301
- /**
302
- * 使得元素滚动一段特定距离 仅scroll-view、list-view组件支持
303
- * @param {number} x x轴要滚动的距离(单位px)
304
- * @param {number} y y轴要滚动的距离(单位px)
305
- */
306
- scrollBy(x: number, y: number): void
307
-
308
- /**
309
- * 返回文档中与指定选择器或选择器组匹配的第一个 Element对象。如果找不到匹配项,则返回null
310
- * @param {string.cssSelectorString}selector CSS 选择器字符串
311
- */
312
- querySelector(selector: string.cssSelectorString): UniElement | null
313
-
314
- /**
315
- * 返回与指定的选择器组匹配的文档中的元素列表
316
- * @param {string.cssSelectorString}selector CSS 选择器字符串
317
- */
318
- querySelectorAll(selector: string.cssSelectorString): UniElement[] | null
319
-
320
- /**
321
- * 使元素获取焦点 仅input、Textarea组件支持
322
- */
323
- focus(): void
324
-
325
- /**
326
- * 使元素丢失焦点 仅input、Textarea组件支持
327
- */
328
- blur(): void
329
- }
330
-
331
- export type INode = UniElement
332
- export type Element = UniElement
333
-
334
- /**
335
- * view元素对象
336
- * @package io.dcloud.uniapp.runtime
337
- */
338
- export interface UniViewElement extends UniElement {
339
- }
340
-
341
- /**
342
- * scroll-view元素对象
343
- * @package io.dcloud.uniapp.runtime
344
- */
345
- export interface UniScrollViewElement extends UniElement {
346
- }
347
-
348
- /**
349
- * list-view元素对象
350
- * @package io.dcloud.uniapp.runtime
351
- */
352
- export interface UniListViewElement extends UniScrollViewElement {
353
- }
354
-
355
- /**
356
- * list-item元素对象
357
- * @package io.dcloud.uniapp.runtime
358
- */
359
- export interface UniListItemElement extends UniElement {
360
- }
361
-
362
- /**
363
- * swiper元素对象
364
- * @package io.dcloud.uniapp.runtime
365
- */
366
- export interface UniSwiperElement extends UniElement {
367
- }
368
-
369
- /**
370
- * swiper-item元素对象
371
- * @package io.dcloud.uniapp.runtime
372
- */
373
- export interface UniSwiperItemElement extends UniElement {
374
- }
375
-
376
- /**
377
- * image元素对象
378
- * @package io.dcloud.uniapp.runtime
379
- */
380
- export interface UniImageElement extends UniElement {
381
- }
382
-
383
- /**
384
- * input元素对象
385
- * @package io.dcloud.uniapp.runtime
386
- */
387
- export interface UniInputElement extends UniElement {
388
- /**
389
- * 表单的控件名称,作为键值对的一部分与表单(form组件)一同提交
390
- *
391
- * @uniPlatform {
392
- * "app": {
393
- * "android": {
394
- * "osVer": "5.0",
395
- * "uniVer": "x",
396
- * "unixVer": "4.0"
397
- * },
398
- * "ios": {
399
- * "osVer": "x",
400
- * "uniVer": "x",
401
- * "unixVer": "x"
402
- * }
403
- * }
404
- * }
405
- */
406
- name: string;
407
- /**
408
- * input的类型
409
- *
410
- * @uniPlatform {
411
- * "app": {
412
- * "android": {
413
- * "osVer": "5.0",
414
- * "uniVer": "x",
415
- * "unixVer": "4.0"
416
- * },
417
- * "ios": {
418
- * "osVer": "x",
419
- * "uniVer": "x",
420
- * "unixVer": "x"
421
- * }
422
- * }
423
- * }
424
- */
425
- type: string;
426
- /**
427
- * 是否禁用
428
- *
429
- * @uniPlatform {
430
- * "app": {
431
- * "android": {
432
- * "osVer": "5.0",
433
- * "uniVer": "x",
434
- * "unixVer": "4.0"
435
- * },
436
- * "ios": {
437
- * "osVer": "x",
438
- * "uniVer": "x",
439
- * "unixVer": "x"
440
- * }
441
- * }
442
- * }
443
- */
444
- disabled: boolean;
445
- /**
446
- * 自动获取焦点
447
- *
448
- * @uniPlatform {
449
- * "app": {
450
- * "android": {
451
- * "osVer": "5.0",
452
- * "uniVer": "x",
453
- * "unixVer": "4.0"
454
- * },
455
- * "ios": {
456
- * "osVer": "x",
457
- * "uniVer": "x",
458
- * "unixVer": "x"
459
- * }
460
- * }
461
- * }
462
- */
463
- autofocus: boolean;
464
- /**
465
- * 输入框的初始内容
466
- *
467
- * @uniPlatform {
468
- * "app": {
469
- * "android": {
470
- * "osVer": "5.0",
471
- * "uniVer": "x",
472
- * "unixVer": "4.0"
473
- * },
474
- * "ios": {
475
- * "osVer": "x",
476
- * "uniVer": "x",
477
- * "unixVer": "x"
478
- * }
479
- * }
480
- * }
481
- */
482
- value: string;
483
- }
484
-
485
- /**
486
- * textarea元素对象
487
- * @package io.dcloud.uniapp.runtime
488
- */
489
- export interface UniTextareaElement extends UniElement {
490
- /**
491
- * 表单的控件名称,作为键值对的一部分与表单(form组件)一同提交
492
- *
493
- * @uniPlatform {
494
- * "app": {
495
- * "android": {
496
- * "osVer": "5.0",
497
- * "uniVer": "x",
498
- * "unixVer": "4.0"
499
- * },
500
- * "ios": {
501
- * "osVer": "x",
502
- * "uniVer": "x",
503
- * "unixVer": "x"
504
- * }
505
- * }
506
- * }
507
- */
508
- name: string;
509
- /**
510
- * input的类型
511
- *
512
- * @uniPlatform {
513
- * "app": {
514
- * "android": {
515
- * "osVer": "5.0",
516
- * "uniVer": "x",
517
- * "unixVer": "4.0"
518
- * },
519
- * "ios": {
520
- * "osVer": "x",
521
- * "uniVer": "x",
522
- * "unixVer": "x"
523
- * }
524
- * }
525
- * }
526
- */
527
- type: string;
528
- /**
529
- * 是否禁用
530
- *
531
- * @uniPlatform {
532
- * "app": {
533
- * "android": {
534
- * "osVer": "5.0",
535
- * "uniVer": "x",
536
- * "unixVer": "4.0"
537
- * },
538
- * "ios": {
539
- * "osVer": "x",
540
- * "uniVer": "x",
541
- * "unixVer": "x"
542
- * }
543
- * }
544
- * }
545
- */
546
- disabled: boolean;
547
- /**
548
- * 自动获取焦点
549
- *
550
- * @uniPlatform {
551
- * "app": {
552
- * "android": {
553
- * "osVer": "5.0",
554
- * "uniVer": "x",
555
- * "unixVer": "4.0"
556
- * },
557
- * "ios": {
558
- * "osVer": "x",
559
- * "uniVer": "x",
560
- * "unixVer": "x"
561
- * }
562
- * }
563
- * }
564
- */
565
- autofocus: boolean;
566
- /**
567
- * 输入框的初始内容
568
- *
569
- * @uniPlatform {
570
- * "app": {
571
- * "android": {
572
- * "osVer": "5.0",
573
- * "uniVer": "x",
574
- * "unixVer": "4.0"
575
- * },
576
- * "ios": {
577
- * "osVer": "x",
578
- * "uniVer": "x",
579
- * "unixVer": "x"
580
- * }
581
- * }
582
- * }
583
- */
584
- value: string;
585
- }
586
-
587
- /**
588
- * rich-text元素对象
589
- * @package io.dcloud.uniapp.runtime
590
- */
591
- export interface UniRichTextElement extends UniElement {
592
- }
593
-
594
- /**
595
- * sticky-header元素对象
596
- * @package io.dcloud.uniapp.runtime
597
- */
598
- export interface UniStickyHeaderElement extends UniElement {
599
- }
600
-
601
-
602
- /**
603
- * sticky-section元素对象
604
- * @package io.dcloud.uniapp.runtime
605
- */
606
- export interface UniStickySectionElement extends UniElement {
607
- }
608
-
609
-
610
- /**
611
- * tabs元素对象
612
- * @package io.dcloud.uniapp.runtime
613
- * @internal
614
- */
615
- export interface UniTabsElement extends UniElement {
616
- /**
617
- * 添加item
618
- * @param pageId 页面id
619
- */
620
- appendItem(pageId: string): void
621
-
622
- /**
623
- * 添加item
624
- * @param itemElement item的元素对象
625
- */
626
- appendItem(itemElement: UniElement): void
627
-
628
- /**
629
- * 初始化tabBar
630
- */
631
- initTabBar(style: Map<string, any | null>): void
632
-
633
- /**
634
- * 添加自定义tabBar
635
- * @param tabBar tabBar元素
636
- * @param direction 排列方向
637
- */
638
- appendCustomTabBar(tabBar: UniElement, direction: string): void
639
-
640
- /**
641
- * item选中高亮
642
- * @param 被选中页面id
643
- * @index item下标
644
- */
645
- switchSelect(pageId: string, index: number): void
646
-
647
- /**
648
- * 隐藏TabBar
649
- */
650
- hideTabBar(op: Map<string, any | null>): void
651
-
652
- /**
653
- * 显示tabBar
654
- */
655
- showTabBar(op: Map<string, any | null>): void
656
-
657
- /**
658
- * 为 tabBar 某一项的右上角添加文本
659
- */
660
- setTabBarBadge(op: Map<string, any | null>): void
661
-
662
- /**
663
- * 移除 tabBar 某一项右上角的文本
664
- */
665
- removeTabBarBadge(op: Map<string, any | null>): void
666
-
667
- /**
668
- * 显示 tabBar 某一项的右上角的红点
669
- */
670
- showTabBarRedDot(op: Map<string, any | null>): void
671
-
672
- /**
673
- * 隐藏 tabBar 某一项的右上角的红点
674
- */
675
- hideTabBarRedDot(op: Map<string, any | null>): void
676
-
677
- /**
678
- * 动态设置 tabBar 的整体样式
679
- */
680
- setTabBarStyle(op: Map<string, any | null>): void
681
-
682
- /**
683
- * 动态设置 tabBar 某一项的内容
684
- */
685
- setTabBarItem(op: Map<string, any | null>): void
686
-
687
- /**
688
- * 获取tabbar高度
689
- */
690
- getTabBarHeight():number
691
-
692
- /**
693
- * 只读属性 tabBar是否隐藏
694
- */
695
- isTabBarVisible: boolean
696
- /**
697
- * 只读属性 当前显示itemId
698
- */
699
- currentItemId: string | null
700
- }
701
-
702
- export type ITabsNode = UniTabsElement
703
-
704
- /**
705
- * text元素对象
706
- * @package io.dcloud.uniapp.runtime
707
- */
708
- export interface UniTextElement extends UniElement {
709
- /**
710
- * 只读属性 text元素的文案内容
711
- */
712
- value: string
713
- getTextExtra(): any | null
714
- }
715
-
716
- export type TextElement = UniTextElement
717
-
718
- /**
719
- * web-view元素对象
720
- * @package io.dcloud.uniapp.runtime
721
- */
722
- export interface UniWebViewElement extends UniElement {
723
- /**
724
- * 后退
725
- */
726
- back(): void
727
- /**
728
- * 前进
729
- */
730
- forward(): void
731
- /**
732
- * 重新加载
733
- */
734
- reload(): void
735
- /**
736
- * 停止加载
737
- */
738
- stop(): void
739
- /**
740
- * 原生和WebView通信(执行JS脚本)
741
- */
742
- evalJS(js: string): void
743
- }
744
-
745
- export type IWebViewNode = UniWebViewElement
746
-
747
- /**
748
- * 注释节点
749
- * @internal
750
- */
751
- export interface UniCommentElement extends UniElement {
752
- text: string
753
- }
754
-
755
- export type IComment = UniCommentElement
1
+ import { DrawableContext } from "./DrawableContext"
2
+ import { TakeSnapshotOptions } from "./SnapshotOptions"
3
+ import { UniEvent } from './UniEvent'
4
+ import { CSSStyleDeclaration } from "./CSSStyleDeclaration"
5
+ import { DOMRect } from "./DOMRect"
6
+ import { UniCallbackWrapper } from "./UniCallbackWrapper";
7
+
8
+ /**
9
+ * UVUE DOM 元素对象,描述了 UVUE DOM 元素所普通具有的属性和方法。
10
+ * @package io.dcloud.uniapp.runtime
11
+ */
12
+ export interface UniElement {
13
+ /**
14
+ * 只读属性 获取当前元素的的 class 属性的动态集合。
15
+ */
16
+ classList: string[]
17
+
18
+ /**
19
+ * 只读属性 获取当前元素的的第一个子元素,如果元素是无子元素,则返回 null。
20
+ */
21
+ readonly firstChild: UniElement | null
22
+
23
+ /**
24
+ * 只读属性 获取当前元素的最后一个子元素,如果没有子元素,则返回 null。
25
+ */
26
+ readonly lastChild: UniElement | null
27
+
28
+ /**
29
+ * 只读属性 获取当前元素在 DOM 树中的父元素,如果没有父元素(如未添加到DOM树中),则返回null。
30
+ * @internal
31
+ */
32
+ readonly parentNode: UniElement | null
33
+
34
+ /**
35
+ * 只读属性 获取当前元素在 DOM 树中的父元素,如果没有父元素(如未添加到DOM树中),则返回null。
36
+ */
37
+ readonly parentElement: UniElement | null
38
+
39
+ /**
40
+ * 只读属性 获取当前元素的前一个同级元素,没有则返回null。
41
+ */
42
+ readonly previousSibling: UniElement | null
43
+
44
+ /**
45
+ * 只读属性 获取在 DOM 树中紧跟在其后面的同级元素,如果指定的元素为最后一个元素,则返回 null。
46
+ * @internal
47
+ */
48
+ readonly nextSibling: UniElement | null
49
+
50
+ /**
51
+ * 只读属性 获取在 DOM 树中紧跟在其后面的同级元素,如果指定的元素为最后一个元素,则返回 null。
52
+ */
53
+ readonly nextElementSibling: UniElement | null
54
+
55
+ /**
56
+ * 只读属性 获取当前元素包含的子元素的集合
57
+ */
58
+ readonly children: UniElement[]
59
+
60
+ /**
61
+ * 只读属性 获取当前节点包含的子节点的集合
62
+ * @internal
63
+ */
64
+ readonly childNodes: UniElement[]
65
+
66
+ /**
67
+ * 只读属性 获取当前元素的标签名
68
+ */
69
+ readonly tagName: string
70
+
71
+ /**
72
+ * 只读属性 获取当前元素的元素名称
73
+ */
74
+ readonly nodeName: string
75
+
76
+ /**
77
+ * 只读属性 获取元素上自定义数据属性(data-*)的集合
78
+ */
79
+ readonly dataset: Map<string, any | null>
80
+
81
+ /**
82
+ * 只读属性 获取元素上所有属性元素的集合
83
+ */
84
+ readonly attributes: Map<string, any | null>
85
+
86
+ /**
87
+ * 只读属性 获取元素的CSS样式对象
88
+ */
89
+ readonly style: CSSStyleDeclaration
90
+
91
+ /**
92
+ * 只读属性 获取可滚动元素内容的总宽度,仅scroll-view、list-view组件支持,其他组件返回视图宽度
93
+ */
94
+ readonly scrollWidth: number
95
+
96
+ /**
97
+ * 只读属性 获取可滚动元素内容的总高度,仅scroll-view、list-view组件支持,其他组件返回视图高度
98
+ */
99
+ readonly scrollHeight: number
100
+
101
+ /**
102
+ * 获取或修改元素滚动条到元素左边的距离像素数,仅scroll-view、list-view组件支持。其他组件返回0
103
+ */
104
+ scrollLeft: number
105
+
106
+ /**
107
+ * 获取或修改元素滚动条到元素顶部的距离像素数,仅scroll-view、list-view组件支持。其他组件返回0
108
+ */
109
+ scrollTop: number
110
+
111
+ /**
112
+ * 只读属性 元素的左边界偏移值 单位px
113
+ */
114
+ readonly offsetLeft: number
115
+
116
+ /**
117
+ * 只读属性 元素的顶部边界偏移值 单位px
118
+ */
119
+ readonly offsetTop: number
120
+
121
+ /**
122
+ * 只读属性 元素的布局宽度,宽度包含border、padding的数据值 单位px
123
+ */
124
+ readonly offsetWidth: number
125
+
126
+ /**
127
+ * 只读属性 元素的布局高度,高度包含border、padding的数据值 单位px
128
+ */
129
+ readonly offsetHeight: number
130
+
131
+ /**
132
+ * 只读属性 扩展属性
133
+ */
134
+ readonly ext: Map<string, any | null>
135
+
136
+ /**
137
+ * 获取元素标识。
138
+ * @internal
139
+ */
140
+ getNodeId(): string
141
+
142
+
143
+ /**
144
+ * 对当前组件进行截图,调用此方法会将当前组件(包含子节点)渲染结果导出成图片。
145
+ * 成功会返回图片对应的临时文件路径,目前默认png格式
146
+ *
147
+ * @param options 组件截图的参数对象
148
+ * @uniPlatform {
149
+ * "app": {
150
+ * "android": {
151
+ * "osVer": "5.0",
152
+ * "uniVer": "x",
153
+ * "unixVer": "3.93"
154
+ * },
155
+ * "ios": {
156
+ * "osVer": "x",
157
+ * "uniVer": "x",
158
+ * "unixVer": "x"
159
+ * }
160
+ * }
161
+ * "web": {
162
+ * "uniVer": "x",
163
+ * "unixVer": "x"
164
+ * }
165
+ * }
166
+ */
167
+ takeSnapshot(options: TakeSnapshotOptions): void
168
+
169
+ /**
170
+ * 将一个元素添加到指定父元素的子元素列表的末尾处。如果将被插入的元素已经存在于当前文档的文档树中,那么将会它从原先的位置移动到新的位置。
171
+ * @param {UniElement} aChild 插入子元素对象
172
+ */
173
+ appendChild(aChild: UniElement): void
174
+
175
+ /**
176
+ * 在参考元素之前插入一个拥有指定父元素的子元素。如果给定的子元素是对文档中现有元素的引用,insertBefore() 会将其从当前位置移动到新位置。
177
+ * @param newChild 插入子元素对象
178
+ * @param refChild 已存在父元素的子元素对象
179
+ */
180
+ insertBefore(newChild: UniElement, refChild?: UniElement | null): UniElement | null
181
+
182
+ /**
183
+ * 将一个元素添加到指定父元素的子元素列表的末尾处 功能等同于appendChild
184
+ * @param newChild 插入子元素对象
185
+ */
186
+ insertBefore(newChild: UniElement): UniElement | null
187
+
188
+ /**
189
+ * 设置指定元素上的某个属性值。如果设置的属性已经存在,则更新该属性值;否则使用指定的名称和值添加一个新的属性。
190
+ * @param {string} key 属性名称
191
+ * @param {string} value 属性值域
192
+ */
193
+ setAttribute(key: string, value: string): void
194
+
195
+ /**
196
+ * 设置指定元素上的某个属性值。功能等同setAttribute value支持任意类型
197
+ * @param {string} key 属性名称
198
+ * @param {string} value 属性值域
199
+ * @internal
200
+ */
201
+ setAnyAttribute(key: string, value: any): void
202
+
203
+ /**
204
+ * 获取元素指定的属性值,如果指定的属性不存在则返回null。
205
+ * @param {string} key 属性名称
206
+ */
207
+ getAttribute(key: string): string | null
208
+
209
+ /**
210
+ * 返回元素上一个指定的属性值。如果指定的属性不存在,则返回 null
211
+ * @param {string} key 属性名称
212
+ * @internal
213
+ */
214
+ getAnyAttribute(key: string): any | null
215
+
216
+ /**
217
+ * 返回改元素是否包含有指定的属性,属性存在则返回true,否则返回false。
218
+ * @param {string} key 属性名称
219
+ */
220
+ hasAttribute(key: string): boolean
221
+
222
+ /**
223
+ * 从元素中删除一个属性,如果指定的属性不存在,则不做任何操作,也不会产生错误。
224
+ * @param {string} key 属性名称
225
+ */
226
+ removeAttribute(key: string): void
227
+
228
+ /**
229
+ * 更新元素的样式。
230
+ * @internal
231
+ */
232
+ updateStyle(map: Map<string, any | null>): void
233
+
234
+ /**
235
+ * 获取元素的大小及其相对于窗口的位置信息。
236
+ */
237
+ getBoundingClientRect(): DOMRect
238
+
239
+ /**
240
+ * 获取组件的绘制对象,仅uvue页面中的 view 组件支持,其它组件不支持则返回null。
241
+ * @uniPlatform {
242
+ * "app": {
243
+ * "android": {
244
+ * "osVer": "5.0",
245
+ * "uniVer": "x",
246
+ * "unixVer": "3.9+"
247
+ * },
248
+ * "ios": {
249
+ * "osVer": "x",
250
+ * "uniVer": "x",
251
+ * "unixVer": "x"
252
+ * }
253
+ * }
254
+ * "web": {
255
+ * "uniVer": "x",
256
+ * "unixVer": "x"
257
+ * }
258
+ * }
259
+ */
260
+ getDrawableContext(): DrawableContext | null
261
+
262
+ /**
263
+ * 将指定的监听器注册到元素对象上,当该对象触发指定的事件时,指定的回调函数就会被执行。
264
+ * @param {string} type 事件类型
265
+ * @param {(event: T) => R} callback 事件监听器 T表示event类型,R表示返回值类型
266
+ */
267
+ addEventListener<T extends UniEvent, R>(type: string, callback: (event: T) => R): UniCallbackWrapper
268
+
269
+ /**
270
+ * 删除使用 addEventListener 方法添加的事件监听器。
271
+ * @param type 事件类型
272
+ * @param callbackWrapper 事件监听回调封装类
273
+ */
274
+ removeEventListener(type: string, callbackWrapper: UniCallbackWrapper): void
275
+
276
+ /**
277
+ * 从元素中删除一个子元素,返回删除的元素。
278
+ * @param {UniElement} aChild 被删除子元素对象
279
+ */
280
+ removeChild(aChild: UniElement): UniElement | null
281
+
282
+ /**
283
+ * 把元素对象从它所属的 DOM 树中删除。
284
+ */
285
+ remove(): void
286
+
287
+ /**
288
+ * 向一个指定的事件目标派发一个 Event,并以合适的顺序(同步地)调用此事件的监听器回调函数。
289
+ * @param {string} type 事件类型
290
+ * @param {UniEvent} value 事件返回对象
291
+ */
292
+ dispatchEvent(type: string, value: UniEvent): void
293
+
294
+ /**
295
+ * 使界面滚动到给定元素的指定坐标位置 仅scroll-view、list-view组件支持
296
+ * @param {number} x x轴要滚动到坐标位置(单位px)
297
+ * @param {number} y y轴要滚动到坐标位置(单位px)
298
+ */
299
+ scrollTo(x: number, y: number): void
300
+
301
+ /**
302
+ * 使得元素滚动一段特定距离 仅scroll-view、list-view组件支持
303
+ * @param {number} x x轴要滚动的距离(单位px)
304
+ * @param {number} y y轴要滚动的距离(单位px)
305
+ */
306
+ scrollBy(x: number, y: number): void
307
+
308
+ /**
309
+ * 返回文档中与指定选择器或选择器组匹配的第一个 Element对象。如果找不到匹配项,则返回null
310
+ * @param {string.cssSelectorString}selector CSS 选择器字符串
311
+ */
312
+ querySelector(selector: string.cssSelectorString): UniElement | null
313
+
314
+ /**
315
+ * 返回与指定的选择器组匹配的文档中的元素列表
316
+ * @param {string.cssSelectorString}selector CSS 选择器字符串
317
+ */
318
+ querySelectorAll(selector: string.cssSelectorString): UniElement[] | null
319
+
320
+ /**
321
+ * 使元素获取焦点 仅input、Textarea组件支持
322
+ */
323
+ focus(): void
324
+
325
+ /**
326
+ * 使元素丢失焦点 仅input、Textarea组件支持
327
+ */
328
+ blur(): void
329
+ }
330
+
331
+ export type INode = UniElement
332
+ export type Element = UniElement
333
+
334
+ /**
335
+ * view元素对象
336
+ * @package io.dcloud.uniapp.runtime
337
+ */
338
+ export interface UniViewElement extends UniElement {
339
+ }
340
+
341
+ /**
342
+ * scroll-view元素对象
343
+ * @package io.dcloud.uniapp.runtime
344
+ */
345
+ export interface UniScrollViewElement extends UniElement {
346
+ }
347
+
348
+ /**
349
+ * list-view元素对象
350
+ * @package io.dcloud.uniapp.runtime
351
+ */
352
+ export interface UniListViewElement extends UniScrollViewElement {
353
+ }
354
+
355
+ /**
356
+ * list-item元素对象
357
+ * @package io.dcloud.uniapp.runtime
358
+ */
359
+ export interface UniListItemElement extends UniElement {
360
+ }
361
+
362
+ /**
363
+ * swiper元素对象
364
+ * @package io.dcloud.uniapp.runtime
365
+ */
366
+ export interface UniSwiperElement extends UniElement {
367
+ }
368
+
369
+ /**
370
+ * swiper-item元素对象
371
+ * @package io.dcloud.uniapp.runtime
372
+ */
373
+ export interface UniSwiperItemElement extends UniElement {
374
+ }
375
+
376
+ /**
377
+ * image元素对象
378
+ * @package io.dcloud.uniapp.runtime
379
+ */
380
+ export interface UniImageElement extends UniElement {
381
+ }
382
+
383
+ /**
384
+ * input元素对象
385
+ * @package io.dcloud.uniapp.runtime
386
+ */
387
+ export interface UniInputElement extends UniElement {
388
+ /**
389
+ * 表单的控件名称,作为键值对的一部分与表单(form组件)一同提交
390
+ *
391
+ * @uniPlatform {
392
+ * "app": {
393
+ * "android": {
394
+ * "osVer": "5.0",
395
+ * "uniVer": "x",
396
+ * "unixVer": "4.0"
397
+ * },
398
+ * "ios": {
399
+ * "osVer": "x",
400
+ * "uniVer": "x",
401
+ * "unixVer": "x"
402
+ * }
403
+ * }
404
+ * }
405
+ */
406
+ name: string;
407
+ /**
408
+ * input的类型
409
+ *
410
+ * @uniPlatform {
411
+ * "app": {
412
+ * "android": {
413
+ * "osVer": "5.0",
414
+ * "uniVer": "x",
415
+ * "unixVer": "4.0"
416
+ * },
417
+ * "ios": {
418
+ * "osVer": "x",
419
+ * "uniVer": "x",
420
+ * "unixVer": "x"
421
+ * }
422
+ * }
423
+ * }
424
+ */
425
+ type: string;
426
+ /**
427
+ * 是否禁用
428
+ *
429
+ * @uniPlatform {
430
+ * "app": {
431
+ * "android": {
432
+ * "osVer": "5.0",
433
+ * "uniVer": "x",
434
+ * "unixVer": "4.0"
435
+ * },
436
+ * "ios": {
437
+ * "osVer": "x",
438
+ * "uniVer": "x",
439
+ * "unixVer": "x"
440
+ * }
441
+ * }
442
+ * }
443
+ */
444
+ disabled: boolean;
445
+ /**
446
+ * 自动获取焦点
447
+ *
448
+ * @uniPlatform {
449
+ * "app": {
450
+ * "android": {
451
+ * "osVer": "5.0",
452
+ * "uniVer": "x",
453
+ * "unixVer": "4.0"
454
+ * },
455
+ * "ios": {
456
+ * "osVer": "x",
457
+ * "uniVer": "x",
458
+ * "unixVer": "x"
459
+ * }
460
+ * }
461
+ * }
462
+ */
463
+ autofocus: boolean;
464
+ /**
465
+ * 输入框的初始内容
466
+ *
467
+ * @uniPlatform {
468
+ * "app": {
469
+ * "android": {
470
+ * "osVer": "5.0",
471
+ * "uniVer": "x",
472
+ * "unixVer": "4.0"
473
+ * },
474
+ * "ios": {
475
+ * "osVer": "x",
476
+ * "uniVer": "x",
477
+ * "unixVer": "x"
478
+ * }
479
+ * }
480
+ * }
481
+ */
482
+ value: string;
483
+ }
484
+
485
+ /**
486
+ * textarea元素对象
487
+ * @package io.dcloud.uniapp.runtime
488
+ */
489
+ export interface UniTextareaElement extends UniElement {
490
+ /**
491
+ * 表单的控件名称,作为键值对的一部分与表单(form组件)一同提交
492
+ *
493
+ * @uniPlatform {
494
+ * "app": {
495
+ * "android": {
496
+ * "osVer": "5.0",
497
+ * "uniVer": "x",
498
+ * "unixVer": "4.0"
499
+ * },
500
+ * "ios": {
501
+ * "osVer": "x",
502
+ * "uniVer": "x",
503
+ * "unixVer": "x"
504
+ * }
505
+ * }
506
+ * }
507
+ */
508
+ name: string;
509
+ /**
510
+ * input的类型
511
+ *
512
+ * @uniPlatform {
513
+ * "app": {
514
+ * "android": {
515
+ * "osVer": "5.0",
516
+ * "uniVer": "x",
517
+ * "unixVer": "4.0"
518
+ * },
519
+ * "ios": {
520
+ * "osVer": "x",
521
+ * "uniVer": "x",
522
+ * "unixVer": "x"
523
+ * }
524
+ * }
525
+ * }
526
+ */
527
+ type: string;
528
+ /**
529
+ * 是否禁用
530
+ *
531
+ * @uniPlatform {
532
+ * "app": {
533
+ * "android": {
534
+ * "osVer": "5.0",
535
+ * "uniVer": "x",
536
+ * "unixVer": "4.0"
537
+ * },
538
+ * "ios": {
539
+ * "osVer": "x",
540
+ * "uniVer": "x",
541
+ * "unixVer": "x"
542
+ * }
543
+ * }
544
+ * }
545
+ */
546
+ disabled: boolean;
547
+ /**
548
+ * 自动获取焦点
549
+ *
550
+ * @uniPlatform {
551
+ * "app": {
552
+ * "android": {
553
+ * "osVer": "5.0",
554
+ * "uniVer": "x",
555
+ * "unixVer": "4.0"
556
+ * },
557
+ * "ios": {
558
+ * "osVer": "x",
559
+ * "uniVer": "x",
560
+ * "unixVer": "x"
561
+ * }
562
+ * }
563
+ * }
564
+ */
565
+ autofocus: boolean;
566
+ /**
567
+ * 输入框的初始内容
568
+ *
569
+ * @uniPlatform {
570
+ * "app": {
571
+ * "android": {
572
+ * "osVer": "5.0",
573
+ * "uniVer": "x",
574
+ * "unixVer": "4.0"
575
+ * },
576
+ * "ios": {
577
+ * "osVer": "x",
578
+ * "uniVer": "x",
579
+ * "unixVer": "x"
580
+ * }
581
+ * }
582
+ * }
583
+ */
584
+ value: string;
585
+ }
586
+
587
+ /**
588
+ * rich-text元素对象
589
+ * @package io.dcloud.uniapp.runtime
590
+ */
591
+ export interface UniRichTextElement extends UniElement {
592
+ }
593
+
594
+ /**
595
+ * sticky-header元素对象
596
+ * @package io.dcloud.uniapp.runtime
597
+ */
598
+ export interface UniStickyHeaderElement extends UniElement {
599
+ }
600
+
601
+
602
+ /**
603
+ * sticky-section元素对象
604
+ * @package io.dcloud.uniapp.runtime
605
+ */
606
+ export interface UniStickySectionElement extends UniElement {
607
+ }
608
+
609
+
610
+ /**
611
+ * tabs元素对象
612
+ * @package io.dcloud.uniapp.runtime
613
+ * @internal
614
+ */
615
+ export interface UniTabsElement extends UniElement {
616
+ /**
617
+ * 添加item
618
+ * @param pageId 页面id
619
+ */
620
+ appendItem(pageId: string): void
621
+
622
+ /**
623
+ * 添加item
624
+ * @param itemElement item的元素对象
625
+ */
626
+ appendItem(itemElement: UniElement): void
627
+
628
+ /**
629
+ * 初始化tabBar
630
+ */
631
+ initTabBar(style: Map<string, any | null>): void
632
+
633
+ /**
634
+ * 添加自定义tabBar
635
+ * @param tabBar tabBar元素
636
+ * @param direction 排列方向
637
+ */
638
+ appendCustomTabBar(tabBar: UniElement, direction: string): void
639
+
640
+ /**
641
+ * item选中高亮
642
+ * @param 被选中页面id
643
+ * @index item下标
644
+ */
645
+ switchSelect(pageId: string, index: number): void
646
+
647
+ /**
648
+ * 隐藏TabBar
649
+ */
650
+ hideTabBar(op: Map<string, any | null>): void
651
+
652
+ /**
653
+ * 显示tabBar
654
+ */
655
+ showTabBar(op: Map<string, any | null>): void
656
+
657
+ /**
658
+ * 为 tabBar 某一项的右上角添加文本
659
+ */
660
+ setTabBarBadge(op: Map<string, any | null>): void
661
+
662
+ /**
663
+ * 移除 tabBar 某一项右上角的文本
664
+ */
665
+ removeTabBarBadge(op: Map<string, any | null>): void
666
+
667
+ /**
668
+ * 显示 tabBar 某一项的右上角的红点
669
+ */
670
+ showTabBarRedDot(op: Map<string, any | null>): void
671
+
672
+ /**
673
+ * 隐藏 tabBar 某一项的右上角的红点
674
+ */
675
+ hideTabBarRedDot(op: Map<string, any | null>): void
676
+
677
+ /**
678
+ * 动态设置 tabBar 的整体样式
679
+ */
680
+ setTabBarStyle(op: Map<string, any | null>): void
681
+
682
+ /**
683
+ * 动态设置 tabBar 某一项的内容
684
+ */
685
+ setTabBarItem(op: Map<string, any | null>): void
686
+
687
+ /**
688
+ * 获取tabbar高度
689
+ */
690
+ getTabBarHeight():number
691
+
692
+ /**
693
+ * 只读属性 tabBar是否隐藏
694
+ */
695
+ isTabBarVisible: boolean
696
+ /**
697
+ * 只读属性 当前显示itemId
698
+ */
699
+ currentItemId: string | null
700
+ }
701
+
702
+ export type ITabsNode = UniTabsElement
703
+
704
+ /**
705
+ * text元素对象
706
+ * @package io.dcloud.uniapp.runtime
707
+ */
708
+ export interface UniTextElement extends UniElement {
709
+ /**
710
+ * 只读属性 text元素的文案内容
711
+ */
712
+ value: string
713
+ getTextExtra(): any | null
714
+ }
715
+
716
+ export type TextElement = UniTextElement
717
+
718
+ /**
719
+ * web-view元素对象
720
+ * @package io.dcloud.uniapp.runtime
721
+ */
722
+ export interface UniWebViewElement extends UniElement {
723
+ /**
724
+ * 后退
725
+ */
726
+ back(): void
727
+ /**
728
+ * 前进
729
+ */
730
+ forward(): void
731
+ /**
732
+ * 重新加载
733
+ */
734
+ reload(): void
735
+ /**
736
+ * 停止加载
737
+ */
738
+ stop(): void
739
+ /**
740
+ * 原生和WebView通信(执行JS脚本)
741
+ */
742
+ evalJS(js: string): void
743
+ }
744
+
745
+ export type IWebViewNode = UniWebViewElement
746
+
747
+ /**
748
+ * 注释节点
749
+ * @internal
750
+ */
751
+ export interface UniCommentElement extends UniElement {
752
+ text: string
753
+ }
754
+
755
+ export type IComment = UniCommentElement
756
+
757
+ /**
758
+ * button元素对象
759
+ * @package io.dcloud.uniapp.runtime
760
+ */
761
+ interface UniButtonElement extends UniElement {
762
+ }