@dcloudio/uni-app-x 0.7.12 → 0.7.13

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