tmui-cli 2.0.3 → 2.0.4

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 (1160) hide show
  1. package/README.md +22 -14
  2. package/data/components.json +1 -1
  3. package/data/config.json +1 -1
  4. package/data/doc-index.json +1 -1
  5. package/data/tmui4x-doc-index.json +1 -1
  6. package/data/uni-app-x-docs/.vuepress/components/md/banner.vue +241 -0
  7. package/data/uni-app-x-docs/.vuepress/components/md/hperm.vue +59 -0
  8. package/data/uni-app-x-docs/.vuepress/components/md/virtual.vue +49 -0
  9. package/data/uni-app-x-docs/.vuepress/config/copy.js +7 -0
  10. package/data/uni-app-x-docs/.vuepress/config/footer.js +220 -0
  11. package/data/uni-app-x-docs/.vuepress/config/help.js +4 -0
  12. package/data/uni-app-x-docs/.vuepress/config/i18n/index.js +2 -0
  13. package/data/uni-app-x-docs/.vuepress/config/navbar.js +144 -0
  14. package/data/uni-app-x-docs/.vuepress/config/redirectRouter.js +35 -0
  15. package/data/uni-app-x-docs/.vuepress/config/routerMap.js +30 -0
  16. package/data/uni-app-x-docs/.vuepress/config/searchPage.js +53 -0
  17. package/data/uni-app-x-docs/.vuepress/config/siderbar/index.js +6 -0
  18. package/data/uni-app-x-docs/.vuepress/config/siderbar/uni-app-x.js +69 -0
  19. package/data/uni-app-x-docs/.vuepress/config/toc.js +13 -0
  20. package/data/uni-app-x-docs/.vuepress/config.js +130 -0
  21. package/data/uni-app-x-docs/.vuepress/markdown/inject-json-to-md.js +248 -0
  22. package/data/uni-app-x-docs/.vuepress/public/baidu.js +7 -0
  23. package/data/uni-app-x-docs/.vuepress/public/h5/hybrid/html/local.html +88 -0
  24. package/data/uni-app-x-docs/.vuepress/public/h5/index.html +14 -0
  25. package/data/uni-app-x-docs/.vuepress/public/h5/pcguide.html +241 -0
  26. package/data/uni-app-x-docs/.vuepress/public/h5/touch-emulator.js +363 -0
  27. package/data/uni-app-x-docs/.vuepress/public/js/miku.js +10 -0
  28. package/data/uni-app-x-docs/.vuepress/public/miku-delivery-1.2.1.js +7 -0
  29. package/data/uni-app-x-docs/.vuepress/public/miku-delivery-sw-1.2.1.js +7 -0
  30. package/data/uni-app-x-docs/.vuepress/public/pc.html +157 -0
  31. package/data/uni-app-x-docs/.vuepress/public/static/web-view-forum.html +119 -0
  32. package/data/uni-app-x-docs/.vuepress/public/static/web-view.html +119 -0
  33. package/data/uni-app-x-docs/.vuepress/public/svg/uni-open-bridge.svg +1 -0
  34. package/data/uni-app-x-docs/.vuepress/utils/code.js +61 -0
  35. package/data/uni-app-x-docs/.vuepress/utils/cssJson.json +1 -0
  36. package/data/uni-app-x-docs/.vuepress/utils/customTypeJson.json +1 -0
  37. package/data/uni-app-x-docs/.vuepress/utils/example-mapping.json +39 -0
  38. package/data/uni-app-x-docs/.vuepress/utils/example.js +107 -0
  39. package/data/uni-app-x-docs/.vuepress/utils/index.js +20 -0
  40. package/data/uni-app-x-docs/.vuepress/utils/maniFestJson.json +1 -0
  41. package/data/uni-app-x-docs/.vuepress/utils/pageInstanceJson.json +1 -0
  42. package/data/uni-app-x-docs/.vuepress/utils/pagesJson.json +1 -0
  43. package/data/uni-app-x-docs/.vuepress/utils/specialStringJson.json +1 -0
  44. package/data/uni-app-x-docs/.vuepress/utils/utsApiJson.json +1 -0
  45. package/data/uni-app-x-docs/.vuepress/utils/utsComJson.json +1 -0
  46. package/data/uni-app-x-docs/.vuepress/utils/utsDiffTSJson.json +1 -0
  47. package/data/uni-app-x-docs/.vuepress/utils/utsJson.json +1 -0
  48. package/data/uni-app-x-docs/.vuepress/utils/utsUnicloudApiJson.json +1 -0
  49. package/data/uni-app-x-docs/.vuepress/utils/vueJson.json +1 -0
  50. package/data/uni-app-x-docs/404.md +2 -0
  51. package/data/uni-app-x-docs/_sidebar.md +135 -0
  52. package/data/uni-app-x-docs/adapt.md +169 -0
  53. package/data/uni-app-x-docs/ai/NOTE.md +7 -0
  54. package/data/uni-app-x-docs/api/README.md +105 -0
  55. package/data/uni-app-x-docs/api/_sidebar.md +165 -0
  56. package/data/uni-app-x-docs/api/accelerometer.md +72 -0
  57. package/data/uni-app-x-docs/api/action-sheet.md +40 -0
  58. package/data/uni-app-x-docs/api/animation-frame.md +57 -0
  59. package/data/uni-app-x-docs/api/app-route.md +323 -0
  60. package/data/uni-app-x-docs/api/authentication.md +62 -0
  61. package/data/uni-app-x-docs/api/base64.md +33 -0
  62. package/data/uni-app-x-docs/api/bio-auth.md +5 -0
  63. package/data/uni-app-x-docs/api/calendar.md +40 -0
  64. package/data/uni-app-x-docs/api/canvas-get-image-data.md +5 -0
  65. package/data/uni-app-x-docs/api/canvas-put-image-data.md +5 -0
  66. package/data/uni-app-x-docs/api/canvas-to-temp-file-path.md +17 -0
  67. package/data/uni-app-x-docs/api/canvasrenderingcontext2d.md +673 -0
  68. package/data/uni-app-x-docs/api/capture-screen.md +55 -0
  69. package/data/uni-app-x-docs/api/capturescreen.md +5 -0
  70. package/data/uni-app-x-docs/api/choose-file.md +27 -0
  71. package/data/uni-app-x-docs/api/choose-image.md +40 -0
  72. package/data/uni-app-x-docs/api/choose-location.md +304 -0
  73. package/data/uni-app-x-docs/api/choose-media.md +29 -0
  74. package/data/uni-app-x-docs/api/choose-video.md +31 -0
  75. package/data/uni-app-x-docs/api/clipboard.md +44 -0
  76. package/data/uni-app-x-docs/api/compass.md +53 -0
  77. package/data/uni-app-x-docs/api/compress-image.md +25 -0
  78. package/data/uni-app-x-docs/api/compress-video.md +21 -0
  79. package/data/uni-app-x-docs/api/connect-event-source.md +34 -0
  80. package/data/uni-app-x-docs/api/contact.md +37 -0
  81. package/data/uni-app-x-docs/api/create-camera-context.md +27 -0
  82. package/data/uni-app-x-docs/api/create-canvas-context-async.md +36 -0
  83. package/data/uni-app-x-docs/api/create-editor-context-async.md +23 -0
  84. package/data/uni-app-x-docs/api/create-inner-audio-context.md +67 -0
  85. package/data/uni-app-x-docs/api/create-intersection-observer.md +17 -0
  86. package/data/uni-app-x-docs/api/create-interstitial-ad.md +43 -0
  87. package/data/uni-app-x-docs/api/create-live-player-context.md +26 -0
  88. package/data/uni-app-x-docs/api/create-live-pusher-context.md +26 -0
  89. package/data/uni-app-x-docs/api/create-map-context.md +13 -0
  90. package/data/uni-app-x-docs/api/create-request-permission-listener.md +37 -0
  91. package/data/uni-app-x-docs/api/create-rewarded-video-ad.md +58 -0
  92. package/data/uni-app-x-docs/api/create-selector-query.md +161 -0
  93. package/data/uni-app-x-docs/api/create-video-context.md +46 -0
  94. package/data/uni-app-x-docs/api/create-webview-context.md +66 -0
  95. package/data/uni-app-x-docs/api/create-worker.md +293 -0
  96. package/data/uni-app-x-docs/api/dialog-page.md +113 -0
  97. package/data/uni-app-x-docs/api/dom/README.md +520 -0
  98. package/data/uni-app-x-docs/api/dom/cssstyledeclaration.md +515 -0
  99. package/data/uni-app-x-docs/api/dom/domrect.md +11 -0
  100. package/data/uni-app-x-docs/api/dom/drawablecontext.md +212 -0
  101. package/data/uni-app-x-docs/api/dom/element.md +5 -0
  102. package/data/uni-app-x-docs/api/dom/unicanvaselement.md +101 -0
  103. package/data/uni-app-x-docs/api/dom/unielement.md +608 -0
  104. package/data/uni-app-x-docs/api/dom/uniimageelement.md +25 -0
  105. package/data/uni-app-x-docs/api/dom/uniinputelement.md +11 -0
  106. package/data/uni-app-x-docs/api/dom/uninativeviewelement.md +98 -0
  107. package/data/uni-app-x-docs/api/dom/uniresizeobserver.md +48 -0
  108. package/data/uni-app-x-docs/api/dom/unitextareaelement.md +11 -0
  109. package/data/uni-app-x-docs/api/dom/unitextelement.md +49 -0
  110. package/data/uni-app-x-docs/api/dom/univideoelement.md +108 -0
  111. package/data/uni-app-x-docs/api/dom/uniwebviewelement.md +97 -0
  112. package/data/uni-app-x-docs/api/download-file.md +52 -0
  113. package/data/uni-app-x-docs/api/env.md +19 -0
  114. package/data/uni-app-x-docs/api/event-bus.md +81 -0
  115. package/data/uni-app-x-docs/api/exit.md +63 -0
  116. package/data/uni-app-x-docs/api/ext.md +61 -0
  117. package/data/uni-app-x-docs/api/facial-recognition-meta-info.md +47 -0
  118. package/data/uni-app-x-docs/api/facial-recognition-verify.md +5 -0
  119. package/data/uni-app-x-docs/api/file-system-spec.md +224 -0
  120. package/data/uni-app-x-docs/api/get-accessibility-info.md +23 -0
  121. package/data/uni-app-x-docs/api/get-app-authorize-setting.md +29 -0
  122. package/data/uni-app-x-docs/api/get-app-base-info.md +32 -0
  123. package/data/uni-app-x-docs/api/get-app.md +28 -0
  124. package/data/uni-app-x-docs/api/get-background-audio-manager.md +54 -0
  125. package/data/uni-app-x-docs/api/get-battery-info.md +31 -0
  126. package/data/uni-app-x-docs/api/get-current-pages.md +39 -0
  127. package/data/uni-app-x-docs/api/get-device-info.md +35 -0
  128. package/data/uni-app-x-docs/api/get-element-by-id.md +55 -0
  129. package/data/uni-app-x-docs/api/get-element.md +5 -0
  130. package/data/uni-app-x-docs/api/get-file-system-manager.md +62 -0
  131. package/data/uni-app-x-docs/api/get-image-info.md +22 -0
  132. package/data/uni-app-x-docs/api/get-launch-options-sync.md +5 -0
  133. package/data/uni-app-x-docs/api/get-location.md +210 -0
  134. package/data/uni-app-x-docs/api/get-network-type.md +23 -0
  135. package/data/uni-app-x-docs/api/get-performance.md +17 -0
  136. package/data/uni-app-x-docs/api/get-provider.md +5 -0
  137. package/data/uni-app-x-docs/api/get-recorder-manager.md +51 -0
  138. package/data/uni-app-x-docs/api/get-system-info.md +100 -0
  139. package/data/uni-app-x-docs/api/get-system-setting.md +24 -0
  140. package/data/uni-app-x-docs/api/get-univerify-manager.md +306 -0
  141. package/data/uni-app-x-docs/api/get-video-info.md +21 -0
  142. package/data/uni-app-x-docs/api/get-window-info.md +55 -0
  143. package/data/uni-app-x-docs/api/gyroscope.md +80 -0
  144. package/data/uni-app-x-docs/api/image.md +32 -0
  145. package/data/uni-app-x-docs/api/install-apk.md +26 -0
  146. package/data/uni-app-x-docs/api/interceptor.md +35 -0
  147. package/data/uni-app-x-docs/api/is-simulator.md +29 -0
  148. package/data/uni-app-x-docs/api/keyboard.md +55 -0
  149. package/data/uni-app-x-docs/api/launch.md +43 -0
  150. package/data/uni-app-x-docs/api/load-font-face.md +46 -0
  151. package/data/uni-app-x-docs/api/loading.md +61 -0
  152. package/data/uni-app-x-docs/api/locale.md +43 -0
  153. package/data/uni-app-x-docs/api/location-change.md +123 -0
  154. package/data/uni-app-x-docs/api/make-phone-call.md +25 -0
  155. package/data/uni-app-x-docs/api/memory.md +29 -0
  156. package/data/uni-app-x-docs/api/modal.md +50 -0
  157. package/data/uni-app-x-docs/api/navigator-bar-loading.md +40 -0
  158. package/data/uni-app-x-docs/api/navigator.md +89 -0
  159. package/data/uni-app-x-docs/api/network-status-change.md +41 -0
  160. package/data/uni-app-x-docs/api/network-summarize.md +40 -0
  161. package/data/uni-app-x-docs/api/nodes-info.md +5 -0
  162. package/data/uni-app-x-docs/api/on-tab-bar-mid-button-tap.md +20 -0
  163. package/data/uni-app-x-docs/api/open-app-authorize-setting.md +23 -0
  164. package/data/uni-app-x-docs/api/open-document.md +21 -0
  165. package/data/uni-app-x-docs/api/open-location.md +22 -0
  166. package/data/uni-app-x-docs/api/page-scroll-to.md +57 -0
  167. package/data/uni-app-x-docs/api/path2d.md +160 -0
  168. package/data/uni-app-x-docs/api/preview-image.md +44 -0
  169. package/data/uni-app-x-docs/api/privacy.md +84 -0
  170. package/data/uni-app-x-docs/api/provider.md +123 -0
  171. package/data/uni-app-x-docs/api/pull-down-refresh.md +46 -0
  172. package/data/uni-app-x-docs/api/push.md +1 -0
  173. package/data/uni-app-x-docs/api/report.md +44 -0
  174. package/data/uni-app-x-docs/api/request-merchant-transfer.md +31 -0
  175. package/data/uni-app-x-docs/api/request-payment.md +212 -0
  176. package/data/uni-app-x-docs/api/request-system-permission.md +21 -0
  177. package/data/uni-app-x-docs/api/request.md +72 -0
  178. package/data/uni-app-x-docs/api/rpx2px.md +19 -0
  179. package/data/uni-app-x-docs/api/save-image-to-photos-album.md +19 -0
  180. package/data/uni-app-x-docs/api/save-video-to-photos-album.md +17 -0
  181. package/data/uni-app-x-docs/api/scan-code.md +39 -0
  182. package/data/uni-app-x-docs/api/screen-brightness.md +53 -0
  183. package/data/uni-app-x-docs/api/set-navigation-bar-color.md +27 -0
  184. package/data/uni-app-x-docs/api/set-navigation-bar-title.md +22 -0
  185. package/data/uni-app-x-docs/api/set-tab-bar.md +121 -0
  186. package/data/uni-app-x-docs/api/set-tabbar.md +5 -0
  187. package/data/uni-app-x-docs/api/share-with-system.md +27 -0
  188. package/data/uni-app-x-docs/api/share.md +128 -0
  189. package/data/uni-app-x-docs/api/show-action-sheet.md +5 -0
  190. package/data/uni-app-x-docs/api/show-loading.md +5 -0
  191. package/data/uni-app-x-docs/api/show-modal.md +5 -0
  192. package/data/uni-app-x-docs/api/show-toast.md +5 -0
  193. package/data/uni-app-x-docs/api/sign-in.md +141 -0
  194. package/data/uni-app-x-docs/api/storage.md +347 -0
  195. package/data/uni-app-x-docs/api/theme-change.md +477 -0
  196. package/data/uni-app-x-docs/api/theme.md +5 -0
  197. package/data/uni-app-x-docs/api/toast.md +62 -0
  198. package/data/uni-app-x-docs/api/uni-push.md +251 -0
  199. package/data/uni-app-x-docs/api/unicloud/README.md +25 -0
  200. package/data/uni-app-x-docs/api/unicloud/database.md +27 -0
  201. package/data/uni-app-x-docs/api/unicloud/function.md +58 -0
  202. package/data/uni-app-x-docs/api/unicloud/object.md +75 -0
  203. package/data/uni-app-x-docs/api/unicloud/sse-channel.md +103 -0
  204. package/data/uni-app-x-docs/api/unicloud/storage.md +46 -0
  205. package/data/uni-app-x-docs/api/unicloud/utils.md +71 -0
  206. package/data/uni-app-x-docs/api/unipage.md +389 -0
  207. package/data/uni-app-x-docs/api/upload-file.md +40 -0
  208. package/data/uni-app-x-docs/api/vibrate.md +37 -0
  209. package/data/uni-app-x-docs/api/virtual-payment.md +228 -0
  210. package/data/uni-app-x-docs/api/websocket-global.md +5 -0
  211. package/data/uni-app-x-docs/api/websocket.md +116 -0
  212. package/data/uni-app-x-docs/api/wide-screen-adaptation.md +197 -0
  213. package/data/uni-app-x-docs/api/wifi.md +135 -0
  214. package/data/uni-app-x-docs/api/window.md +37 -0
  215. package/data/uni-app-x-docs/app-harmony/README.md +75 -0
  216. package/data/uni-app-x-docs/app-harmony/harmony-vapor.md +5 -0
  217. package/data/uni-app-x-docs/app-vapor.md +599 -0
  218. package/data/uni-app-x-docs/benchmark/vapor-benchmark-android.md +488 -0
  219. package/data/uni-app-x-docs/benchmark/vapor-benchmark-harmony.md +312 -0
  220. package/data/uni-app-x-docs/benchmark/vapor-benchmark-ios.md +375 -0
  221. package/data/uni-app-x-docs/collocation/_sidebar.md +15 -0
  222. package/data/uni-app-x-docs/collocation/app.md +263 -0
  223. package/data/uni-app-x-docs/collocation/manifest-android.md +1321 -0
  224. package/data/uni-app-x-docs/collocation/manifest-harmony.md +152 -0
  225. package/data/uni-app-x-docs/collocation/manifest-ios.md +731 -0
  226. package/data/uni-app-x-docs/collocation/manifest-modules.md +521 -0
  227. package/data/uni-app-x-docs/collocation/manifest-splashscreen.md +232 -0
  228. package/data/uni-app-x-docs/collocation/manifest.md +591 -0
  229. package/data/uni-app-x-docs/collocation/pagesjson.md +462 -0
  230. package/data/uni-app-x-docs/collocation/themejson.md +177 -0
  231. package/data/uni-app-x-docs/compiler/README.md +125 -0
  232. package/data/uni-app-x-docs/compiler/_sidebar.md +4 -0
  233. package/data/uni-app-x-docs/component/README.md +228 -0
  234. package/data/uni-app-x-docs/component/_sidebar.md +118 -0
  235. package/data/uni-app-x-docs/component/ad-custom.md +19 -0
  236. package/data/uni-app-x-docs/component/ad.md +45 -0
  237. package/data/uni-app-x-docs/component/animation-view.md +19 -0
  238. package/data/uni-app-x-docs/component/aria-component.md +19 -0
  239. package/data/uni-app-x-docs/component/audio.md +7 -0
  240. package/data/uni-app-x-docs/component/block.md +21 -0
  241. package/data/uni-app-x-docs/component/button.md +105 -0
  242. package/data/uni-app-x-docs/component/camera.md +54 -0
  243. package/data/uni-app-x-docs/component/canvas.md +163 -0
  244. package/data/uni-app-x-docs/component/channel-live.md +19 -0
  245. package/data/uni-app-x-docs/component/channel-video.md +19 -0
  246. package/data/uni-app-x-docs/component/checkbox-group.md +21 -0
  247. package/data/uni-app-x-docs/component/checkbox.md +27 -0
  248. package/data/uni-app-x-docs/component/common.md +304 -0
  249. package/data/uni-app-x-docs/component/cover-image.md +25 -0
  250. package/data/uni-app-x-docs/component/cover-view.md +25 -0
  251. package/data/uni-app-x-docs/component/custom-tab-bar.md +19 -0
  252. package/data/uni-app-x-docs/component/double-tap-gesture-handler.md +19 -0
  253. package/data/uni-app-x-docs/component/draggable-sheet.md +19 -0
  254. package/data/uni-app-x-docs/component/editor.md +33 -0
  255. package/data/uni-app-x-docs/component/flow-item.md +5 -0
  256. package/data/uni-app-x-docs/component/force-press-gesture-handler.md +19 -0
  257. package/data/uni-app-x-docs/component/form.md +108 -0
  258. package/data/uni-app-x-docs/component/functional-page-navigator.md +19 -0
  259. package/data/uni-app-x-docs/component/glass-effect-view.md +32 -0
  260. package/data/uni-app-x-docs/component/grid-builder.md +19 -0
  261. package/data/uni-app-x-docs/component/grid-view.md +19 -0
  262. package/data/uni-app-x-docs/component/horizontal-drag-gesture-handler.md +19 -0
  263. package/data/uni-app-x-docs/component/icon.md +19 -0
  264. package/data/uni-app-x-docs/component/image.md +79 -0
  265. package/data/uni-app-x-docs/component/input.md +121 -0
  266. package/data/uni-app-x-docs/component/keyboard-accessory.md +19 -0
  267. package/data/uni-app-x-docs/component/label.md +21 -0
  268. package/data/uni-app-x-docs/component/list-builder.md +19 -0
  269. package/data/uni-app-x-docs/component/list-item.md +1 -0
  270. package/data/uni-app-x-docs/component/list-view.md +191 -0
  271. package/data/uni-app-x-docs/component/live-player.md +29 -0
  272. package/data/uni-app-x-docs/component/live-pusher.md +31 -0
  273. package/data/uni-app-x-docs/component/loading.md +31 -0
  274. package/data/uni-app-x-docs/component/long-press-gesture-handler.md +19 -0
  275. package/data/uni-app-x-docs/component/map.md +114 -0
  276. package/data/uni-app-x-docs/component/match-media.md +21 -0
  277. package/data/uni-app-x-docs/component/movable-area.md +27 -0
  278. package/data/uni-app-x-docs/component/movable-view.md +27 -0
  279. package/data/uni-app-x-docs/component/native-component.md +19 -0
  280. package/data/uni-app-x-docs/component/native-view.md +210 -0
  281. package/data/uni-app-x-docs/component/navigation-bar.md +19 -0
  282. package/data/uni-app-x-docs/component/navigator.md +22 -0
  283. package/data/uni-app-x-docs/component/nested-scroll-body.md +32 -0
  284. package/data/uni-app-x-docs/component/nested-scroll-header.md +32 -0
  285. package/data/uni-app-x-docs/component/nested-scroll.md +8 -0
  286. package/data/uni-app-x-docs/component/official-account.md +19 -0
  287. package/data/uni-app-x-docs/component/open-container.md +19 -0
  288. package/data/uni-app-x-docs/component/page-container.md +37 -0
  289. package/data/uni-app-x-docs/component/page-meta.md +19 -0
  290. package/data/uni-app-x-docs/component/pan-gesture-handler.md +19 -0
  291. package/data/uni-app-x-docs/component/picker-view-column.md +5 -0
  292. package/data/uni-app-x-docs/component/picker-view.md +48 -0
  293. package/data/uni-app-x-docs/component/picker.md +29 -0
  294. package/data/uni-app-x-docs/component/progress.md +19 -0
  295. package/data/uni-app-x-docs/component/radio-group.md +21 -0
  296. package/data/uni-app-x-docs/component/radio.md +27 -0
  297. package/data/uni-app-x-docs/component/rich-text.md +108 -0
  298. package/data/uni-app-x-docs/component/root-portal.md +19 -0
  299. package/data/uni-app-x-docs/component/scale-gesture-handler.md +19 -0
  300. package/data/uni-app-x-docs/component/scroll-view.md +213 -0
  301. package/data/uni-app-x-docs/component/share-element.md +84 -0
  302. package/data/uni-app-x-docs/component/slider.md +44 -0
  303. package/data/uni-app-x-docs/component/snapshot.md +19 -0
  304. package/data/uni-app-x-docs/component/span.md +19 -0
  305. package/data/uni-app-x-docs/component/sticky-header.md +50 -0
  306. package/data/uni-app-x-docs/component/sticky-section.md +54 -0
  307. package/data/uni-app-x-docs/component/sticky.md +8 -0
  308. package/data/uni-app-x-docs/component/store-home.md +19 -0
  309. package/data/uni-app-x-docs/component/store-product.md +19 -0
  310. package/data/uni-app-x-docs/component/swiper-item.md +5 -0
  311. package/data/uni-app-x-docs/component/swiper.md +94 -0
  312. package/data/uni-app-x-docs/component/switch.md +28 -0
  313. package/data/uni-app-x-docs/component/tap-gesture-handler.md +19 -0
  314. package/data/uni-app-x-docs/component/text.md +242 -0
  315. package/data/uni-app-x-docs/component/textarea.md +90 -0
  316. package/data/uni-app-x-docs/component/uni-ui-x/README.md +1 -0
  317. package/data/uni-app-x-docs/component/uni-ui-x/uni-badge-view.md +25 -0
  318. package/data/uni-app-x-docs/component/uni-ui-x/uni-collapse-item.md +5 -0
  319. package/data/uni-app-x-docs/component/uni-ui-x/uni-collapse.md +48 -0
  320. package/data/uni-app-x-docs/component/uni-ui-x/uni-drag-cell.md +25 -0
  321. package/data/uni-app-x-docs/component/uni-ui-x/uni-fab-button.md +25 -0
  322. package/data/uni-app-x-docs/component/uni-ui-x/uni-index-bar.md +25 -0
  323. package/data/uni-app-x-docs/component/uni-ui-x/uni-link.md +25 -0
  324. package/data/uni-app-x-docs/component/uni-ui-x/uni-nav-bar.md +25 -0
  325. package/data/uni-app-x-docs/component/uni-ui-x/uni-number-box.md +25 -0
  326. package/data/uni-app-x-docs/component/uni-ui-x/uni-rate.md +25 -0
  327. package/data/uni-app-x-docs/component/uni-ui-x/uni-refresh-box.md +25 -0
  328. package/data/uni-app-x-docs/component/uni-ui-x/uni-tab-bar.md +5 -0
  329. package/data/uni-app-x-docs/component/uni-ui-x/uni-tab-content.md +5 -0
  330. package/data/uni-app-x-docs/component/uni-ui-x/uni-tab-item.md +5 -0
  331. package/data/uni-app-x-docs/component/uni-ui-x/uni-tab-midbutton.md +5 -0
  332. package/data/uni-app-x-docs/component/uni-ui-x/uni-tab.md +111 -0
  333. package/data/uni-app-x-docs/component/uni-ui-x/uni-time-format.md +25 -0
  334. package/data/uni-app-x-docs/component/unicloud-db.md +19 -0
  335. package/data/uni-app-x-docs/component/vertical-drag-gesture-handler.md +19 -0
  336. package/data/uni-app-x-docs/component/video.md +135 -0
  337. package/data/uni-app-x-docs/component/view.md +86 -0
  338. package/data/uni-app-x-docs/component/voip-room.md +19 -0
  339. package/data/uni-app-x-docs/component/waterflow.md +122 -0
  340. package/data/uni-app-x-docs/component/web-view.md +160 -0
  341. package/data/uni-app-x-docs/css/README.md +274 -0
  342. package/data/uni-app-x-docs/css/_sidebar.md +104 -0
  343. package/data/uni-app-x-docs/css/align-content.md +22 -0
  344. package/data/uni-app-x-docs/css/align-items.md +20 -0
  345. package/data/uni-app-x-docs/css/align-self.md +20 -0
  346. package/data/uni-app-x-docs/css/animation-composition.md +18 -0
  347. package/data/uni-app-x-docs/css/animation-delay.md +18 -0
  348. package/data/uni-app-x-docs/css/animation-direction.md +18 -0
  349. package/data/uni-app-x-docs/css/animation-duration.md +18 -0
  350. package/data/uni-app-x-docs/css/animation-fill-mode.md +18 -0
  351. package/data/uni-app-x-docs/css/animation-iteration-count.md +18 -0
  352. package/data/uni-app-x-docs/css/animation-name.md +18 -0
  353. package/data/uni-app-x-docs/css/animation-play-state.md +18 -0
  354. package/data/uni-app-x-docs/css/animation-range-end.md +18 -0
  355. package/data/uni-app-x-docs/css/animation-range-start.md +18 -0
  356. package/data/uni-app-x-docs/css/animation-range.md +18 -0
  357. package/data/uni-app-x-docs/css/animation-timeline.md +18 -0
  358. package/data/uni-app-x-docs/css/animation-timing-function.md +18 -0
  359. package/data/uni-app-x-docs/css/animation.md +18 -0
  360. package/data/uni-app-x-docs/css/backdrop-filter.md +21 -0
  361. package/data/uni-app-x-docs/css/background-clip.md +20 -0
  362. package/data/uni-app-x-docs/css/background-color.md +25 -0
  363. package/data/uni-app-x-docs/css/background-image.md +48 -0
  364. package/data/uni-app-x-docs/css/background.md +20 -0
  365. package/data/uni-app-x-docs/css/border-bottom-color.md +20 -0
  366. package/data/uni-app-x-docs/css/border-bottom-left-radius.md +23 -0
  367. package/data/uni-app-x-docs/css/border-bottom-right-radius.md +23 -0
  368. package/data/uni-app-x-docs/css/border-bottom-style.md +20 -0
  369. package/data/uni-app-x-docs/css/border-bottom-width.md +27 -0
  370. package/data/uni-app-x-docs/css/border-bottom.md +20 -0
  371. package/data/uni-app-x-docs/css/border-color.md +20 -0
  372. package/data/uni-app-x-docs/css/border-left-color.md +20 -0
  373. package/data/uni-app-x-docs/css/border-left-style.md +20 -0
  374. package/data/uni-app-x-docs/css/border-left-width.md +27 -0
  375. package/data/uni-app-x-docs/css/border-left.md +20 -0
  376. package/data/uni-app-x-docs/css/border-radius.md +27 -0
  377. package/data/uni-app-x-docs/css/border-right-color.md +20 -0
  378. package/data/uni-app-x-docs/css/border-right-style.md +20 -0
  379. package/data/uni-app-x-docs/css/border-right-width.md +27 -0
  380. package/data/uni-app-x-docs/css/border-right.md +20 -0
  381. package/data/uni-app-x-docs/css/border-style.md +24 -0
  382. package/data/uni-app-x-docs/css/border-top-color.md +20 -0
  383. package/data/uni-app-x-docs/css/border-top-left-radius.md +23 -0
  384. package/data/uni-app-x-docs/css/border-top-right-radius.md +23 -0
  385. package/data/uni-app-x-docs/css/border-top-style.md +20 -0
  386. package/data/uni-app-x-docs/css/border-top-width.md +27 -0
  387. package/data/uni-app-x-docs/css/border-top.md +20 -0
  388. package/data/uni-app-x-docs/css/border-width.md +24 -0
  389. package/data/uni-app-x-docs/css/border.md +23 -0
  390. package/data/uni-app-x-docs/css/bottom.md +20 -0
  391. package/data/uni-app-x-docs/css/box-shadow.md +26 -0
  392. package/data/uni-app-x-docs/css/box-sizing.md +20 -0
  393. package/data/uni-app-x-docs/css/color.md +27 -0
  394. package/data/uni-app-x-docs/css/common/at-rules.md +293 -0
  395. package/data/uni-app-x-docs/css/common/color.md +9 -0
  396. package/data/uni-app-x-docs/css/common/function.md +161 -0
  397. package/data/uni-app-x-docs/css/common/length.md +89 -0
  398. package/data/uni-app-x-docs/css/common/selector.md +48 -0
  399. package/data/uni-app-x-docs/css/common/style-isolation.md +258 -0
  400. package/data/uni-app-x-docs/css/common/variable.md +1 -0
  401. package/data/uni-app-x-docs/css/css_diff_web.md +802 -0
  402. package/data/uni-app-x-docs/css/direction.md +18 -0
  403. package/data/uni-app-x-docs/css/display.md +23 -0
  404. package/data/uni-app-x-docs/css/flex-basis.md +20 -0
  405. package/data/uni-app-x-docs/css/flex-direction.md +20 -0
  406. package/data/uni-app-x-docs/css/flex-flow.md +20 -0
  407. package/data/uni-app-x-docs/css/flex-grow.md +20 -0
  408. package/data/uni-app-x-docs/css/flex-shrink.md +20 -0
  409. package/data/uni-app-x-docs/css/flex-wrap.md +20 -0
  410. package/data/uni-app-x-docs/css/flex.md +20 -0
  411. package/data/uni-app-x-docs/css/font-family.md +50 -0
  412. package/data/uni-app-x-docs/css/font-size.md +51 -0
  413. package/data/uni-app-x-docs/css/font-style.md +23 -0
  414. package/data/uni-app-x-docs/css/font-weight.md +24 -0
  415. package/data/uni-app-x-docs/css/height.md +23 -0
  416. package/data/uni-app-x-docs/css/justify-content.md +20 -0
  417. package/data/uni-app-x-docs/css/left.md +20 -0
  418. package/data/uni-app-x-docs/css/letter-spacing.md +20 -0
  419. package/data/uni-app-x-docs/css/line-height.md +37 -0
  420. package/data/uni-app-x-docs/css/lines.md +23 -0
  421. package/data/uni-app-x-docs/css/margin-bottom.md +25 -0
  422. package/data/uni-app-x-docs/css/margin-left.md +25 -0
  423. package/data/uni-app-x-docs/css/margin-right.md +25 -0
  424. package/data/uni-app-x-docs/css/margin-top.md +25 -0
  425. package/data/uni-app-x-docs/css/margin.md +33 -0
  426. package/data/uni-app-x-docs/css/max-height.md +20 -0
  427. package/data/uni-app-x-docs/css/max-width.md +20 -0
  428. package/data/uni-app-x-docs/css/min-height.md +27 -0
  429. package/data/uni-app-x-docs/css/min-width.md +20 -0
  430. package/data/uni-app-x-docs/css/opacity.md +20 -0
  431. package/data/uni-app-x-docs/css/overflow.md +28 -0
  432. package/data/uni-app-x-docs/css/padding-bottom.md +23 -0
  433. package/data/uni-app-x-docs/css/padding-left.md +23 -0
  434. package/data/uni-app-x-docs/css/padding-right.md +23 -0
  435. package/data/uni-app-x-docs/css/padding-top.md +23 -0
  436. package/data/uni-app-x-docs/css/padding.md +23 -0
  437. package/data/uni-app-x-docs/css/pointer-events.md +26 -0
  438. package/data/uni-app-x-docs/css/position.md +50 -0
  439. package/data/uni-app-x-docs/css/right.md +20 -0
  440. package/data/uni-app-x-docs/css/text-align.md +23 -0
  441. package/data/uni-app-x-docs/css/text-decoration-color.md +25 -0
  442. package/data/uni-app-x-docs/css/text-decoration-line.md +24 -0
  443. package/data/uni-app-x-docs/css/text-decoration-style.md +23 -0
  444. package/data/uni-app-x-docs/css/text-decoration-thickness.md +23 -0
  445. package/data/uni-app-x-docs/css/text-decoration.md +24 -0
  446. package/data/uni-app-x-docs/css/text-overflow.md +24 -0
  447. package/data/uni-app-x-docs/css/text-shadow.md +22 -0
  448. package/data/uni-app-x-docs/css/top.md +20 -0
  449. package/data/uni-app-x-docs/css/transform-origin.md +20 -0
  450. package/data/uni-app-x-docs/css/transform.md +32 -0
  451. package/data/uni-app-x-docs/css/transition-delay.md +27 -0
  452. package/data/uni-app-x-docs/css/transition-duration.md +27 -0
  453. package/data/uni-app-x-docs/css/transition-property.md +23 -0
  454. package/data/uni-app-x-docs/css/transition-timing-function.md +23 -0
  455. package/data/uni-app-x-docs/css/transition.md +43 -0
  456. package/data/uni-app-x-docs/css/visibility.md +26 -0
  457. package/data/uni-app-x-docs/css/white-space.md +49 -0
  458. package/data/uni-app-x-docs/css/width.md +23 -0
  459. package/data/uni-app-x-docs/css/z-index.md +127 -0
  460. package/data/uni-app-x-docs/debug/android-inspector.md +55 -0
  461. package/data/uni-app-x-docs/i18n.md +379 -0
  462. package/data/uni-app-x-docs/mp/README.md +159 -0
  463. package/data/uni-app-x-docs/native/README.md +67 -0
  464. package/data/uni-app-x-docs/native/debug/android.md +126 -0
  465. package/data/uni-app-x-docs/native/debug/harmony.md +119 -0
  466. package/data/uni-app-x-docs/native/debug/ios.md +92 -0
  467. package/data/uni-app-x-docs/native/download/android.md +45 -0
  468. package/data/uni-app-x-docs/native/download/ios.md +30 -0
  469. package/data/uni-app-x-docs/native/modules/android/others.md +1441 -0
  470. package/data/uni-app-x-docs/native/modules/android/uni-ad.md +104 -0
  471. package/data/uni-app-x-docs/native/modules/android/uni-facialRecognitionVerify.md +74 -0
  472. package/data/uni-app-x-docs/native/modules/android/uni-getLocation.md +131 -0
  473. package/data/uni-app-x-docs/native/modules/android/uni-map-tencent.md +101 -0
  474. package/data/uni-app-x-docs/native/modules/android/uni-oauth.md +61 -0
  475. package/data/uni-app-x-docs/native/modules/android/uni-payment.md +120 -0
  476. package/data/uni-app-x-docs/native/modules/android/uni-push.md +229 -0
  477. package/data/uni-app-x-docs/native/modules/android/uni-share.md +61 -0
  478. package/data/uni-app-x-docs/native/modules/android/uni-verify.md +105 -0
  479. package/data/uni-app-x-docs/native/modules/android/uni-video.md +135 -0
  480. package/data/uni-app-x-docs/native/modules/harmony/facialVerify.md +47 -0
  481. package/data/uni-app-x-docs/native/modules/harmony/location.md +43 -0
  482. package/data/uni-app-x-docs/native/modules/harmony/map.md +64 -0
  483. package/data/uni-app-x-docs/native/modules/harmony/modules.md +23 -0
  484. package/data/uni-app-x-docs/native/modules/harmony/oauth.md +47 -0
  485. package/data/uni-app-x-docs/native/modules/harmony/pay.md +87 -0
  486. package/data/uni-app-x-docs/native/modules/harmony/push.md +74 -0
  487. package/data/uni-app-x-docs/native/modules/harmony/verify.md +45 -0
  488. package/data/uni-app-x-docs/native/modules/ios/modules.md +962 -0
  489. package/data/uni-app-x-docs/native/permission/android_permission_adapter.md +63 -0
  490. package/data/uni-app-x-docs/native/use/android.md +541 -0
  491. package/data/uni-app-x-docs/native/use/androidcomm.md +164 -0
  492. package/data/uni-app-x-docs/native/use/androiduts.md +398 -0
  493. package/data/uni-app-x-docs/native/use/harmony.md +105 -0
  494. package/data/uni-app-x-docs/native/use/harmonyapi.md +205 -0
  495. package/data/uni-app-x-docs/native/use/harmonyuts.md +62 -0
  496. package/data/uni-app-x-docs/native/use/ios.md +96 -0
  497. package/data/uni-app-x-docs/native/use/iosapi.md +290 -0
  498. package/data/uni-app-x-docs/native/use/iosuts.md +89 -0
  499. package/data/uni-app-x-docs/page.md +501 -0
  500. package/data/uni-app-x-docs/performance.md +181 -0
  501. package/data/uni-app-x-docs/plugin/NOTE.md +7 -0
  502. package/data/uni-app-x-docs/project.md +154 -0
  503. package/data/uni-app-x-docs/readme.md +401 -0
  504. package/data/uni-app-x-docs/release-note-alpha.md +2219 -0
  505. package/data/uni-app-x-docs/release.md +1961 -0
  506. package/data/uni-app-x-docs/sample.md +157 -0
  507. package/data/uni-app-x-docs/select.md +365 -0
  508. package/data/uni-app-x-docs/static/4050-hello-flatten-optimized-device1-r1.png +0 -0
  509. package/data/uni-app-x-docs/static/calendar.jpg +0 -0
  510. package/data/uni-app-x-docs/static/go-to-definition.png +0 -0
  511. package/data/uni-app-x-docs/static/hxconsolepageperformance.png +0 -0
  512. package/data/uni-app-x-docs/static/json2type.png +0 -0
  513. package/data/uni-app-x-docs/static/newproject.png +0 -0
  514. package/data/uni-app-x-docs/static/playground.jpg +0 -0
  515. package/data/uni-app-x-docs/static/project-icon.png +0 -0
  516. package/data/uni-app-x-docs/static/uaxding.png +0 -0
  517. package/data/uni-app-x-docs/static/view-API-type-info.png +0 -0
  518. package/data/uni-app-x-docs/tutorial/android-16kb.md +96 -0
  519. package/data/uni-app-x-docs/tutorial/android-memoryleak.md +553 -0
  520. package/data/uni-app-x-docs/tutorial/app-env.md +84 -0
  521. package/data/uni-app-x-docs/tutorial/app-market.md +58 -0
  522. package/data/uni-app-x-docs/tutorial/app-package.md +196 -0
  523. package/data/uni-app-x-docs/tutorial/app-playground.md +188 -0
  524. package/data/uni-app-x-docs/tutorial/bug_repair.md +40 -0
  525. package/data/uni-app-x-docs/tutorial/codegap.md +291 -0
  526. package/data/uni-app-x-docs/tutorial/compatibility.md +120 -0
  527. package/data/uni-app-x-docs/tutorial/compliance.md +833 -0
  528. package/data/uni-app-x-docs/tutorial/debug/devtools.md +137 -0
  529. package/data/uni-app-x-docs/tutorial/idref.md +126 -0
  530. package/data/uni-app-x-docs/tutorial/ls-plugin.md +186 -0
  531. package/data/uni-app-x-docs/tutorial/request.md +321 -0
  532. package/data/uni-app-x-docs/tutorial/rules_mcp.md +123 -0
  533. package/data/uni-app-x-docs/tutorial/stickynestlist.md +68 -0
  534. package/data/uni-app-x-docs/tutorial/store.md +162 -0
  535. package/data/uni-app-x-docs/uniapptox.md +145 -0
  536. package/data/uni-app-x-docs/uts/README.md +456 -0
  537. package/data/uni-app-x-docs/uts/_sidebar.md +57 -0
  538. package/data/uni-app-x-docs/uts/buildin-object-api/array.md +981 -0
  539. package/data/uni-app-x-docs/uts/buildin-object-api/arraybuffer.md +257 -0
  540. package/data/uni-app-x-docs/uts/buildin-object-api/console.md +208 -0
  541. package/data/uni-app-x-docs/uts/buildin-object-api/dataview.md +304 -0
  542. package/data/uni-app-x-docs/uts/buildin-object-api/date.md +707 -0
  543. package/data/uni-app-x-docs/uts/buildin-object-api/error.md +31 -0
  544. package/data/uni-app-x-docs/uts/buildin-object-api/float32array.md +485 -0
  545. package/data/uni-app-x-docs/uts/buildin-object-api/float64array.md +473 -0
  546. package/data/uni-app-x-docs/uts/buildin-object-api/global.md +222 -0
  547. package/data/uni-app-x-docs/uts/buildin-object-api/int16array.md +455 -0
  548. package/data/uni-app-x-docs/uts/buildin-object-api/int32array.md +483 -0
  549. package/data/uni-app-x-docs/uts/buildin-object-api/int8array.md +473 -0
  550. package/data/uni-app-x-docs/uts/buildin-object-api/json.md +236 -0
  551. package/data/uni-app-x-docs/uts/buildin-object-api/map.md +187 -0
  552. package/data/uni-app-x-docs/uts/buildin-object-api/math.md +502 -0
  553. package/data/uni-app-x-docs/uts/buildin-object-api/number.md +363 -0
  554. package/data/uni-app-x-docs/uts/buildin-object-api/promise.md +265 -0
  555. package/data/uni-app-x-docs/uts/buildin-object-api/regexp.md +263 -0
  556. package/data/uni-app-x-docs/uts/buildin-object-api/set.md +170 -0
  557. package/data/uni-app-x-docs/uts/buildin-object-api/string.md +723 -0
  558. package/data/uni-app-x-docs/uts/buildin-object-api/textdecoder.md +70 -0
  559. package/data/uni-app-x-docs/uts/buildin-object-api/textencoder.md +41 -0
  560. package/data/uni-app-x-docs/uts/buildin-object-api/timers.md +99 -0
  561. package/data/uni-app-x-docs/uts/buildin-object-api/uint16array.md +483 -0
  562. package/data/uni-app-x-docs/uts/buildin-object-api/uint32array.md +484 -0
  563. package/data/uni-app-x-docs/uts/buildin-object-api/uint8array.md +483 -0
  564. package/data/uni-app-x-docs/uts/buildin-object-api/uint8clampedarray.md +483 -0
  565. package/data/uni-app-x-docs/uts/buildin-object-api/utsjsonobject.md +361 -0
  566. package/data/uni-app-x-docs/uts/class.md +504 -0
  567. package/data/uni-app-x-docs/uts/compiler-known-issues.md +1242 -0
  568. package/data/uni-app-x-docs/uts/conditional.md +209 -0
  569. package/data/uni-app-x-docs/uts/data-type.md +2248 -0
  570. package/data/uni-app-x-docs/uts/enumerability.md +16 -0
  571. package/data/uni-app-x-docs/uts/enumerability_iterable.md +211 -0
  572. package/data/uni-app-x-docs/uts/exception.md +25 -0
  573. package/data/uni-app-x-docs/uts/function.md +359 -0
  574. package/data/uni-app-x-docs/uts/generics.md +251 -0
  575. package/data/uni-app-x-docs/uts/interface.md +37 -0
  576. package/data/uni-app-x-docs/uts/iterable.md +150 -0
  577. package/data/uni-app-x-docs/uts/keywords.md +436 -0
  578. package/data/uni-app-x-docs/uts/literal.md +252 -0
  579. package/data/uni-app-x-docs/uts/loops.md +240 -0
  580. package/data/uni-app-x-docs/uts/module.md +92 -0
  581. package/data/uni-app-x-docs/uts/object.md +156 -0
  582. package/data/uni-app-x-docs/uts/operator.md +304 -0
  583. package/data/uni-app-x-docs/uts/runtime-known-issues.md +99 -0
  584. package/data/uni-app-x-docs/uts/type-aliases.md +43 -0
  585. package/data/uni-app-x-docs/uts/type-compatibility.md +133 -0
  586. package/data/uni-app-x-docs/uts/uts-optimize.md +33 -0
  587. package/data/uni-app-x-docs/uts/uts_diff_ts.md +2292 -0
  588. package/data/uni-app-x-docs/uts/utsactivitycallback.md +1357 -0
  589. package/data/uni-app-x-docs/uts/utsandroid.md +850 -0
  590. package/data/uni-app-x-docs/uts/utsandroidhookproxy.md +17 -0
  591. package/data/uni-app-x-docs/uts/utsharmony.md +219 -0
  592. package/data/uni-app-x-docs/uts/utsios.md +305 -0
  593. package/data/uni-app-x-docs/uts/utsioshookproxy.md +148 -0
  594. package/data/uni-app-x-docs/vapor-benchmark.md +11 -0
  595. package/data/uni-app-x-docs/vue/README.md +553 -0
  596. package/data/uni-app-x-docs/vue/_sidebar.md +10 -0
  597. package/data/uni-app-x-docs/vue/advanced-api.md +138 -0
  598. package/data/uni-app-x-docs/vue/built-in.md +741 -0
  599. package/data/uni-app-x-docs/vue/component.md +704 -0
  600. package/data/uni-app-x-docs/vue/composition-api.md +792 -0
  601. package/data/uni-app-x-docs/vue/data-bind.md +163 -0
  602. package/data/uni-app-x-docs/vue/global-api.md +109 -0
  603. package/data/uni-app-x-docs/vue/modifier.md +202 -0
  604. package/data/uni-app-x-docs/vue/options-api.md +512 -0
  605. package/data/uni-app-x-docs/vue/others.md +20 -0
  606. package/data/uni-app-x-docs/web/README.md +279 -0
  607. package/data/uni-app-x-docs/web/ssr.md +290 -0
  608. package/data/uni-app-x-docs/worktile/NOTE.md +7 -0
  609. package/data/uniappx/404.md +2 -0
  610. package/data/uniappx/_sidebar.md +135 -0
  611. package/data/uniappx/adapt.md +165 -0
  612. package/data/uniappx/ai/NOTE.md +5 -0
  613. package/data/uniappx/api/README.md +98 -0
  614. package/data/uniappx/api/_sidebar.md +165 -0
  615. package/data/uniappx/api/accelerometer.md +322 -0
  616. package/data/uniappx/api/action-sheet.md +192 -0
  617. package/data/uniappx/api/animation-frame.md +125 -0
  618. package/data/uniappx/api/app-route.md +632 -0
  619. package/data/uniappx/api/authentication.md +267 -0
  620. package/data/uniappx/api/base64.md +127 -0
  621. package/data/uniappx/api/bio-auth.md +3 -0
  622. package/data/uniappx/api/calendar.md +400 -0
  623. package/data/uniappx/api/canvas-get-image-data.md +3 -0
  624. package/data/uniappx/api/canvas-put-image-data.md +3 -0
  625. package/data/uniappx/api/canvas-to-temp-file-path.md +62 -0
  626. package/data/uniappx/api/canvasrenderingcontext2d.md +128 -0
  627. package/data/uniappx/api/capture-screen.md +173 -0
  628. package/data/uniappx/api/capturescreen.md +3 -0
  629. package/data/uniappx/api/choose-file.md +174 -0
  630. package/data/uniappx/api/choose-image.md +312 -0
  631. package/data/uniappx/api/choose-location.md +412 -0
  632. package/data/uniappx/api/choose-media.md +272 -0
  633. package/data/uniappx/api/choose-video.md +165 -0
  634. package/data/uniappx/api/clipboard.md +155 -0
  635. package/data/uniappx/api/compass.md +351 -0
  636. package/data/uniappx/api/compress-image.md +147 -0
  637. package/data/uniappx/api/compress-video.md +136 -0
  638. package/data/uniappx/api/connect-event-source.md +225 -0
  639. package/data/uniappx/api/contact.md +153 -0
  640. package/data/uniappx/api/create-camera-context.md +346 -0
  641. package/data/uniappx/api/create-canvas-context-async.md +167 -0
  642. package/data/uniappx/api/create-editor-context-async.md +605 -0
  643. package/data/uniappx/api/create-inner-audio-context.md +704 -0
  644. package/data/uniappx/api/create-intersection-observer.md +195 -0
  645. package/data/uniappx/api/create-interstitial-ad.md +253 -0
  646. package/data/uniappx/api/create-live-player-context.md +185 -0
  647. package/data/uniappx/api/create-live-pusher-context.md +282 -0
  648. package/data/uniappx/api/create-map-context.md +677 -0
  649. package/data/uniappx/api/create-request-permission-listener.md +147 -0
  650. package/data/uniappx/api/create-rewarded-video-ad.md +302 -0
  651. package/data/uniappx/api/create-selector-query.md +609 -0
  652. package/data/uniappx/api/create-video-context.md +190 -0
  653. package/data/uniappx/api/create-webview-context.md +274 -0
  654. package/data/uniappx/api/create-worker.md +607 -0
  655. package/data/uniappx/api/dialog-page.md +377 -0
  656. package/data/uniappx/api/dom/README.md +319 -0
  657. package/data/uniappx/api/dom/cssstyledeclaration.md +341 -0
  658. package/data/uniappx/api/dom/domrect.md +30 -0
  659. package/data/uniappx/api/dom/drawablecontext.md +63 -0
  660. package/data/uniappx/api/dom/element.md +3 -0
  661. package/data/uniappx/api/dom/unicanvaselement.md +29 -0
  662. package/data/uniappx/api/dom/unielement.md +211 -0
  663. package/data/uniappx/api/dom/uniimageelement.md +23 -0
  664. package/data/uniappx/api/dom/uniinputelement.md +25 -0
  665. package/data/uniappx/api/dom/uninativeviewelement.md +18 -0
  666. package/data/uniappx/api/dom/uniresizeobserver.md +20 -0
  667. package/data/uniappx/api/dom/unitextareaelement.md +25 -0
  668. package/data/uniappx/api/dom/unitextelement.md +23 -0
  669. package/data/uniappx/api/dom/univideoelement.md +18 -0
  670. package/data/uniappx/api/dom/uniwebviewelement.md +18 -0
  671. package/data/uniappx/api/download-file.md +226 -0
  672. package/data/uniappx/api/env.md +101 -0
  673. package/data/uniappx/api/event-bus.md +184 -0
  674. package/data/uniappx/api/exit.md +134 -0
  675. package/data/uniappx/api/ext.md +61 -0
  676. package/data/uniappx/api/facial-recognition-meta-info.md +131 -0
  677. package/data/uniappx/api/facial-recognition-verify.md +3 -0
  678. package/data/uniappx/api/file-system-spec.md +223 -0
  679. package/data/uniappx/api/get-accessibility-info.md +113 -0
  680. package/data/uniappx/api/get-app-authorize-setting.md +276 -0
  681. package/data/uniappx/api/get-app-base-info.md +175 -0
  682. package/data/uniappx/api/get-app.md +175 -0
  683. package/data/uniappx/api/get-background-audio-manager.md +509 -0
  684. package/data/uniappx/api/get-battery-info.md +106 -0
  685. package/data/uniappx/api/get-current-pages.md +215 -0
  686. package/data/uniappx/api/get-device-info.md +188 -0
  687. package/data/uniappx/api/get-element-by-id.md +103 -0
  688. package/data/uniappx/api/get-element.md +3 -0
  689. package/data/uniappx/api/get-file-system-manager.md +2351 -0
  690. package/data/uniappx/api/get-image-info.md +143 -0
  691. package/data/uniappx/api/get-launch-options-sync.md +3 -0
  692. package/data/uniappx/api/get-location.md +362 -0
  693. package/data/uniappx/api/get-network-type.md +96 -0
  694. package/data/uniappx/api/get-performance.md +299 -0
  695. package/data/uniappx/api/get-provider.md +3 -0
  696. package/data/uniappx/api/get-recorder-manager.md +408 -0
  697. package/data/uniappx/api/get-system-info.md +527 -0
  698. package/data/uniappx/api/get-system-setting.md +133 -0
  699. package/data/uniappx/api/get-univerify-manager.md +549 -0
  700. package/data/uniappx/api/get-video-info.md +150 -0
  701. package/data/uniappx/api/get-window-info.md +163 -0
  702. package/data/uniappx/api/gyroscope.md +389 -0
  703. package/data/uniappx/api/image.md +40 -0
  704. package/data/uniappx/api/install-apk.md +93 -0
  705. package/data/uniappx/api/interceptor.md +84 -0
  706. package/data/uniappx/api/is-simulator.md +120 -0
  707. package/data/uniappx/api/keyboard.md +194 -0
  708. package/data/uniappx/api/launch.md +200 -0
  709. package/data/uniappx/api/load-font-face.md +206 -0
  710. package/data/uniappx/api/loading.md +186 -0
  711. package/data/uniappx/api/locale.md +74 -0
  712. package/data/uniappx/api/location-change.md +533 -0
  713. package/data/uniappx/api/make-phone-call.md +102 -0
  714. package/data/uniappx/api/memory.md +135 -0
  715. package/data/uniappx/api/modal.md +232 -0
  716. package/data/uniappx/api/navigator-bar-loading.md +122 -0
  717. package/data/uniappx/api/navigator.md +478 -0
  718. package/data/uniappx/api/network-status-change.md +145 -0
  719. package/data/uniappx/api/network-summarize.md +40 -0
  720. package/data/uniappx/api/nodes-info.md +3 -0
  721. package/data/uniappx/api/on-tab-bar-mid-button-tap.md +34 -0
  722. package/data/uniappx/api/open-app-authorize-setting.md +117 -0
  723. package/data/uniappx/api/open-document.md +122 -0
  724. package/data/uniappx/api/open-location.md +154 -0
  725. package/data/uniappx/api/page-scroll-to.md +170 -0
  726. package/data/uniappx/api/path2d.md +48 -0
  727. package/data/uniappx/api/preview-image.md +341 -0
  728. package/data/uniappx/api/privacy.md +232 -0
  729. package/data/uniappx/api/provider.md +329 -0
  730. package/data/uniappx/api/pull-down-refresh.md +154 -0
  731. package/data/uniappx/api/push.md +1 -0
  732. package/data/uniappx/api/report.md +150 -0
  733. package/data/uniappx/api/request-merchant-transfer.md +117 -0
  734. package/data/uniappx/api/request-payment.md +315 -0
  735. package/data/uniappx/api/request-system-permission.md +220 -0
  736. package/data/uniappx/api/request.md +517 -0
  737. package/data/uniappx/api/rpx2px.md +94 -0
  738. package/data/uniappx/api/save-image-to-photos-album.md +115 -0
  739. package/data/uniappx/api/save-video-to-photos-album.md +102 -0
  740. package/data/uniappx/api/scan-code.md +118 -0
  741. package/data/uniappx/api/screen-brightness.md +333 -0
  742. package/data/uniappx/api/set-navigation-bar-color.md +133 -0
  743. package/data/uniappx/api/set-navigation-bar-title.md +117 -0
  744. package/data/uniappx/api/set-tab-bar.md +651 -0
  745. package/data/uniappx/api/set-tabbar.md +3 -0
  746. package/data/uniappx/api/share-with-system.md +139 -0
  747. package/data/uniappx/api/share.md +325 -0
  748. package/data/uniappx/api/show-action-sheet.md +3 -0
  749. package/data/uniappx/api/show-loading.md +3 -0
  750. package/data/uniappx/api/show-modal.md +3 -0
  751. package/data/uniappx/api/show-toast.md +3 -0
  752. package/data/uniappx/api/sign-in.md +358 -0
  753. package/data/uniappx/api/storage.md +719 -0
  754. package/data/uniappx/api/theme-change.md +742 -0
  755. package/data/uniappx/api/theme.md +3 -0
  756. package/data/uniappx/api/toast.md +180 -0
  757. package/data/uniappx/api/uni-push.md +513 -0
  758. package/data/uniappx/api/unicloud/README.md +87 -0
  759. package/data/uniappx/api/unicloud/database.md +1028 -0
  760. package/data/uniappx/api/unicloud/function.md +83 -0
  761. package/data/uniappx/api/unicloud/object.md +138 -0
  762. package/data/uniappx/api/unicloud/sse-channel.md +92 -0
  763. package/data/uniappx/api/unicloud/storage.md +204 -0
  764. package/data/uniappx/api/unicloud/utils.md +153 -0
  765. package/data/uniappx/api/unipage.md +263 -0
  766. package/data/uniappx/api/upload-file.md +233 -0
  767. package/data/uniappx/api/vibrate.md +177 -0
  768. package/data/uniappx/api/virtual-payment.md +517 -0
  769. package/data/uniappx/api/websocket-global.md +3 -0
  770. package/data/uniappx/api/websocket.md +562 -0
  771. package/data/uniappx/api/wide-screen-adaptation.md +433 -0
  772. package/data/uniappx/api/wifi.md +508 -0
  773. package/data/uniappx/api/window.md +86 -0
  774. package/data/uniappx/app-harmony/README.md +74 -0
  775. package/data/uniappx/app-harmony/harmony-vapor.md +3 -0
  776. package/data/uniappx/app-vapor.md +583 -0
  777. package/data/uniappx/benchmark/vapor-benchmark-android.md +483 -0
  778. package/data/uniappx/benchmark/vapor-benchmark-harmony.md +309 -0
  779. package/data/uniappx/benchmark/vapor-benchmark-ios.md +373 -0
  780. package/data/uniappx/collocation/_sidebar.md +15 -0
  781. package/data/uniappx/collocation/app.md +370 -0
  782. package/data/uniappx/collocation/manifest-android.md +1289 -0
  783. package/data/uniappx/collocation/manifest-harmony.md +152 -0
  784. package/data/uniappx/collocation/manifest-ios.md +709 -0
  785. package/data/uniappx/collocation/manifest-modules.md +508 -0
  786. package/data/uniappx/collocation/manifest-splashscreen.md +227 -0
  787. package/data/uniappx/collocation/manifest.md +745 -0
  788. package/data/uniappx/collocation/pagesjson.md +790 -0
  789. package/data/uniappx/collocation/themejson.md +176 -0
  790. package/data/uniappx/compiler/README.md +121 -0
  791. package/data/uniappx/compiler/_sidebar.md +4 -0
  792. package/data/uniappx/component/README.md +206 -0
  793. package/data/uniappx/component/_sidebar.md +118 -0
  794. package/data/uniappx/component/ad-custom.md +29 -0
  795. package/data/uniappx/component/ad.md +124 -0
  796. package/data/uniappx/component/animation-view.md +51 -0
  797. package/data/uniappx/component/aria-component.md +21 -0
  798. package/data/uniappx/component/audio.md +4 -0
  799. package/data/uniappx/component/block.md +26 -0
  800. package/data/uniappx/component/button.md +298 -0
  801. package/data/uniappx/component/camera.md +303 -0
  802. package/data/uniappx/component/canvas.md +230 -0
  803. package/data/uniappx/component/channel-live.md +27 -0
  804. package/data/uniappx/component/channel-video.md +38 -0
  805. package/data/uniappx/component/checkbox-group.md +56 -0
  806. package/data/uniappx/component/checkbox.md +247 -0
  807. package/data/uniappx/component/common.md +637 -0
  808. package/data/uniappx/component/cover-image.md +42 -0
  809. package/data/uniappx/component/cover-view.md +93 -0
  810. package/data/uniappx/component/custom-tab-bar.md +36 -0
  811. package/data/uniappx/component/double-tap-gesture-handler.md +36 -0
  812. package/data/uniappx/component/draggable-sheet.md +31 -0
  813. package/data/uniappx/component/editor.md +329 -0
  814. package/data/uniappx/component/flow-item.md +3 -0
  815. package/data/uniappx/component/force-press-gesture-handler.md +36 -0
  816. package/data/uniappx/component/form.md +378 -0
  817. package/data/uniappx/component/functional-page-navigator.md +43 -0
  818. package/data/uniappx/component/glass-effect-view.md +217 -0
  819. package/data/uniappx/component/grid-builder.md +39 -0
  820. package/data/uniappx/component/grid-view.md +35 -0
  821. package/data/uniappx/component/horizontal-drag-gesture-handler.md +40 -0
  822. package/data/uniappx/component/icon.md +41 -0
  823. package/data/uniappx/component/image.md +264 -0
  824. package/data/uniappx/component/input.md +905 -0
  825. package/data/uniappx/component/keyboard-accessory.md +21 -0
  826. package/data/uniappx/component/label.md +134 -0
  827. package/data/uniappx/component/list-builder.md +36 -0
  828. package/data/uniappx/component/list-item.md +1 -0
  829. package/data/uniappx/component/list-view.md +508 -0
  830. package/data/uniappx/component/live-player.md +267 -0
  831. package/data/uniappx/component/live-pusher.md +343 -0
  832. package/data/uniappx/component/loading.md +309 -0
  833. package/data/uniappx/component/long-press-gesture-handler.md +40 -0
  834. package/data/uniappx/component/map.md +376 -0
  835. package/data/uniappx/component/match-media.md +132 -0
  836. package/data/uniappx/component/movable-area.md +37 -0
  837. package/data/uniappx/component/movable-view.md +157 -0
  838. package/data/uniappx/component/native-component.md +21 -0
  839. package/data/uniappx/component/native-view.md +342 -0
  840. package/data/uniappx/component/navigation-bar.md +44 -0
  841. package/data/uniappx/component/navigator.md +143 -0
  842. package/data/uniappx/component/nested-scroll-body.md +122 -0
  843. package/data/uniappx/component/nested-scroll-header.md +121 -0
  844. package/data/uniappx/component/nested-scroll.md +6 -0
  845. package/data/uniappx/component/official-account.md +21 -0
  846. package/data/uniappx/component/open-container.md +38 -0
  847. package/data/uniappx/component/page-container.md +386 -0
  848. package/data/uniappx/component/page-meta.md +79 -0
  849. package/data/uniappx/component/pan-gesture-handler.md +40 -0
  850. package/data/uniappx/component/picker-view-column.md +3 -0
  851. package/data/uniappx/component/picker-view.md +180 -0
  852. package/data/uniappx/component/picker.md +370 -0
  853. package/data/uniappx/component/progress.md +163 -0
  854. package/data/uniappx/component/radio-group.md +56 -0
  855. package/data/uniappx/component/radio.md +218 -0
  856. package/data/uniappx/component/rich-text.md +244 -0
  857. package/data/uniappx/component/root-portal.md +26 -0
  858. package/data/uniappx/component/scale-gesture-handler.md +45 -0
  859. package/data/uniappx/component/scroll-view.md +556 -0
  860. package/data/uniappx/component/share-element.md +221 -0
  861. package/data/uniappx/component/slider.md +232 -0
  862. package/data/uniappx/component/snapshot.md +30 -0
  863. package/data/uniappx/component/span.md +21 -0
  864. package/data/uniappx/component/sticky-header.md +138 -0
  865. package/data/uniappx/component/sticky-section.md +152 -0
  866. package/data/uniappx/component/sticky.md +6 -0
  867. package/data/uniappx/component/store-home.md +26 -0
  868. package/data/uniappx/component/store-product.md +28 -0
  869. package/data/uniappx/component/swiper-item.md +3 -0
  870. package/data/uniappx/component/swiper.md +380 -0
  871. package/data/uniappx/component/switch.md +189 -0
  872. package/data/uniappx/component/tap-gesture-handler.md +36 -0
  873. package/data/uniappx/component/text.md +384 -0
  874. package/data/uniappx/component/textarea.md +603 -0
  875. package/data/uniappx/component/uni-ui-x/README.md +165 -0
  876. package/data/uniappx/component/uni-ui-x/uni-badge-view.md +260 -0
  877. package/data/uniappx/component/uni-ui-x/uni-collapse-item.md +3 -0
  878. package/data/uniappx/component/uni-ui-x/uni-collapse.md +696 -0
  879. package/data/uniappx/component/uni-ui-x/uni-drag-cell.md +782 -0
  880. package/data/uniappx/component/uni-ui-x/uni-fab-button.md +137 -0
  881. package/data/uniappx/component/uni-ui-x/uni-index-bar.md +224 -0
  882. package/data/uniappx/component/uni-ui-x/uni-link.md +190 -0
  883. package/data/uniappx/component/uni-ui-x/uni-nav-bar.md +173 -0
  884. package/data/uniappx/component/uni-ui-x/uni-number-box.md +234 -0
  885. package/data/uniappx/component/uni-ui-x/uni-rate.md +151 -0
  886. package/data/uniappx/component/uni-ui-x/uni-refresh-box.md +250 -0
  887. package/data/uniappx/component/uni-ui-x/uni-tab-bar.md +3 -0
  888. package/data/uniappx/component/uni-ui-x/uni-tab-content.md +3 -0
  889. package/data/uniappx/component/uni-ui-x/uni-tab-item.md +3 -0
  890. package/data/uniappx/component/uni-ui-x/uni-tab-midbutton.md +3 -0
  891. package/data/uniappx/component/uni-ui-x/uni-tab.md +1161 -0
  892. package/data/uniappx/component/uni-ui-x/uni-time-format.md +213 -0
  893. package/data/uniappx/component/unicloud-db.md +270 -0
  894. package/data/uniappx/component/vertical-drag-gesture-handler.md +40 -0
  895. package/data/uniappx/component/video.md +627 -0
  896. package/data/uniappx/component/view.md +216 -0
  897. package/data/uniappx/component/voip-room.md +43 -0
  898. package/data/uniappx/component/waterflow.md +407 -0
  899. package/data/uniappx/component/web-view.md +460 -0
  900. package/data/uniappx/css/README.md +436 -0
  901. package/data/uniappx/css/_sidebar.md +104 -0
  902. package/data/uniappx/css/align-content.md +338 -0
  903. package/data/uniappx/css/align-items.md +276 -0
  904. package/data/uniappx/css/align-self.md +291 -0
  905. package/data/uniappx/css/animation-composition.md +33 -0
  906. package/data/uniappx/css/animation-delay.md +26 -0
  907. package/data/uniappx/css/animation-direction.md +34 -0
  908. package/data/uniappx/css/animation-duration.md +31 -0
  909. package/data/uniappx/css/animation-fill-mode.md +34 -0
  910. package/data/uniappx/css/animation-iteration-count.md +31 -0
  911. package/data/uniappx/css/animation-name.md +31 -0
  912. package/data/uniappx/css/animation-play-state.md +32 -0
  913. package/data/uniappx/css/animation-range-end.md +26 -0
  914. package/data/uniappx/css/animation-range-start.md +26 -0
  915. package/data/uniappx/css/animation-range.md +34 -0
  916. package/data/uniappx/css/animation-timeline.md +34 -0
  917. package/data/uniappx/css/animation-timing-function.md +45 -0
  918. package/data/uniappx/css/animation.md +36 -0
  919. package/data/uniappx/css/backdrop-filter.md +255 -0
  920. package/data/uniappx/css/background-clip.md +36 -0
  921. package/data/uniappx/css/background-color.md +353 -0
  922. package/data/uniappx/css/background-image.md +152 -0
  923. package/data/uniappx/css/background.md +35 -0
  924. package/data/uniappx/css/border-bottom-color.md +39 -0
  925. package/data/uniappx/css/border-bottom-left-radius.md +33 -0
  926. package/data/uniappx/css/border-bottom-right-radius.md +33 -0
  927. package/data/uniappx/css/border-bottom-style.md +37 -0
  928. package/data/uniappx/css/border-bottom-width.md +44 -0
  929. package/data/uniappx/css/border-bottom.md +201 -0
  930. package/data/uniappx/css/border-color.md +284 -0
  931. package/data/uniappx/css/border-left-color.md +34 -0
  932. package/data/uniappx/css/border-left-style.md +37 -0
  933. package/data/uniappx/css/border-left-width.md +44 -0
  934. package/data/uniappx/css/border-left.md +200 -0
  935. package/data/uniappx/css/border-radius.md +391 -0
  936. package/data/uniappx/css/border-right-color.md +34 -0
  937. package/data/uniappx/css/border-right-style.md +37 -0
  938. package/data/uniappx/css/border-right-width.md +44 -0
  939. package/data/uniappx/css/border-right.md +201 -0
  940. package/data/uniappx/css/border-style.md +271 -0
  941. package/data/uniappx/css/border-top-color.md +34 -0
  942. package/data/uniappx/css/border-top-left-radius.md +33 -0
  943. package/data/uniappx/css/border-top-right-radius.md +33 -0
  944. package/data/uniappx/css/border-top-style.md +37 -0
  945. package/data/uniappx/css/border-top-width.md +44 -0
  946. package/data/uniappx/css/border-top.md +201 -0
  947. package/data/uniappx/css/border-width.md +415 -0
  948. package/data/uniappx/css/border.md +302 -0
  949. package/data/uniappx/css/bottom.md +259 -0
  950. package/data/uniappx/css/box-shadow.md +879 -0
  951. package/data/uniappx/css/box-sizing.md +353 -0
  952. package/data/uniappx/css/color.md +158 -0
  953. package/data/uniappx/css/common/at-rules.md +244 -0
  954. package/data/uniappx/css/common/color.md +40 -0
  955. package/data/uniappx/css/common/function.md +661 -0
  956. package/data/uniappx/css/common/length.md +178 -0
  957. package/data/uniappx/css/common/selector.md +55 -0
  958. package/data/uniappx/css/common/style-isolation.md +215 -0
  959. package/data/uniappx/css/common/variable.md +1 -0
  960. package/data/uniappx/css/css_diff_web.md +802 -0
  961. package/data/uniappx/css/direction.md +146 -0
  962. package/data/uniappx/css/display.md +42 -0
  963. package/data/uniappx/css/flex-basis.md +306 -0
  964. package/data/uniappx/css/flex-direction.md +243 -0
  965. package/data/uniappx/css/flex-flow.md +283 -0
  966. package/data/uniappx/css/flex-grow.md +318 -0
  967. package/data/uniappx/css/flex-shrink.md +313 -0
  968. package/data/uniappx/css/flex-wrap.md +259 -0
  969. package/data/uniappx/css/flex.md +216 -0
  970. package/data/uniappx/css/font-family.md +187 -0
  971. package/data/uniappx/css/font-size.md +176 -0
  972. package/data/uniappx/css/font-style.md +139 -0
  973. package/data/uniappx/css/font-weight.md +167 -0
  974. package/data/uniappx/css/height.md +239 -0
  975. package/data/uniappx/css/justify-content.md +286 -0
  976. package/data/uniappx/css/left.md +260 -0
  977. package/data/uniappx/css/letter-spacing.md +149 -0
  978. package/data/uniappx/css/line-height.md +173 -0
  979. package/data/uniappx/css/lines.md +37 -0
  980. package/data/uniappx/css/margin-bottom.md +281 -0
  981. package/data/uniappx/css/margin-left.md +281 -0
  982. package/data/uniappx/css/margin-right.md +278 -0
  983. package/data/uniappx/css/margin-top.md +274 -0
  984. package/data/uniappx/css/margin.md +315 -0
  985. package/data/uniappx/css/max-height.md +242 -0
  986. package/data/uniappx/css/max-width.md +251 -0
  987. package/data/uniappx/css/min-height.md +252 -0
  988. package/data/uniappx/css/min-width.md +243 -0
  989. package/data/uniappx/css/opacity.md +248 -0
  990. package/data/uniappx/css/overflow.md +330 -0
  991. package/data/uniappx/css/padding-bottom.md +241 -0
  992. package/data/uniappx/css/padding-left.md +234 -0
  993. package/data/uniappx/css/padding-right.md +242 -0
  994. package/data/uniappx/css/padding-top.md +234 -0
  995. package/data/uniappx/css/padding.md +309 -0
  996. package/data/uniappx/css/pointer-events.md +155 -0
  997. package/data/uniappx/css/position.md +444 -0
  998. package/data/uniappx/css/right.md +260 -0
  999. package/data/uniappx/css/text-align.md +154 -0
  1000. package/data/uniappx/css/text-decoration-color.md +35 -0
  1001. package/data/uniappx/css/text-decoration-line.md +144 -0
  1002. package/data/uniappx/css/text-decoration-style.md +41 -0
  1003. package/data/uniappx/css/text-decoration-thickness.md +39 -0
  1004. package/data/uniappx/css/text-decoration.md +52 -0
  1005. package/data/uniappx/css/text-overflow.md +176 -0
  1006. package/data/uniappx/css/text-shadow.md +146 -0
  1007. package/data/uniappx/css/top.md +258 -0
  1008. package/data/uniappx/css/transform-origin.md +298 -0
  1009. package/data/uniappx/css/transform.md +50 -0
  1010. package/data/uniappx/css/transition-delay.md +253 -0
  1011. package/data/uniappx/css/transition-duration.md +275 -0
  1012. package/data/uniappx/css/transition-property.md +67 -0
  1013. package/data/uniappx/css/transition-timing-function.md +259 -0
  1014. package/data/uniappx/css/transition.md +527 -0
  1015. package/data/uniappx/css/visibility.md +198 -0
  1016. package/data/uniappx/css/white-space.md +162 -0
  1017. package/data/uniappx/css/width.md +300 -0
  1018. package/data/uniappx/css/z-index.md +411 -0
  1019. package/data/uniappx/debug/android-inspector.md +54 -0
  1020. package/data/uniappx/i18n.md +358 -0
  1021. package/data/uniappx/mp/README.md +159 -0
  1022. package/data/uniappx/native/README.md +65 -0
  1023. package/data/uniappx/native/debug/android.md +122 -0
  1024. package/data/uniappx/native/debug/harmony.md +116 -0
  1025. package/data/uniappx/native/debug/ios.md +84 -0
  1026. package/data/uniappx/native/download/android.md +45 -0
  1027. package/data/uniappx/native/download/ios.md +29 -0
  1028. package/data/uniappx/native/modules/android/others.md +1343 -0
  1029. package/data/uniappx/native/modules/android/uni-ad.md +99 -0
  1030. package/data/uniappx/native/modules/android/uni-facialRecognitionVerify.md +69 -0
  1031. package/data/uniappx/native/modules/android/uni-getLocation.md +121 -0
  1032. package/data/uniappx/native/modules/android/uni-map-tencent.md +92 -0
  1033. package/data/uniappx/native/modules/android/uni-oauth.md +57 -0
  1034. package/data/uniappx/native/modules/android/uni-payment.md +110 -0
  1035. package/data/uniappx/native/modules/android/uni-push.md +217 -0
  1036. package/data/uniappx/native/modules/android/uni-share.md +57 -0
  1037. package/data/uniappx/native/modules/android/uni-verify.md +101 -0
  1038. package/data/uniappx/native/modules/android/uni-video.md +125 -0
  1039. package/data/uniappx/native/modules/harmony/facialVerify.md +45 -0
  1040. package/data/uniappx/native/modules/harmony/location.md +43 -0
  1041. package/data/uniappx/native/modules/harmony/map.md +64 -0
  1042. package/data/uniappx/native/modules/harmony/modules.md +23 -0
  1043. package/data/uniappx/native/modules/harmony/oauth.md +47 -0
  1044. package/data/uniappx/native/modules/harmony/pay.md +85 -0
  1045. package/data/uniappx/native/modules/harmony/push.md +74 -0
  1046. package/data/uniappx/native/modules/harmony/verify.md +45 -0
  1047. package/data/uniappx/native/modules/ios/modules.md +943 -0
  1048. package/data/uniappx/native/permission/android_permission_adapter.md +62 -0
  1049. package/data/uniappx/native/use/android.md +521 -0
  1050. package/data/uniappx/native/use/androidcomm.md +104 -0
  1051. package/data/uniappx/native/use/androiduts.md +388 -0
  1052. package/data/uniappx/native/use/harmony.md +99 -0
  1053. package/data/uniappx/native/use/harmonyapi.md +190 -0
  1054. package/data/uniappx/native/use/harmonyuts.md +62 -0
  1055. package/data/uniappx/native/use/ios.md +90 -0
  1056. package/data/uniappx/native/use/iosapi.md +288 -0
  1057. package/data/uniappx/native/use/iosuts.md +87 -0
  1058. package/data/uniappx/page.md +486 -0
  1059. package/data/uniappx/performance.md +175 -0
  1060. package/data/uniappx/plugin/NOTE.md +5 -0
  1061. package/data/uniappx/project.md +149 -0
  1062. package/data/uniappx/readme.md +381 -0
  1063. package/data/uniappx/release-note-alpha.md +2219 -0
  1064. package/data/uniappx/release.md +1961 -0
  1065. package/data/uniappx/sample.md +157 -0
  1066. package/data/uniappx/select.md +3 -0
  1067. package/data/uniappx/tutorial/android-16kb.md +87 -0
  1068. package/data/uniappx/tutorial/android-memoryleak.md +542 -0
  1069. package/data/uniappx/tutorial/app-env.md +80 -0
  1070. package/data/uniappx/tutorial/app-market.md +51 -0
  1071. package/data/uniappx/tutorial/app-package.md +195 -0
  1072. package/data/uniappx/tutorial/app-playground.md +188 -0
  1073. package/data/uniappx/tutorial/bug_repair.md +40 -0
  1074. package/data/uniappx/tutorial/codegap.md +223 -0
  1075. package/data/uniappx/tutorial/compatibility.md +119 -0
  1076. package/data/uniappx/tutorial/compliance.md +671 -0
  1077. package/data/uniappx/tutorial/debug/devtools.md +134 -0
  1078. package/data/uniappx/tutorial/idref.md +121 -0
  1079. package/data/uniappx/tutorial/ls-plugin.md +181 -0
  1080. package/data/uniappx/tutorial/request.md +204 -0
  1081. package/data/uniappx/tutorial/rules_mcp.md +121 -0
  1082. package/data/uniappx/tutorial/stickynestlist.md +68 -0
  1083. package/data/uniappx/tutorial/store.md +130 -0
  1084. package/data/uniappx/uniapptox.md +145 -0
  1085. package/data/uniappx/uts/README.md +441 -0
  1086. package/data/uniappx/uts/_sidebar.md +55 -0
  1087. package/data/uniappx/uts/buildin-object-api/array.md +2265 -0
  1088. package/data/uniappx/uts/buildin-object-api/arraybuffer.md +480 -0
  1089. package/data/uniappx/uts/buildin-object-api/console.md +520 -0
  1090. package/data/uniappx/uts/buildin-object-api/dataview.md +853 -0
  1091. package/data/uniappx/uts/buildin-object-api/date.md +1534 -0
  1092. package/data/uniappx/uts/buildin-object-api/error.md +30 -0
  1093. package/data/uniappx/uts/buildin-object-api/float32array.md +581 -0
  1094. package/data/uniappx/uts/buildin-object-api/float64array.md +626 -0
  1095. package/data/uniappx/uts/buildin-object-api/global.md +600 -0
  1096. package/data/uniappx/uts/buildin-object-api/int16array.md +1069 -0
  1097. package/data/uniappx/uts/buildin-object-api/int32array.md +1137 -0
  1098. package/data/uniappx/uts/buildin-object-api/int8array.md +1166 -0
  1099. package/data/uniappx/uts/buildin-object-api/json.md +407 -0
  1100. package/data/uniappx/uts/buildin-object-api/map.md +479 -0
  1101. package/data/uniappx/uts/buildin-object-api/math.md +1525 -0
  1102. package/data/uniappx/uts/buildin-object-api/number.md +852 -0
  1103. package/data/uniappx/uts/buildin-object-api/promise.md +1444 -0
  1104. package/data/uniappx/uts/buildin-object-api/regexp.md +534 -0
  1105. package/data/uniappx/uts/buildin-object-api/set.md +317 -0
  1106. package/data/uniappx/uts/buildin-object-api/string.md +1604 -0
  1107. package/data/uniappx/uts/buildin-object-api/textdecoder.md +133 -0
  1108. package/data/uniappx/uts/buildin-object-api/textencoder.md +60 -0
  1109. package/data/uniappx/uts/buildin-object-api/timers.md +145 -0
  1110. package/data/uniappx/uts/buildin-object-api/uint16array.md +1154 -0
  1111. package/data/uniappx/uts/buildin-object-api/uint32array.md +1165 -0
  1112. package/data/uniappx/uts/buildin-object-api/uint8array.md +1146 -0
  1113. package/data/uniappx/uts/buildin-object-api/uint8clampedarray.md +1147 -0
  1114. package/data/uniappx/uts/buildin-object-api/utsjsonobject.md +1297 -0
  1115. package/data/uniappx/uts/class.md +462 -0
  1116. package/data/uniappx/uts/compiler-known-issues.md +865 -0
  1117. package/data/uniappx/uts/conditional.md +206 -0
  1118. package/data/uniappx/uts/data-type.md +2242 -0
  1119. package/data/uniappx/uts/enumerability.md +15 -0
  1120. package/data/uniappx/uts/enumerability_iterable.md +200 -0
  1121. package/data/uniappx/uts/exception.md +25 -0
  1122. package/data/uniappx/uts/function.md +358 -0
  1123. package/data/uniappx/uts/generics.md +246 -0
  1124. package/data/uniappx/uts/interface.md +35 -0
  1125. package/data/uniappx/uts/iterable.md +137 -0
  1126. package/data/uniappx/uts/keywords.md +393 -0
  1127. package/data/uniappx/uts/literal.md +216 -0
  1128. package/data/uniappx/uts/loops.md +236 -0
  1129. package/data/uniappx/uts/module.md +92 -0
  1130. package/data/uniappx/uts/object.md +155 -0
  1131. package/data/uniappx/uts/operator.md +295 -0
  1132. package/data/uniappx/uts/runtime-known-issues.md +94 -0
  1133. package/data/uniappx/uts/type-aliases.md +43 -0
  1134. package/data/uniappx/uts/type-compatibility.md +133 -0
  1135. package/data/uniappx/uts/uts-optimize.md +33 -0
  1136. package/data/uniappx/uts/uts_diff_ts.md +2443 -0
  1137. package/data/uniappx/uts/utsactivitycallback.md +3099 -0
  1138. package/data/uniappx/uts/utsandroid.md +1461 -0
  1139. package/data/uniappx/uts/utsandroidhookproxy.md +34 -0
  1140. package/data/uniappx/uts/utsharmony.md +348 -0
  1141. package/data/uniappx/uts/utsios.md +466 -0
  1142. package/data/uniappx/uts/utsioshookproxy.md +374 -0
  1143. package/data/uniappx/vapor-benchmark.md +9 -0
  1144. package/data/uniappx/vue/README.md +384 -0
  1145. package/data/uniappx/vue/_sidebar.md +10 -0
  1146. package/data/uniappx/vue/advanced-api.md +253 -0
  1147. package/data/uniappx/vue/built-in.md +2133 -0
  1148. package/data/uniappx/vue/component.md +1134 -0
  1149. package/data/uniappx/vue/composition-api.md +2169 -0
  1150. package/data/uniappx/vue/data-bind.md +463 -0
  1151. package/data/uniappx/vue/global-api.md +307 -0
  1152. package/data/uniappx/vue/modifier.md +249 -0
  1153. package/data/uniappx/vue/options-api.md +1489 -0
  1154. package/data/uniappx/vue/others.md +20 -0
  1155. package/data/uniappx/web/README.md +263 -0
  1156. package/data/uniappx/web/ssr.md +238 -0
  1157. package/data/uniappx/worktile/NOTE.md +5 -0
  1158. package/data/uniappx-doc-index.json +7664 -0
  1159. package/dist/main.mjs +67 -45
  1160. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"UniVideoEvent":{"name":"## UniVideoEvent","description":"video 通用事件,组件Event接口无法直接继承UniEvent","extends":"","param":"\n### UniVideoEvent 的属性值 @univideoevent-values\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| bubbles | boolean | 是 | 是否冒泡 |\n| cancelable | boolean | 是 | 是否可以取消 |\n| type | string | 是 | 事件类型 |\n| target | [UniElement](/api/dom/unielement.md) | 否 | 触发事件的组件 |\n| currentTarget | [UniElement](/api/dom/unielement.md) | 否 | 当前组件 |\n| timeStamp | number | 是 | 事件发生时的时间戳 |\n","methods":{"stopPropagation":{"name":"#### stopPropagation(): void @stoppropagation","originName":"stopPropagation","description":"阻止当前事件的进一步传播","compatibility":"","param":"","fileFormats":"","returnValue":"","tutorial":""},"preventDefault":{"name":"#### preventDefault(): void @preventdefault","originName":"preventDefault","description":"阻止当前事件的默认行为","compatibility":"","param":"","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":""},"UniElement":{"name":"## UniElement","description":"所有组件的 DOM 元素对象基类,描述了 UVUE DOM 元素所普通具有的属性和方法。","extends":"","param":"\n### UniElement 的属性值 @unielement-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| id | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"iOS(Vapor) UTS 插件\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"4.0\",\"x\",\"4.0\",\"4.11\",\"4.25\",\"x\",\"x\",\"5.0\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素的标识符 |\n| isConnected | boolean | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"iOS(Vapor) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.0\",\"4.11\",\"4.25\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素是否与 DOM 树连接 |\n| attributes | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS(VDOM)\"},{\"title\":\"iOS(Vapor)\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"4.0\",\"x\",\"4.0\",\"x\",\"4.11\",\"x\",\"4.25\",\"4.61\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素上所有属性元素的集合 |\n| classList | Array&lt;string&gt; | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.0\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素 class 属性的动态集合 |\n| dataset | any | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41 仅在event对象内的target上可用\",\"4.0\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素上自定义数据属性(data-*)的集合 |\n| children | Array&lt;[UniElement](/api/dom/unielement.md)&gt; | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素包含的子元素的集合 |\n| firstChild | [UniElement](/api/dom/unielement.md) | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素的第一个子元素,如果元素是无子元素,则返回 null |\n| lastChild | [UniElement](/api/dom/unielement.md) | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素的最后一个子元素,如果没有子元素,则返回 null |\n| parentElement | [UniElement](/api/dom/unielement.md) | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素在 DOM 树中的父元素,如果没有父元素(如未添加到DOM树中),则返回null。 |\n| nextElementSibling | [UniElement](/api/dom/unielement.md) | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素在 DOM 树中紧跟在其后面的同级元素,如果当前元素为最后一个元素,则返回 null |\n| offsetLeft | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41 仅在event对象内的target上可用\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 只读属性,当前元素左上角相对于其定位父元素内边框(Border内侧)左边缘的逻辑像素值 |\n| offsetTop | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41 仅在event对象内的target上可用\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 只读属性,当前元素外边框左上角相对于其定位父元素内边框(Border内侧)顶部边缘的逻辑像素值 |\n| offsetWidth | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素的布局宽度逻辑像素值,包含border、padding区域 |\n| offsetHeight | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素的布局高度逻辑像素值,包含border、padding区域 |\n| style | [CSSStyleDeclaration](/api/dom/cssstyledeclaration.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 只读属性,当前元素的CSS样式对象 |\n| scrollWidth | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"5.13\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 只读属性,当前元素的可滚动内容总宽度,仅scroll-view、list-view等可滚动组件支持,其他组件返回视图宽度 |\n| scrollHeight | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"5.13\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 只读属性,当前元素可滚动内容的总高度,仅scroll-view、list-view等可滚动组件支持,其他组件返回视图高度 |\n| scrollLeft | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"5.13\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 获取或修改当前元素横向滚动的逻辑像素值,仅scroll-view、list-view等可滚动组件支持,其他组件修改无效、获取时返回 0 |\n| scrollTop | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"5.13\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 获取或修改当前元素竖向滚动逻辑像素值,仅scroll-view、list-view可滚动组件支持,其他组件修改无效、获取时返回 0 |\n| tagName | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 只读属性,获取当前元素的标签名 |\n| uniPage | [UniPage](/api/unipage.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.61\",\"4.61\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素所属的页面对象 |\n| innerHTML | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.84\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性,当前元素内部所有子元素(不包括注释节点)的 HTML 内容 |\n","methods":{"takeSnapshot":{"name":"#### takeSnapshot(options: TakeSnapshotOptions): void @takesnapshot","originName":"takeSnapshot","description":"对当前组件进行截图,调用此方法会将当前组件(包含子节点)渲染结果导出成图片。\r\n成功会返回图片对应的临时文件路径,目前默认png格式\r\n","compatibility":"##### takeSnapshot 兼容性 <Help /> \n| Web | 微信小程序 | Android | Android(VDOM) UTS 插件 | iOS | iOS(VDOM) UTS 插件 | HarmonyOS | HarmonyOS UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.93 | 5.23 | 4.11 | 4.25 | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| options | **TakeSnapshotOptions** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 组件截图的参数对象 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| type | string | 否 | \"file\" | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图导出类型,目前仅支持 'file' 保存到临时文件目录 |\n@| format | string | 否 | \"png\" | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图文件格式,目前仅支持 'png' |\n@| success | (res: [TakeSnapshotSuccess](#takesnapshotsuccess-values)) => void | 否 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 接口调用成功的回调函数 |\n@| fail | (res: [TakeSnapshotFail](#takesnapshotfail-values)) => void | 否 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 接口调用失败的回调函数 |\n@| complete | (res: any) => void | 否 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 接口调用结束的回调函数(调用成功、失败都会执行) | \n\n###### TakeSnapshotSuccess 的属性值 @takesnapshotsuccess-values \n\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| tempFilePath | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图保存的临时文件路径 |\n\n###### TakeSnapshotFail 的属性值 @takesnapshotfail-values \n\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| errMsg | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图失败时的错误描述信息 |\n","fileFormats":"","returnValue":"","tutorial":"","example":"##### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/API/element-takesnapshot/element-takesnapshot.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/API/element-takesnapshot/element-takesnapshot.uvue) \n>\n> 该 API 不支持 Web,请运行 hello uni-app x 到 App 平台体验 \n\n::: preview\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/API/element-takesnapshot/element-takesnapshot\n```uvue\n<template>\r\n <!-- #ifdef APP -->\r\n <scroll-view class=\"page-scroll-view uni-theme-root\">\r\n <!-- #endif -->\r\n <view id=\"snapshot-content\" class=\"snapshot-content uni-theme-root\">\r\n <page-head title=\"对本页面根view截图\"></page-head>\r\n <view class=\"uni-padding-wrap\">\r\n <text>this is text</text>\r\n </view>\r\n <button class=\"uni-btn btn-TakeSnapshot\" type=\"primary\" @tap=\"takeSnapshotClick\">\r\n 点击截图并替换显示下方图片\r\n </button>\r\n <image class=\"snapshot-original-image\" :src=\"data.snapImage\" :mode=\"mode\" @longpress=\"saveToAlbum\"></image>\r\n\r\n <!-- 新增 takeSnapshot 测试 -->\r\n <view class=\"section-divider\"></view>\r\n <text class=\"section-title\">takeSnapshot 测试</text>\r\n\r\n <!-- View 元素测试 -->\r\n <view class=\"test-group\">\r\n <view class=\"test-buttons\">\r\n <button class=\"btn-small\" @click=\"takeViewSnapshot\">View</button>\r\n </view>\r\n <view class=\"test-elements\">\r\n <view id=\"snapshot-test-view\" class=\"snapshot-test-small\"></view>\r\n </view>\r\n </view>\r\n <!-- View 截图展示 -->\r\n <view class=\"snapshot-row\" v-if=\"snapshotData.viewSnapshot != null\">\r\n <view class=\"snapshot-data-col\">\r\n <text class=\"snapshot-data-subtitle\">截图结果</text>\r\n <image class=\"snapshot-preview\" :src=\"snapshotData.viewSnapshot\" mode=\"aspectFit\" @longpress=\"saveToAlbum\"></image>\r\n </view>\r\n </view>\r\n\r\n <!-- Text 元素测试 -->\r\n <view class=\"test-group\">\r\n <view class=\"test-buttons\">\r\n <button class=\"btn-small\" @click=\"takeTextSnapshot\">Text</button>\r\n </view>\r\n <view class=\"test-elements\">\r\n <text id=\"snapshot-test-text\" class=\"snapshot-test-text-small\">测试文本</text>\r\n </view>\r\n </view>\r\n <!-- Text 截图展示 -->\r\n <view class=\"snapshot-row\" v-if=\"snapshotData.textSnapshot != null\">\r\n <view class=\"snapshot-data-col\">\r\n <text class=\"snapshot-data-subtitle\">截图结果</text>\r\n <image class=\"snapshot-preview\" :src=\"snapshotData.textSnapshot\" mode=\"aspectFit\" @longpress=\"saveToAlbum\"></image>\r\n </view>\r\n </view>\r\n\r\n <!-- Image 元素测试 -->\r\n <view class=\"test-group\">\r\n <view class=\"test-buttons\">\r\n <button class=\"btn-small\" @click=\"takeImageSnapshot\">Image</button>\r\n </view>\r\n <view class=\"test-elements\">\r\n <image id=\"snapshot-test-image\" class=\"snapshot-test-image-small\" src=\"/static/test-image/logo.png\" mode=\"aspectFit\"></image>\r\n </view>\r\n </view>\r\n <!-- Image 截图展示 -->\r\n <view class=\"snapshot-row\" v-if=\"snapshotData.imageSnapshot != null\">\r\n <view class=\"snapshot-data-col\">\r\n <text class=\"snapshot-data-subtitle\">截图结果</text>\r\n <image class=\"snapshot-preview\" :src=\"snapshotData.imageSnapshot\" mode=\"aspectFit\" @longpress=\"saveToAlbum\"></image>\r\n </view>\r\n </view>\r\n\r\n <!-- ScrollView 元素测试 -->\r\n <button class=\"btn uni-common-mt\" type=\"default\" @click=\"takeScrollViewSnapshot\">takeSnapshot - ScrollView</button>\r\n <scroll-view id=\"snapshot-test-scrollview\" class=\"snapshot-test-scrollview\">\r\n <view class=\"scroll-content\">\r\n <text class=\"scroll-text\">滚动区域内容1</text>\r\n </view>\r\n <view class=\"scroll-content\">\r\n <text class=\"scroll-text\">滚动区域内容2</text>\r\n </view>\r\n <view class=\"scroll-content\">\r\n <text class=\"scroll-text\">滚动区域内容3</text>\r\n </view>\r\n </scroll-view>\r\n <image v-if=\"snapshotData.scrollViewSnapshot\" class=\"snapshot-result-image\" :src=\"snapshotData.scrollViewSnapshot\" mode=\"widthFix\" @longpress=\"saveToAlbum\"></image>\r\n <text v-else class=\"snapshot-placeholder-center\">暂无截图</text>\r\n\r\n <!-- 自定义组件测试 -->\r\n <button class=\"btn uni-common-mt\" type=\"default\" @click=\"takeCustomComponentSnapshot\">takeSnapshot - 自定义组件</button>\r\n <child id=\"snapshot-test-component\" class=\"snapshot-test-component\"></child>\r\n <image v-if=\"snapshotData.customComponentSnapshot\" class=\"snapshot-result-image uni-common-mb\" :src=\"snapshotData.customComponentSnapshot\" mode=\"widthFix\" @longpress=\"saveToAlbum\"></image>\r\n <text v-else class=\"snapshot-placeholder-center\">暂无截图</text>\r\n </view>\r\n <!-- #ifdef APP -->\r\n </scroll-view>\r\n <!-- #endif -->\r\n</template>\r\n\r\n<script setup lang=\"uts\">\r\n import Child from './child.uvue'\r\n\r\n type DataType = {\r\n snapImage: string,\r\n completeTriggered: boolean,\r\n }\r\n\r\n type SnapshotDataType = {\r\n viewSnapshot: string,\r\n textSnapshot: string,\r\n imageSnapshot: string,\r\n scrollViewSnapshot: string,\r\n customComponentSnapshot: string,\r\n }\r\n\r\n const mode = ref(\"center\")//aspectFit\r\n const data = reactive({\r\n snapImage: \"/static/test-image/logo.png\",\r\n completeTriggered: false,\r\n } as DataType)\r\n\r\n const snapshotData = reactive({\r\n viewSnapshot: '',\r\n textSnapshot: '',\r\n imageSnapshot: '',\r\n scrollViewSnapshot: '',\r\n customComponentSnapshot: '',\r\n } as SnapshotDataType)\r\n\r\n function takeSnapshotClick() {\r\n const view = uni.getElementById('snapshot-content')!\r\n view.takeSnapshot({\r\n success: (res) => {\r\n console.log('takeSnapshot success', res.tempFilePath)\r\n data.snapImage = res.tempFilePath\r\n mode.value = 'widthFix'\r\n uni.showToast({\r\n title: '截图成功,路径:' + res.tempFilePath,\r\n icon: \"none\"\r\n })\r\n },\r\n fail: (res) => {\r\n console.log('takeSnapshot fail', res)\r\n uni.showToast({\r\n icon: 'error',\r\n title: '截图失败'\r\n })\r\n },\r\n complete: (res) => {\r\n data.completeTriggered = true\r\n console.log('takeSnapshot complete', res)\r\n }\r\n })\r\n }\r\n\r\n function saveToAlbum(e : TouchEvent) {\r\n // console.log(e.currentTarget!.getAttribute(\"src\"));\r\n let filePath : string = e.currentTarget!.getAttribute(\"src\") as string\r\n uni.showActionSheet({\r\n itemList: [\"保存\"],\r\n success: res => {\r\n // console.log(res.tapIndex);\r\n if (res.tapIndex == 0) {\r\n uni.saveImageToPhotosAlbum({\r\n filePath: filePath,\r\n success() {\r\n uni.showToast({\r\n position: \"center\",\r\n icon: \"none\",\r\n title: \"图片保存成功,请到手机相册查看\"\r\n })\r\n },\r\n fail(e) {\r\n uni.showModal({\r\n content: \"保存相册失败,errCode:\" + e.errCode + \",errMsg:\" + e.errMsg + \",errSubject:\" + e.errSubject,\r\n showCancel: false\r\n });\r\n }\r\n })\r\n }\r\n },\r\n fail: () => { },\r\n complete: () => { }\r\n });\r\n }\r\n\r\n // 通用方法:对元素进行截图\r\n function takeSnapshotForElement(elementId: string, dataKey: keyof SnapshotDataType) {\r\n const element = uni.getElementById(elementId)!\r\n element.takeSnapshot({\r\n success: (res) => {\r\n // console.log('takeSnapshot success', elementId, res.tempFilePath)\r\n snapshotData[dataKey] = res.tempFilePath\r\n uni.showToast({\r\n title: '截图成功',\r\n icon: \"success\"\r\n })\r\n },\r\n fail: (res) => {\r\n // console.log('takeSnapshot fail', elementId, res)\r\n uni.showToast({\r\n icon: 'error',\r\n title: '截图失败'\r\n })\r\n }\r\n })\r\n }\r\n\r\n function takeViewSnapshot() {\r\n takeSnapshotForElement('snapshot-test-view', 'viewSnapshot')\r\n }\r\n\r\n function takeTextSnapshot() {\r\n takeSnapshotForElement('snapshot-test-text', 'textSnapshot')\r\n }\r\n\r\n function takeImageSnapshot() {\r\n takeSnapshotForElement('snapshot-test-image', 'imageSnapshot')\r\n }\r\n\r\n function takeScrollViewSnapshot() {\r\n takeSnapshotForElement('snapshot-test-scrollview', 'scrollViewSnapshot')\r\n }\r\n\r\n function takeCustomComponentSnapshot() {\r\n takeSnapshotForElement('snapshot-test-component', 'customComponentSnapshot')\r\n }\r\n\r\n defineExpose({\r\n data,\r\n snapshotData,\r\n takeSnapshotClick,\r\n takeViewSnapshot,\r\n takeTextSnapshot,\r\n takeImageSnapshot,\r\n takeScrollViewSnapshot,\r\n takeCustomComponentSnapshot\r\n })\r\n</script>\r\n\r\n<style>\r\n .snapshot-content {\r\n --snapshot-divider-color: #e0e0e0;\r\n --snapshot-title-color: #333;\r\n --snapshot-panel-background: #f5f7fa;\r\n --snapshot-panel-border-color: #dcdfe6;\r\n --snapshot-placeholder-color: #909399;\r\n }\r\n\r\n .section-divider {\r\n margin-top: 30px;\r\n height: 1px;\r\n background-color: var(--snapshot-divider-color, #e0e0e0);\r\n }\r\n\r\n .section-title {\r\n margin-top: 15px;\r\n font-size: 16px;\r\n font-weight: bold;\r\n color: var(--snapshot-title-color, #333);\r\n }\r\n\r\n .test-group {\r\n margin: 20px;\r\n flex-direction: column;\r\n }\r\n\r\n .test-buttons {\r\n flex-direction: row;\r\n justify-content: space-around;\r\n margin-bottom: 10px;\r\n }\r\n\r\n .btn-small {\r\n padding: 5px 15px;\r\n font-size: 13px;\r\n border-radius: 4px;\r\n flex: 1;\r\n margin: 0 5px;\r\n }\r\n\r\n .test-elements {\r\n flex-direction: row;\r\n justify-content: space-around;\r\n align-items: center;\r\n margin: 20px;\r\n }\r\n\r\n .snapshot-test-small {\r\n width: 80%;\r\n height: 60px;\r\n background-color: dodgerblue;\r\n }\r\n\r\n .snapshot-test-text-small {\r\n width: 80%;\r\n padding: 8px;\r\n font-size: 14px;\r\n color: #fff;\r\n background-color: #ff6b6b;\r\n }\r\n\r\n .snapshot-test-image-small {\r\n width: 80%;\r\n height: 60px;\r\n background-color: #f0f0f0;\r\n }\r\n\r\n .snapshot-row {\r\n flex-direction: row;\r\n margin-top: 10px;\r\n background-color: var(--snapshot-panel-background, #f5f7fa);\r\n border: 1px solid var(--snapshot-panel-border-color, #dcdfe6);\r\n border-radius: 4px;\r\n padding: 10px;\r\n }\r\n\r\n .snapshot-data-col {\r\n flex: 1;\r\n flex-direction: column;\r\n margin: 0 5px;\r\n align-items: center;\r\n }\r\n\r\n .snapshot-data-subtitle {\r\n font-size: 13px;\r\n font-weight: bold;\r\n color: #409eff;\r\n margin-bottom: 5px;\r\n }\r\n\r\n .snapshot-preview {\r\n width: 100%;\r\n height: 120px;\r\n background-color: #fff;\r\n border-radius: 4px;\r\n }\r\n\r\n .snapshot-placeholder {\r\n font-size: 12px;\r\n color: var(--snapshot-placeholder-color, #909399);\r\n padding: 20px 0;\r\n }\r\n\r\n .snapshot-original-image {\r\n margin-left: auto;\r\n margin-right: auto;\r\n margin-top: 20px;\r\n width: 90%;\r\n }\r\n\r\n .snapshot-result-image {\r\n margin-left: auto;\r\n margin-right: auto;\r\n margin-top: 10px;\r\n width: 90%;\r\n }\r\n\r\n .snapshot-placeholder-center {\r\n font-size: 12px;\r\n color: var(--snapshot-placeholder-color, #909399);\r\n text-align: center;\r\n margin-top: 10px;\r\n }\r\n\r\n .snapshot-test-scrollview {\r\n margin-top: 15px;\r\n height: 120px;\r\n border: 1px solid #dcdfe6;\r\n background-color: #f5f7fa;\r\n }\r\n\r\n .scroll-content {\r\n height: 120px;\r\n padding: 10px;\r\n border: 1px solid #37b4ea;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n\r\n .scroll-text {\n line-height: 30px;\n font-size: 14px;\n color: #606266;\n }\r\n\r\n .snapshot-test-component {\r\n margin-top: 15px;\r\n }\r\n\r\n @media (prefers-color-scheme: dark) {\r\n .snapshot-content {\r\n --snapshot-divider-color: rgba(255, 255, 255, 0.1);\r\n --snapshot-title-color: #ffffff;\r\n --snapshot-panel-background: #2d2d2d;\r\n --snapshot-panel-border-color: rgba(255, 255, 255, 0.1);\r\n --snapshot-placeholder-color: #a0a0a0;\r\n }\r\n }\r\n</style>\r\n\n```\n:::"},"appendChild":{"name":"#### appendChild(aChild: UniElement): void @appendchild","originName":"appendChild","description":"将一个元素添加到指定父元素的子元素列表的末尾处。如果将被插入的元素已经存在于当前文档的文档树中,那么将会它从原先的位置移动到新的位置。","compatibility":"##### appendChild 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | x | 5.23 | 4.11 | x | 4.25 | 4.61 | x | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| aChild | [UniElement](/api/dom/unielement.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"4.0\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 插入子元素对象 | \n","fileFormats":"","returnValue":"","tutorial":""},"insertBefore":{"name":"#### insertBefore(newChild: UniElement, refChild?: UniElement): UniElement \\| null @insertbefore","originName":"insertBefore","description":"在参考元素之前插入一个拥有指定父元素的子元素。如果给定的子元素是对文档中现有元素的引用,insertBefore() 会将其从当前位置移动到新位置。","compatibility":"##### insertBefore 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | x | 5.23 | 4.11 | x | 4.25 | 4.61 | x | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| newChild | [UniElement](/api/dom/unielement.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"4.0\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 插入子元素对象 |\n| refChild | [UniElement](/api/dom/unielement.md) | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"4.0\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 已存在父元素的子元素对象 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 | 必备 |\n| :- | :- | :- |\n| [UniElement](/api/dom/unielement.md) | 所有组件的 DOM 元素对象基类,描述了 UVUE DOM 元素所普通具有的属性和方法。 | 否 |\n \n","tutorial":""},"insertBefore_1":{"name":"#### insertBefore(newChild: UniElement): UniElement \\| null @insertbefore","originName":"insertBefore","description":"将一个元素添加到指定父元素的子元素列表的末尾处 功能等同于appendChild","compatibility":"##### insertBefore 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | x | 4.11 | x | 4.25 | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| newChild | [UniElement](/api/dom/unielement.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"4.0\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 插入子元素对象 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 | 必备 |\n| :- | :- | :- |\n| [UniElement](/api/dom/unielement.md) | 所有组件的 DOM 元素对象基类,描述了 UVUE DOM 元素所普通具有的属性和方法。 | 否 |\n \n","tutorial":""},"setAttribute":{"name":"#### setAttribute(key: string, value: string): void @setattribute","originName":"setAttribute","description":"设置指定元素上的某个属性值。如果设置的属性已经存在,则更新该属性值;否则使用指定的名称和值添加一个新的属性。","compatibility":"##### setAttribute 兼容性 <Help /> \n| Web | 微信小程序 | Android | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 5.23 | 4.11 | x | 4.25 | 4.61 | x | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| key | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 属性名称 |\n| value | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 属性值域 | \n","fileFormats":"","returnValue":"","tutorial":""},"setAnyAttribute":{"name":"#### setAnyAttribute(key: string, value: any): void @setanyattribute","originName":"setAnyAttribute","description":"设置指定元素上的某个属性值。功能等同setAttribute value支持任意类型","compatibility":"##### setAnyAttribute 兼容性 <Help /> \n| Web | 微信小程序 | Android | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 4.0 | 5.23 | 4.11 | x | 4.25 | 4.61 | x | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| key | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 属性名称 |\n| value | any | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 属性值域 | \n","fileFormats":"","returnValue":"","tutorial":""},"getAttribute":{"name":"#### getAttribute(key: string): string \\| null @getattribute","originName":"getAttribute","description":"获取元素指定的属性值,如果指定的属性不存在则返回null。","compatibility":"##### getAttribute 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | 4.0 | 5.23 | 5.23 | 4.11 | x | 4.25 | 4.61 | x | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| key | string | 是 | 属性名称 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| string | 否 |\n \n","tutorial":"","example":"##### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/API/element-get-attribute/element-get-attribute.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/API/element-get-attribute/element-get-attribute.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/API/element-get-attribute/element-get-attribute\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/API/element-get-attribute/element-get-attribute\n\n>示例\n```vue\n<template>\n <!-- #ifdef APP -->\n <scroll-view class=\"page-scroll-view\">\n <!-- #endif -->\n <view style=\"padding: 15px;\">\n <page-intro content=\"本页演示元素属性与样式读写:getAttribute 获取元素 id(小程序端支持 style)、getPropertyValue 获取样式值(如背景色)、setProperty 设置样式;含自定义组件子元素的 getBoundingClientRectAsync、scroll-view 的 scrollTo、以及获取 scale 变换后 view 的尺寸信息。\"></page-intro>\n <view id=\"box\" ref=\"boxRef\">\n <text class=\"uni-title-text\">元素的id:{{ data.attrId }}</text>\n <!-- #ifndef APP -->\n <text class=\"uni-title-text\">元素的style:{{ data.attrStyle }}</text>\n <!-- #endif -->\n <text class=\"uni-title-text\">元素的背景色样式值:{{ data.propertyValue }}</text>\n <text class=\"uni-subtitle-text\">小程序端:getAttribute 获取元素的属性值,目前仅支持id、style</text>\n <text class=\"uni-subtitle-text\">App端:getAttribute 不支持获取 class、style 属性</text>\n </view>\n <button @click=\"getAttributeId\">getAttribute获取元素的id</button>\n <button @click=\"setStyle\">setProperty设置背景色</button>\n <!-- #ifndef APP -->\n <button @click=\"getAttributeStyle\">getAttribute获取元素的style</button>\n <!-- #endif -->\n <button @click=\"getPropertyValue\">getPropertyValue获取背景色值</button>\n\n <child id=\"child\"></child>\n <button @click=\"getBoundingClientRectAsyncChild\">获取自定义组件child元素信息</button>\n <view class=\"rect-info\" v-if=\"data.rectInfo\">\n <view class=\"node-info-item\">\n <text class=\"node-info-item-k\">x: </text>\n <text class=\"node-info-item-v\">{{data.rectInfo.x}}</text>\n </view>\n <view class=\"node-info-item\">\n <text class=\"node-info-item-k\">y: </text>\n <text class=\"node-info-item-v\">{{data.rectInfo.y}}</text>\n </view>\n <view class=\"node-info-item\">\n <text class=\"node-info-item-k\">width: </text>\n <text class=\"node-info-item-v\">{{data.rectInfo.width}}</text>\n </view>\n <view class=\"node-info-item\">\n <text class=\"node-info-item-k\">height: </text>\n <text class=\"node-info-item-v\">{{data.rectInfo.height}}</text>\n </view>\n <view class=\"node-info-item\">\n <text class=\"node-info-item-k\">left: </text>\n <text class=\"node-info-item-v\">{{data.rectInfo.left}}</text>\n </view>\n <view class=\"node-info-item\">\n <text class=\"node-info-item-k\">top: </text>\n <text class=\"node-info-item-v\">{{data.rectInfo.top}}</text>\n </view>\n <view class=\"node-info-item\">\n <text class=\"node-info-item-k\">right: </text>\n <text class=\"node-info-item-v\">{{data.rectInfo.right}}</text>\n </view>\n <view class=\"node-info-item\">\n <text class=\"node-info-item-k\">bottom: </text>\n <text class=\"node-info-item-v\">{{data.rectInfo.bottom}}</text>\n </view>\n </view>\n <!-- #ifndef MP-ALIPAY -->\n <scroll-view ref=\"scrollViewRef\" class=\"scroll-view_H\" direction=\"horizontal\">\n <view class=\"scroll-view-item_H uni-bg-red\"><text class=\"text\">A</text></view>\n <view class=\"scroll-view-item_H uni-bg-green\"><text class=\"text\">B</text></view>\n <view class=\"scroll-view-item_H uni-bg-blue\"><text class=\"text\">C</text></view>\n </scroll-view>\n <!-- #ifndef WEB -->\n <button @click=\"scrollTo\">scrollTo设置left滚动200px</button>\n <!-- #endif -->\n <button style=\"margin-top: 8px\" @click=\"getUniElementScrollOffset\">打印 scroll-view 滚动属性</button>\n\n <view id=\"scaledView\" style=\"transform: scale(2);background-color: green;width: 50px;height: 50px;margin-top: 45px;margin-left: 25px;\"></view>\n\n <button type=\"default\" @click=\"handleGetScaledViewSize\" style=\"margin-top: 30px;\">获取scale后的view尺寸信息</button>\n <!-- #endif -->\n </view>\n <!-- #ifdef APP -->\n </scroll-view>\n <!-- #endif -->\n</template>\n<script setup lang=\"uts\">\n\n import child from './child.uvue'\n\n type DomRectType = {\n x : number,\n y : number,\n left : number,\n top : number,\n right : number,\n bottom : number,\n width : number,\n height : number,\n }\n\n type DataType = {\n attrId: string,\n attrStyle: string,\n propertyValue: string,\n rectInfo: DomRectType,\n scaledViewWidth: number,\n scaledViewHeight: number\n }\n\n type ScrollOffset = {\n scrollTop: number,\n scrollHeight: number,\n scrollWidth: number,\n scrollLeft: number,\n width: number\n }\n\n const boxRef = ref<UniElement | null>(null)\n const scrollViewRef = ref<UniScrollViewElement | null>(null)\n const data = reactive({\n attrId: \"\",\n attrStyle: \"\",\n propertyValue: \"\",\n rectInfo: {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n },\n scaledViewWidth: 0,\n scaledViewHeight: 0\n } as DataType)\n const scrollOffset = reactive<ScrollOffset>({\n scrollTop: 0,\n scrollHeight: 0,\n scrollWidth: 0,\n scrollLeft: 0,\n width: 0\n })\n\n function getBoundingClientRectAsyncChild(){\n const childEl = uni.getElementById('child')!\n childEl.getBoundingClientRectAsync()!.then((rect : DOMRect) => {\n console.log('rect: ',rect);\n data.rectInfo = {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n } as DomRectType\n })\n }\n\n function getAttributeId() {\n if (boxRef.value != null) {\n data.attrId = boxRef.value!.getAttribute('id') ?? \"\"\n }\n }\n\n function setStyle() {\n if (boxRef.value != null) {\n boxRef.value!.style.setProperty(\"background-color\", \"#FFF000\")\n }\n }\n\n function getPropertyValue() {\n if (boxRef.value != null) {\n data.propertyValue = boxRef.value!.style.getPropertyValue(\"background-color\")\n }\n }\n\n function getAttributeStyle() {\n if (boxRef.value != null) {\n data.attrStyle = boxRef.value!.getAttribute('style')?? \"\"\n }\n }\n\n function scrollTo() {\n if (scrollViewRef.value != null) {\n // #ifdef MP-WEIXIN\n scrollViewRef.value!.scrollTo({\n left: 200\n })\n // #endif\n // #ifndef MP-WEIXIN\n scrollViewRef.value!.scrollTo(200,0)\n // #endif\n }\n }\n\n function getUniElementScrollOffset() {\n if (scrollViewRef.value != null) {\n const scrollView = scrollViewRef.value!\n console.log(\"scrollTop: \", scrollView.scrollTop)\n console.log(\"scrollHeight: \", scrollView.scrollHeight)\n console.log(\"scrollWidth: \", scrollView.scrollWidth)\n console.log(\"scrollLeft: \", scrollView.scrollLeft)\n const screenWidth = uni.getWindowInfo().screenWidth\n scrollOffset.width = (screenWidth - 30) * 3\n scrollOffset.scrollTop = scrollView.scrollTop\n scrollOffset.scrollHeight = scrollView.scrollHeight\n scrollOffset.scrollWidth = scrollView.scrollWidth\n scrollOffset.scrollLeft = scrollView.scrollLeft\n }\n }\n\n //scrollView元素获取class中的margin-top属性值 仅自动化测试使用\n function getScrollViewStyleMarginTop() : string {\n if (scrollViewRef.value != null) {\n return scrollViewRef.value.style.getPropertyValue(\"margin-top\")\n }\n return \"\"\n }\n\n const handleGetScaledViewSize = () => {\n const element = uni.getElementById(\"scaledView\")\n if (element != null) {\n const rect = element.getBoundingClientRect()\n data.scaledViewWidth = rect.width\n data.scaledViewHeight = rect.height\n console.log(\"scaledView size : \", data.scaledViewWidth, data.scaledViewHeight);\n }\n }\n\n onReady(() => {\n // Refs are already assigned via template\n })\n\n defineExpose({\n data,\n scrollOffset,\n getAttributeId,\n setStyle,\n getAttributeStyle,\n getPropertyValue,\n getBoundingClientRectAsyncChild,\n scrollTo,\n handleGetScaledViewSize,\n getScrollViewStyleMarginTop\n })\n\n</script>\n<style>\n .scroll-view_H {\n width: 100%;\n flex-direction: row;\n margin-top:15px;\n }\n .scroll-view-item_H {\n width: 100%;\n height: 150px;\n justify-content: center;\n align-items: center;\n }\n .text {\n font-size: 18px;\n color: #ffffff;\n }\n\n .rect-info {\n margin-top: 15px;\n padding: 10px;\n flex-direction: column;\n }\n\n .node-info-item {\n flex-direction: row;\n }\n\n .node-info-item-k {\n width: 72px;\n line-height: 2;\n }\n\n .node-info-item-v {\n font-weight: bold;\n line-height: 2;\n }\n</style>\n\n```\n\n:::"},"getAnyAttribute":{"name":"#### getAnyAttribute(key: string): any \\| null @getanyattribute","originName":"getAnyAttribute","description":"返回元素上一个指定的属性值。如果指定的属性不存在,则返回 null","compatibility":"##### getAnyAttribute 兼容性 <Help /> \n| Web | 微信小程序 | Android | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 4.0 | 5.23 | 4.11 | x | 4.25 | 4.61 | x | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| key | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 属性名称 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| any | 否 |\n \n","tutorial":""},"hasAttribute":{"name":"#### hasAttribute(key: string): boolean @hasattribute","originName":"hasAttribute","description":"返回该元素是否包含有指定的属性,属性存在则返回true,否则返回false。","compatibility":"##### hasAttribute 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | x | 5.23 | 4.11 | x | 4.25 | 4.61 | x | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| key | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 属性名称 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| boolean |\n \n","tutorial":""},"removeAttribute":{"name":"#### removeAttribute(key: string): void @removeattribute","originName":"removeAttribute","description":"从元素中删除一个属性,如果指定的属性不存在,则不做任何操作,也不会产生错误。","compatibility":"##### removeAttribute 兼容性 <Help /> \n| Web | 微信小程序 | Android | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | x | 4.11 | 5.21 | 4.25 | 4.61 | 5.21 | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| key | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 属性名称 | \n","fileFormats":"","returnValue":"","tutorial":""},"getBoundingClientRect":{"name":"#### getBoundingClientRect(): DOMRect @getboundingclientrect","originName":"getBoundingClientRect","description":"获取元素的大小及其相对于窗口的位置信息。","compatibility":"##### getBoundingClientRect 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 5.23 | 5.23 | 4.11 | 5.23 | 4.25 | 4.61 | 5.23 | 5.23 |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| [DOMRect](/api/dom/domrect.md) | 一个 DOMRect 代表一个矩形。 |\n \n","tutorial":""},"getBoundingClientRectAsync":{"name":"#### getBoundingClientRectAsync(options?: GetBoundingClientRectAsyncOptions): Promise\\<DOMRect> \\| null @getboundingclientrectasync","originName":"getBoundingClientRectAsync","description":"获取元素的大小及其相对于窗口的位置信息 异步。","compatibility":"##### getBoundingClientRectAsync 兼容性 <Help /> \n| Web | 微信小程序 | Android | Android(VDOM) UTS 插件 | Android(Vapor) UTS 插件 | iOS | iOS UTS 插件 | HarmonyOS | HarmonyOS UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.41 | 4.41 | 4.41 | 5.23 | x | 4.41 | x | 4.61 | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| options | **GetBoundingClientRectAsyncOptions** | 否 |\n@| 名称 | 类型 | 必备 |\n@| :- | :- | :- |\n@| success | (rect: [DOMRect](/api/dom/domrect.md)) => void | 否 |\n@| fail | () => void | 否 |\n@| complete | (rect?: any) => void | 否 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| Promise\\<DOMRect> | 否 |\n \n","tutorial":"","example":"##### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/API/element-get-bounding-client-rect-async/element-get-bounding-client-rect-async.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/API/element-get-bounding-client-rect-async/element-get-bounding-client-rect-async.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/API/element-get-bounding-client-rect-async/element-get-bounding-client-rect-async\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/API/element-get-bounding-client-rect-async/element-get-bounding-client-rect-async\n\n>示例\n```vue\n<template>\r\n <!-- #ifdef APP -->\r\n <scroll-view class=\"page-scroll-view uni-theme-root\">\r\n <!-- #endif -->\r\n <view class=\"page uni-theme-root\" id=\"page\">\r\n <page-head :title=\"title\"></page-head>\r\n <page-intro content=\"本页演示元素获取布局矩形:getBoundingClientRectAsync 异步接口与 getBoundingClientRect 同步方法,返回 x、y、width、height、left、top、right、bottom;对 view、text、image、scroll-view 等组件分别测试,并含拍平(flatten)对比,以及 box-shadow 导致尺寸变大的现象演示。\"></page-intro>\r\n <button class=\"uni-common-mt\" @click=\"getBoundingClientRectAsync\">getBoundingClientRectAsync</button>\r\n <view id=\"rect-test\" ref=\"rectTest\" class=\"rect-test\"></view>\r\n <view class=\"rect-info\" v-if=\"data.rectInfo != null\">\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">x: </text>\r\n <text class=\"node-info-item-v\">{{data.rectInfo!.x}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">y: </text>\r\n <text class=\"node-info-item-v\">{{data.rectInfo!.y}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">width: </text>\r\n <text class=\"node-info-item-v\">{{data.rectInfo!.width}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">height: </text>\r\n <text class=\"node-info-item-v\">{{data.rectInfo!.height}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">left: </text>\r\n <text class=\"node-info-item-v\">{{data.rectInfo!.left}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">top: </text>\r\n <text class=\"node-info-item-v\">{{data.rectInfo!.top}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">right: </text>\r\n <text class=\"node-info-item-v\">{{data.rectInfo!.right}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">bottom: </text>\r\n <text class=\"node-info-item-v\">{{data.rectInfo!.bottom}}</text>\r\n </view>\r\n </view>\r\n\r\n <!-- #ifndef MP -->\n <!-- 新增 getBoundingClientRect 同步方法测试 -->\n <view class=\"section-divider\"></view>\r\n <text class=\"section-title\">getBoundingClientRect 方法测试</text>\r\n\r\n <!-- View 元素测试 -->\r\n <view class=\"test-group\">\r\n <view class=\"test-buttons\">\r\n <button class=\"btn-small\" type=\"default\" @click=\"getViewRect\">View</button>\r\n <button class=\"btn-small\" @click=\"getViewRectFlat\">View(拍平测试)</button>\r\n </view>\r\n <view class=\"test-elements\">\r\n <view id=\"rect-test-view\" class=\"rect-test-small\"></view>\r\n <view id=\"rect-test-view-flat\" class=\"rect-test-small\" flatten></view>\r\n </view>\r\n </view>\r\n <view class=\"rect-row\" v-if=\"syncData.viewRectInfo != null || syncData.viewRectInfoFlat != null\">\r\n <view class=\"rect-data-col\" v-if=\"syncData.viewRectInfo != null\">\r\n <text class=\"rect-data-item\">x: {{syncData.viewRectInfo!.x}}</text>\r\n <text class=\"rect-data-item\">y: {{syncData.viewRectInfo!.y}}</text>\r\n <text class=\"rect-data-item\">width: {{syncData.viewRectInfo!.width}}</text>\r\n <text class=\"rect-data-item\">height: {{syncData.viewRectInfo!.height}}</text>\r\n <text class=\"rect-data-item\">left: {{syncData.viewRectInfo!.left}}</text>\r\n <text class=\"rect-data-item\">top: {{syncData.viewRectInfo!.top}}</text>\r\n <text class=\"rect-data-item\">right: {{syncData.viewRectInfo!.right}}</text>\r\n <text class=\"rect-data-item\">bottom: {{syncData.viewRectInfo!.bottom}}</text>\r\n </view>\r\n <view class=\"rect-data-col\" v-if=\"syncData.viewRectInfoFlat != null\">\r\n <text class=\"rect-data-item\">x: {{syncData.viewRectInfoFlat!.x}}</text>\r\n <text class=\"rect-data-item\">y: {{syncData.viewRectInfoFlat!.y}}</text>\r\n <text class=\"rect-data-item\">width: {{syncData.viewRectInfoFlat!.width}}</text>\r\n <text class=\"rect-data-item\">height: {{syncData.viewRectInfoFlat!.height}}</text>\r\n <text class=\"rect-data-item\">left: {{syncData.viewRectInfoFlat!.left}}</text>\r\n <text class=\"rect-data-item\">top: {{syncData.viewRectInfoFlat!.top}}</text>\r\n <text class=\"rect-data-item\">right: {{syncData.viewRectInfoFlat!.right}}</text>\r\n <text class=\"rect-data-item\">bottom: {{syncData.viewRectInfoFlat!.bottom}}</text>\r\n </view>\r\n </view>\r\n\r\n <!-- Text 元素测试 -->\r\n <view class=\"test-group\">\r\n <view class=\"test-buttons\">\r\n <button class=\"btn-small\" @click=\"getTextRect\">Text</button>\r\n <button class=\"btn-small\" @click=\"getTextRectFlat\">Text(拍平测试)</button>\r\n </view>\r\n <view class=\"test-elements\">\r\n <text id=\"rect-test-text\" class=\"rect-test-text-small\">测试文本</text>\r\n <text id=\"rect-test-text-flat\" class=\"rect-test-text-small\" flatten>测试文本拍平</text>\r\n </view>\r\n </view>\r\n <view class=\"rect-row\" v-if=\"syncData.textRectInfo != null || syncData.textRectInfoFlat != null\">\r\n <view class=\"rect-data-col\" v-if=\"syncData.textRectInfo != null\">\r\n <text class=\"rect-data-item\">x: {{syncData.textRectInfo!.x}}</text>\r\n <text class=\"rect-data-item\">y: {{syncData.textRectInfo!.y}}</text>\r\n <text class=\"rect-data-item\">width: {{syncData.textRectInfo!.width}}</text>\r\n <text class=\"rect-data-item\">height: {{syncData.textRectInfo!.height}}</text>\r\n <text class=\"rect-data-item\">left: {{syncData.textRectInfo!.left}}</text>\r\n <text class=\"rect-data-item\">top: {{syncData.textRectInfo!.top}}</text>\r\n <text class=\"rect-data-item\">right: {{syncData.textRectInfo!.right}}</text>\r\n <text class=\"rect-data-item\">bottom: {{syncData.textRectInfo!.bottom}}</text>\r\n </view>\r\n <view class=\"rect-data-col\" v-if=\"syncData.textRectInfoFlat != null\">\r\n <text class=\"rect-data-item\">x: {{syncData.textRectInfoFlat!.x}}</text>\r\n <text class=\"rect-data-item\">y: {{syncData.textRectInfoFlat!.y}}</text>\r\n <text class=\"rect-data-item\">width: {{syncData.textRectInfoFlat!.width}}</text>\r\n <text class=\"rect-data-item\">height: {{syncData.textRectInfoFlat!.height}}</text>\r\n <text class=\"rect-data-item\">left: {{syncData.textRectInfoFlat!.left}}</text>\r\n <text class=\"rect-data-item\">top: {{syncData.textRectInfoFlat!.top}}</text>\r\n <text class=\"rect-data-item\">right: {{syncData.textRectInfoFlat!.right}}</text>\r\n <text class=\"rect-data-item\">bottom: {{syncData.textRectInfoFlat!.bottom}}</text>\r\n </view>\r\n </view>\r\n\r\n <!-- Image 元素测试 -->\r\n <view class=\"test-group\">\r\n <view class=\"test-buttons\">\r\n <button class=\"btn-small\" @click=\"getImageRect\">Image</button>\r\n <button class=\"btn-small\" @click=\"getImageRectFlat\">Image(拍平测试)</button>\r\n </view>\r\n <view class=\"test-elements\">\r\n <image id=\"rect-test-image\" class=\"rect-test-image-small\" src=\"/static/test-image/logo.png\" mode=\"aspectFit\"></image>\r\n <image id=\"rect-test-image-flat\" class=\"rect-test-image-small\" src=\"/static/test-image/logo.png\" mode=\"aspectFit\" flatten></image>\r\n </view>\r\n </view>\r\n <view class=\"rect-row\" v-if=\"syncData.imageRectInfo != null || syncData.imageRectInfoFlat != null\" >\r\n <view class=\"rect-data-col\" v-if=\"syncData.imageRectInfo != null\">\r\n <text class=\"rect-data-item\">x: {{syncData.imageRectInfo!.x}}</text>\r\n <text class=\"rect-data-item\">y: {{syncData.imageRectInfo!.y}}</text>\r\n <text class=\"rect-data-item\">width: {{syncData.imageRectInfo!.width}}</text>\r\n <text class=\"rect-data-item\">height: {{syncData.imageRectInfo!.height}}</text>\r\n <text class=\"rect-data-item\">left: {{syncData.imageRectInfo!.left}}</text>\r\n <text class=\"rect-data-item\">top: {{syncData.imageRectInfo!.top}}</text>\r\n <text class=\"rect-data-item\">right: {{syncData.imageRectInfo!.right}}</text>\r\n <text class=\"rect-data-item\">bottom: {{syncData.imageRectInfo!.bottom}}</text>\r\n </view>\r\n <view class=\"rect-data-col\" v-if=\"syncData.imageRectInfoFlat != null\">\r\n <text class=\"rect-data-item\">x: {{syncData.imageRectInfoFlat!.x}}</text>\r\n <text class=\"rect-data-item\">y: {{syncData.imageRectInfoFlat!.y}}</text>\r\n <text class=\"rect-data-item\">width: {{syncData.imageRectInfoFlat!.width}}</text>\r\n <text class=\"rect-data-item\">height: {{syncData.imageRectInfoFlat!.height}}</text>\r\n <text class=\"rect-data-item\">left: {{syncData.imageRectInfoFlat!.left}}</text>\r\n <text class=\"rect-data-item\">top: {{syncData.imageRectInfoFlat!.top}}</text>\r\n <text class=\"rect-data-item\">right: {{syncData.imageRectInfoFlat!.right}}</text>\r\n <text class=\"rect-data-item\">bottom: {{syncData.imageRectInfoFlat!.bottom}}</text>\r\n </view>\r\n </view>\r\n\r\n <!-- ScrollView 元素测试 -->\r\n <button class=\"uni-common-mt\" @click=\"getScrollViewRect\">getBoundingClientRect - ScrollView</button>\r\n <scroll-view id=\"rect-test-scrollview\" class=\"rect-test-scrollview\">\r\n <view class=\"scroll-content\">\r\n <text class=\"scroll-text\">滚动区域内容1</text>\r\n </view>\r\n <view class=\"scroll-content\">\r\n <text class=\"scroll-text\">滚动区域内容2</text>\r\n </view>\r\n <view class=\"scroll-content\">\r\n <text class=\"scroll-text\">滚动区域内容2</text>\r\n </view>\r\n </scroll-view>\r\n <view class=\"rect-info\" v-if=\"syncData.scrollViewRectInfo != null\">\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">x: </text>\r\n <text class=\"node-info-item-v\">{{syncData.scrollViewRectInfo!.x}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">y: </text>\r\n <text class=\"node-info-item-v\">{{syncData.scrollViewRectInfo!.y}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">width: </text>\r\n <text class=\"node-info-item-v\">{{syncData.scrollViewRectInfo!.width}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">height: </text>\r\n <text class=\"node-info-item-v\">{{syncData.scrollViewRectInfo!.height}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">left: </text>\r\n <text class=\"node-info-item-v\">{{syncData.scrollViewRectInfo!.left}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">top: </text>\r\n <text class=\"node-info-item-v\">{{syncData.scrollViewRectInfo!.top}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">right: </text>\r\n <text class=\"node-info-item-v\">{{syncData.scrollViewRectInfo!.right}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">bottom: </text>\r\n <text class=\"node-info-item-v\">{{syncData.scrollViewRectInfo!.bottom}}</text>\r\n </view>\r\n </view>\r\n\r\n <!-- 自定义组件测试 -->\r\n <button class=\"uni-common-mt\" @click=\"getCustomComponentRect\">getBoundingClientRect - 自定义组件</button>\r\n <child id=\"rect-test-component\" class=\"uni-common-mt\"></child>\r\n <view class=\"rect-info\" v-if=\"syncData.customComponentRectInfo != null\">\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">x: </text>\r\n <text class=\"node-info-item-v\">{{syncData.customComponentRectInfo!.x}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">y: </text>\r\n <text class=\"node-info-item-v\">{{syncData.customComponentRectInfo!.y}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">width: </text>\r\n <text class=\"node-info-item-v\">{{syncData.customComponentRectInfo!.width}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">height: </text>\r\n <text class=\"node-info-item-v\">{{syncData.customComponentRectInfo!.height}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">left: </text>\r\n <text class=\"node-info-item-v\">{{syncData.customComponentRectInfo!.left}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">top: </text>\r\n <text class=\"node-info-item-v\">{{syncData.customComponentRectInfo!.top}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">right: </text>\r\n <text class=\"node-info-item-v\">{{syncData.customComponentRectInfo!.right}}</text>\r\n </view>\r\n <view class=\"node-info-item\">\r\n <text class=\"node-info-item-k\">bottom: </text>\r\n <text class=\"node-info-item-v\">{{syncData.customComponentRectInfo!.bottom}}</text>\n </view>\n </view>\n\n <view class=\"test-group\">\n <view class=\"test-buttons\">\n <button class=\"btn-small\" @click=\"getShadowBaseRect\">View(无阴影)</button>\n <button class=\"btn-small\" @click=\"getShadowBugRect\">View(box-shadow)</button>\n </view>\n <text class=\"test-tip\">两个元素样式尺寸一致,右侧仅增加 box-shadow,用于演示获取到的宽高可能变大。</text>\n <view class=\"test-elements\">\n <view id=\"rect-test-shadow-base\" class=\"shadow-demo-box\"></view>\n <view id=\"rect-test-shadow-bug\" class=\"shadow-demo-box shadow-demo-box-bug\"></view>\n </view>\n </view>\n <view class=\"rect-row\" v-if=\"syncData.shadowBaseRectInfo != null || syncData.shadowBugRectInfo != null\">\n <view class=\"rect-data-col\" v-if=\"syncData.shadowBaseRectInfo != null\">\n <text class=\"rect-data-item\">无阴影 x: {{syncData.shadowBaseRectInfo!.x}}</text>\n <text class=\"rect-data-item\">无阴影 y: {{syncData.shadowBaseRectInfo!.y}}</text>\n <text class=\"rect-data-item\">无阴影 width: {{syncData.shadowBaseRectInfo!.width}}</text>\n <text class=\"rect-data-item\">无阴影 height: {{syncData.shadowBaseRectInfo!.height}}</text>\n <text class=\"rect-data-item\">无阴影 left: {{syncData.shadowBaseRectInfo!.left}}</text>\n <text class=\"rect-data-item\">无阴影 top: {{syncData.shadowBaseRectInfo!.top}}</text>\n <text class=\"rect-data-item\">无阴影 right: {{syncData.shadowBaseRectInfo!.right}}</text>\n <text class=\"rect-data-item\">无阴影 bottom: {{syncData.shadowBaseRectInfo!.bottom}}</text>\n </view>\n <view class=\"rect-data-col\" v-if=\"syncData.shadowBugRectInfo != null\">\n <text class=\"rect-data-item\">阴影 x: {{syncData.shadowBugRectInfo!.x}}</text>\n <text class=\"rect-data-item\">阴影 y: {{syncData.shadowBugRectInfo!.y}}</text>\n <text class=\"rect-data-item\">阴影 width: {{syncData.shadowBugRectInfo!.width}}</text>\n <text class=\"rect-data-item\">阴影 height: {{syncData.shadowBugRectInfo!.height}}</text>\n <text class=\"rect-data-item\">阴影 left: {{syncData.shadowBugRectInfo!.left}}</text>\n <text class=\"rect-data-item\">阴影 top: {{syncData.shadowBugRectInfo!.top}}</text>\n <text class=\"rect-data-item\">阴影 right: {{syncData.shadowBugRectInfo!.right}}</text>\n <text class=\"rect-data-item\">阴影 bottom: {{syncData.shadowBugRectInfo!.bottom}}</text>\n </view>\n </view>\n\n <!-- #endif -->\n </view>\n <!-- #ifdef APP -->\r\n </scroll-view>\r\n <!-- #endif -->\r\n</template>\r\n\r\n<script setup lang=\"uts\">\r\n import Child from './child.uvue'\r\n\r\n type DomRectType = {\r\n x : number,\r\n y : number,\r\n left : number,\r\n top : number,\r\n right : number,\r\n bottom : number,\r\n width : number,\r\n height : number,\r\n }\r\n\r\n type DataType = {\r\n rectInfo: DomRectType,\r\n }\r\n\r\n type SyncDataType = {\n viewRectInfo: DomRectType | null,\n textRectInfo: DomRectType | null,\n imageRectInfo: DomRectType | null,\n shadowBaseRectInfo: DomRectType | null,\n shadowBugRectInfo: DomRectType | null,\n viewRectInfoFlat: DomRectType | null,\n textRectInfoFlat: DomRectType | null,\n imageRectInfoFlat: DomRectType | null,\n scrollViewRectInfo: DomRectType | null,\r\n customComponentRectInfo: DomRectType | null,\n }\n\n function createEmptyRectInfo(): DomRectType {\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n }\n }\n\n function createRectInfo(rect : DOMRect): DomRectType {\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n }\n }\n\n const title = ref('getBoundingClientRectAsync')\n const rectTest = ref<UniElement | null>(null)\n\n const data = reactive<DataType>({\n rectInfo: createEmptyRectInfo(),\n })\n\n const syncData = reactive<SyncDataType>({\n viewRectInfo: null,\n textRectInfo: null,\n imageRectInfo: null,\n shadowBaseRectInfo: null,\n shadowBugRectInfo: null,\n viewRectInfoFlat: null,\n textRectInfoFlat: null,\n imageRectInfoFlat: null,\n scrollViewRectInfo: null,\n customComponentRectInfo: null,\n })\n\n function getBoundingClientRectAsync() {\n if (rectTest.value != null) {\n rectTest.value!.getBoundingClientRectAsync()!.then((rect : DOMRect) => {\n data.rectInfo = createRectInfo(rect)\n })\n }\n }\n\n // 通用方法:获取元素的位置信息\n function getRectInfo(elementId: string, dataKey: keyof SyncDataType) {\n const element = uni.getElementById(elementId)!\n const rect = element.getBoundingClientRect()\n syncData[dataKey] = createRectInfo(rect)\n }\n\n function getViewRect() {\r\n getRectInfo('rect-test-view', 'viewRectInfo')\r\n }\r\n\r\n function getTextRect() {\r\n getRectInfo('rect-test-text', 'textRectInfo')\r\n }\r\n\r\n function getImageRect() {\n getRectInfo('rect-test-image', 'imageRectInfo')\n }\n\n function getShadowBaseRect() {\n getRectInfo('rect-test-shadow-base', 'shadowBaseRectInfo')\n }\n\n function getShadowBugRect() {\n getRectInfo('rect-test-shadow-bug', 'shadowBugRectInfo')\n }\n\n function getViewRectFlat() {\n getRectInfo('rect-test-view-flat', 'viewRectInfoFlat')\n }\n\n function getTextRectFlat() {\r\n getRectInfo('rect-test-text-flat', 'textRectInfoFlat')\r\n }\r\n\r\n function getImageRectFlat() {\r\n getRectInfo('rect-test-image-flat', 'imageRectInfoFlat')\r\n }\r\n\r\n function getScrollViewRect() {\r\n getRectInfo('rect-test-scrollview', 'scrollViewRectInfo')\r\n }\r\n\r\n function getCustomComponentRect() {\r\n getRectInfo('rect-test-component', 'customComponentRectInfo')\r\n }\r\n\r\n defineExpose({\r\n data,\r\n syncData,\r\n getBoundingClientRectAsync,\r\n getViewRect,\n getTextRect,\n getImageRect,\n getShadowBaseRect,\n getShadowBugRect,\n getViewRectFlat,\n getTextRectFlat,\n getImageRectFlat,\n getScrollViewRect,\r\n getCustomComponentRect\r\n })\r\n</script>\r\n\r\n<style>\r\n .page {\r\n --rect-divider-color: #e0e0e0;\r\n --rect-title-color: #333;\r\n --rect-muted-color: #909399;\r\n --rect-border-color: #e4e7ed;\r\n --rect-text-color: #606266;\r\n padding: 15px;\r\n }\r\n\r\n .rect-test {\r\n margin-top: 15px;\r\n height: 100px;\r\n background-color: dodgerblue;\r\n }\r\n\r\n .rect-info {\r\n margin-top: 15px;\r\n flex-direction: column;\r\n }\r\n\r\n .node-info-item {\r\n flex-direction: row;\r\n }\r\n\r\n .node-info-item-k {\r\n width: 72px;\r\n line-height: 2;\r\n }\r\n\r\n .node-info-item-v {\r\n font-weight: bold;\r\n line-height: 2;\r\n }\r\n\r\n .section-divider {\r\n margin-top: 30px;\r\n height: 1px;\r\n background-color: var(--rect-divider-color, #e0e0e0);\r\n }\r\n\r\n .section-title {\r\n margin-top: 15px;\r\n font-size: 16px;\r\n font-weight: bold;\r\n color: var(--rect-title-color, #333);\r\n }\r\n\r\n .test-group {\r\n margin-top: 20px;\r\n flex-direction: column;\r\n }\r\n\r\n .test-buttons {\r\n flex-direction: row;\r\n justify-content: space-around;\r\n margin-bottom: 10px;\r\n }\r\n\r\n .btn-small {\n /* #ifndef MP-ALIPAY */\n padding: 5px 15px;\n /* #endif */\n font-size: 13px;\n border-radius: 4px;\n flex: 1;\n margin: 0 5px;\n }\n\n .test-tip {\n margin-bottom: 10px;\n font-size: 12px;\n line-height: 18px;\n color: var(--rect-muted-color, #909399);\n }\n\n .test-elements {\n flex-direction: row;\n justify-content: space-around;\n align-items: center;\n margin-bottom: 10px;\n padding: 14px 0;\n }\n\n .rect-test-small {\r\n width: 45%;\r\n height: 60px;\r\n background-color: dodgerblue;\r\n }\r\n\r\n .rect-test-text-small {\r\n width: 45%;\r\n padding: 8px;\r\n font-size: 14px;\r\n color: #fff;\r\n background-color: #ff6b6b;\r\n }\r\n\r\n .rect-test-image-small {\n width: 45%;\n height: 60px;\n background-color: #f0f0f0;\n }\n\n .shadow-demo-box {\n width: 45%;\n height: 60px;\n background-color: #67c23a;\n border-radius: 8px;\n border-width: 1px;\n border-style: solid;\n border-color: #4f9a2a;\n }\n\n .shadow-demo-box-bug {\n box-shadow: 0px 0px 24px 12px rgba(0, 0, 0, 0.35);\n }\n\n .rect-row {\n flex-direction: row;\n margin-bottom: 15px;\r\n padding-bottom: 15px;\r\n border-bottom: 1px solid var(--rect-border-color, #e4e7ed);\r\n }\r\n\r\n .rect-data-col {\r\n flex: 1;\r\n flex-direction: column;\r\n margin: 0 5px;\r\n }\r\n\r\n .rect-data-item {\r\n font-size: 12px;\r\n line-height: 1.8;\r\n color: var(--rect-text-color, #606266);\r\n }\r\n\r\n .rect-test-scrollview {\r\n margin-top: 15px;\r\n height: 120px;\r\n border: 1px solid #dcdfe6;\r\n background-color: #f5f7fa;\r\n }\r\n\r\n .scroll-content {\r\n height: 120px;\r\n padding: 10px;\r\n border: 1px solid #37b4ea;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n\r\n .scroll-text {\n line-height: 30px;\n font-size: 14px;\n color: #606266;\n }\n\r\n @media (prefers-color-scheme: dark) {\r\n .page {\r\n --rect-divider-color: rgba(255, 255, 255, 0.1);\r\n --rect-title-color: #ffffff;\r\n --rect-muted-color: #a0a0a0;\r\n --rect-border-color: rgba(255, 255, 255, 0.1);\r\n --rect-text-color: #d0d0d0;\r\n }\n }\n\n</style>\r\n\n```\n\n:::"},"getDrawableContext":{"name":"#### getDrawableContext(): DrawableContext \\| null @getdrawablecontext","originName":"getDrawableContext","description":"获取组件的绘制对象,仅uvue页面中的 view 组件支持,其它组件不支持则返回null。","compatibility":"##### getDrawableContext 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 5.23 | 4.11 | x | 4.25 | 4.61 | x | 5.23 |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| [DrawableContext](/api/dom/drawablecontext.md) | 否 |\n \n","tutorial":""},"addEventListener":{"name":"#### addEventListener\\<T extends UniEvent, R>(type: string, callback: (event: T) => R): UniCallbackWrapper @addeventlistener","originName":"addEventListener","description":"将指定的监听器注册到元素对象上,当该对象触发指定的事件时,指定的回调函数就会被执行。","compatibility":"##### addEventListener 兼容性 <Help /> \n| Web | 微信小程序 | Android | Android(Vapor) UTS 插件 | iOS | iOS(Vapor) UTS 插件 | HarmonyOS | HarmonyOS(Vapor) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | x | 4.11 | x | 5.23 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| type | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 事件类型 |\n| callback | (event: T) => R | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 事件监听器 T表示event类型,R表示返回值类型 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| UniCallbackWrapper | 事件回调封装类,用于注销监听函数的形参 |\n \n","tutorial":""},"removeEventListener":{"name":"#### removeEventListener(type: string, callbackWrapper: UniCallbackWrapper): void @removeeventlistener","originName":"removeEventListener","description":"删除使用 addEventListener 方法添加的事件监听器。","compatibility":"##### removeEventListener 兼容性 <Help /> \n| Web | 微信小程序 | Android | Android(VDOM) UTS 插件 | Android(Vapor) UTS 插件 | iOS | iOS UTS 插件 | HarmonyOS | HarmonyOS(Vapor) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 5.23 | x | 4.11 | x | 5.23 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| type | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 事件类型 |\n| callbackWrapper | UniCallbackWrapper | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 事件监听回调封装类 | \n","fileFormats":"","returnValue":"","tutorial":""},"removeChild":{"name":"#### removeChild(aChild: UniElement): UniElement \\| null @removechild","originName":"removeChild","description":"从元素中删除一个子元素,返回删除的元素。","compatibility":"##### removeChild 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | x | 5.23 | 4.11 | x | 4.25 | 4.61 | x | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| aChild | [UniElement](/api/dom/unielement.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"4.0\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 被删除子元素对象 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 | 必备 |\n| :- | :- | :- |\n| [UniElement](/api/dom/unielement.md) | 所有组件的 DOM 元素对象基类,描述了 UVUE DOM 元素所普通具有的属性和方法。 | 否 |\n \n","tutorial":""},"remove":{"name":"#### remove(): void @remove","originName":"remove","description":"把元素对象从它所属的 DOM 树中删除。","compatibility":"##### remove 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | x | 5.23 | 4.11 | x | 4.25 | 4.61 | x | 5.23 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"dispatchEvent":{"name":"#### dispatchEvent(value: UniEvent): void @dispatchevent","originName":"dispatchEvent","description":"向一个指定的事件目标派发一个 Event,并以合适的顺序(同步地)调用此事件的监听器回调函数。","compatibility":"##### dispatchEvent 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.0 | x | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| value | [UniEvent](/component/common.md#unievent) | 是 | 事件返回对象 | \n","fileFormats":"","returnValue":"","tutorial":""},"scrollTo":{"name":"#### scrollTo(x: number, y: number): void @scrollto","originName":"scrollTo","description":"使界面滚动到给定元素的指定坐标位置 仅scroll-view、list-view组件支持","compatibility":"##### scrollTo 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 5.23 | 5.23 | 4.11 | 5.23 | 4.25 | 4.61 | 5.23 | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | x轴要滚动到坐标位置(单位px) |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | y轴要滚动到坐标位置(单位px) | \n","fileFormats":"","returnValue":"","tutorial":""},"scrollBy":{"name":"#### scrollBy(x: number, y: number): void @scrollby","originName":"scrollBy","description":"使得元素滚动一段特定距离 仅scroll-view、list-view组件支持","compatibility":"##### scrollBy 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 5.23 | 5.23 | 4.11 | 5.23 | 4.25 | 4.61 | 5.23 | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | x轴要滚动的距离(单位px) |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | y轴要滚动的距离(单位px) | \n","fileFormats":"","returnValue":"","tutorial":""},"querySelector":{"name":"#### querySelector(selector: string.cssSelectorString): UniElement \\| null @queryselector","originName":"querySelector","description":"返回文档中与指定选择器或选择器组匹配的第一个 Element对象。如果找不到匹配项,则返回null","compatibility":"##### querySelector 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 5.23 | 5.23 | 4.11 | 5.23 | 4.25 | 4.61 | 5.23 | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| selector | [string.cssSelectorString](/uts/data-type.md#ide-string) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | CSS 选择器字符串 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 | 必备 |\n| :- | :- | :- |\n| [UniElement](/api/dom/unielement.md) | 所有组件的 DOM 元素对象基类,描述了 UVUE DOM 元素所普通具有的属性和方法。 | 否 |\n \n","tutorial":""},"querySelectorAll":{"name":"#### querySelectorAll(selector: string.cssSelectorString): UniElement\\[\\] @queryselectorall","originName":"querySelectorAll","description":"返回与指定的选择器组匹配的文档中的元素列表","compatibility":"##### querySelectorAll 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android(VDOM) UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 5.23 | 5.23 | 4.11 | 5.23 | 4.25 | 4.61 | 5.23 | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| selector | [string.cssSelectorString](/uts/data-type.md#ide-string) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | CSS 选择器字符串 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| Array&lt;[UniElement](/api/dom/unielement.md)&gt; |\n \n","tutorial":""},"focus":{"name":"#### focus(): void @focus","originName":"focus","description":"使元素获取焦点 仅input、Textarea组件支持","compatibility":"##### focus 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 5.23 | 5.23 | 4.11 | 5.23 | 4.25 | 4.81 | x | 5.23 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"blur":{"name":"#### blur(): void @blur","originName":"blur","description":"使元素丢失焦点 仅input、Textarea组件支持","compatibility":"##### blur 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android UTS 插件 | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 5.23 | 5.23 | 4.11 | 5.23 | 4.25 | 4.81 | x | 5.23 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"getIOSView":{"name":"#### getIOSView(): UIView \\| null @getiosview","originName":"getIOSView","description":"获取元素ios原生view","compatibility":"##### getIOSView 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | x | x | 4.25 | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| UIView | 否 |\n \n","tutorial":""},"getAndroidView":{"name":"#### getAndroidView(): View \\| null @getandroidview","originName":"getAndroidView","description":"获取元素android原生view 可能返回null","compatibility":"##### getAndroidView 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android UTS 插件 | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- | :- |\n| x | x | 4.25 | x | 5.23 | x | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| View | 否 |\n \n","tutorial":""},"getAndroidView_1":{"name":"#### getAndroidView\\<T>(): T \\| null @getandroidview","originName":"getAndroidView","description":"获取元素android原生view 通过泛型定义view类型 可能返回null","compatibility":"##### getAndroidView 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android(Vapor) UTS 插件 | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- | :- |\n| x | x | 4.25 | x | 5.21 | x | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| T | 否 |\n \n","tutorial":""},"getAndroidActivity":{"name":"#### getAndroidActivity(): Activity \\| null @getandroidactivity","originName":"getAndroidActivity","description":"获取元素android原生activity 可能返回null","compatibility":"##### getAndroidActivity 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | Android UTS 插件 | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- | :- |\n| x | x | 4.25 | x | 5.23 | x | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| Activity | 否 |\n \n","tutorial":""},"animate":{"name":"#### animate(keyframes: UniAnimationKeyframe \\| UniAnimationKeyframe\\[], options: UniAnimationOption \\| number): UniAnimation \\| null @animate","originName":"animate","description":"创建一个新的动画并应用于元素,然后立即执行动画。","compatibility":"##### animate 兼容性 <Help /> \n| Web | 微信小程序 | Android | Android(VDOM) UTS 插件 | Android(Vapor) UTS 插件 | iOS | iOS UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 | HarmonyOS(Vapor) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| √ | 4.53 | 4.51 | 5.23 | x | 4.53 | x | 4.61 | 5.08 | x | 5.23 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| keyframes | [UniAnimationKeyframe](#unianimationkeyframe-values) \\| Array&lt;**UniAnimationKeyframe**&gt; | 是 | 关键帧对象数组或一个关键帧对象。 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| width | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制宽度属性的过渡效果 |\n@| height | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制高度属性的过渡效果 |\n@| margin | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制外边距属性的过渡效果 |\n@| marginTop | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制上外边距属性的过渡效果 |\n@| marginBottom | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制下外边距属性的过渡效果 |\n@| marginLeft | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制左外边距属性的过渡效果 |\n@| marginRight | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制右外边距属性的过渡效果 |\n@| left | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制左侧位置属性的过渡效果 |\n@| right | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制右侧位置属性的过渡效果 |\n@| top | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制顶部位置属性的过渡效果 |\n@| bottom | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制底部位置属性的过渡效果 |\n@| padding | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制内边距属性的过渡效果 |\n@| paddingLeft | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制左内边距属性的过渡效果 |\n@| paddingRight | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制右内边距属性的过渡效果 |\n@| paddingTop | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制上内边距属性的过渡效果 |\n@| paddingBottom | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制下内边距属性的过渡效果 |\n@| opacity | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制透明度属性的过渡效果 |\n@| backgroundColor | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制背景颜色属性的过渡效果 |\n@| borderColor | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制边框颜色属性的过渡效果 |\n@| borderTopColor | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制上边框颜色属性的过渡效果 |\n@| borderBottomColor | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制下边框颜色属性的过渡效果 |\n@| borderLeftColor | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制左边框颜色属性的过渡效果 |\n@| borderRightColor | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制右边框颜色属性的过渡效果 |\n@| transform | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制变换属性的过渡效果 |\n@| transformOrigin | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制元素变形的原点的过渡效果 |\n@| offset | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 关键帧的偏移量。为0.0和1.0之间的数字。如果此值缺失,则关键帧将在相邻关键帧之间均匀分布。 |\n| options | **UniAnimationOption** \\| number | 是 | 动画属性配置。 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| delay | number | 否 | 0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"4.61\",\"5.08\"]],\"status\":\"SUPPORTED\"}' /> | 动画延迟的毫秒数 |\n@| direction | string | 否 | normal | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 动画运行方向 |\n@@| 合法值 | 兼容性 | 描述 |\n@@| :- | :-: | :- |\n@@| normal | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 正向运行 |\n@@| reverse | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"x\",\"x\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 反向运行 |\n@@| alternate | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 每次迭代后切换方向 |\n@@| alternate-reverse | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"x\",\"x\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 反向运行并在每次迭代后切换方向 |\n@| duration | number | 否 | 0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"4.61\",\"5.08\"]],\"status\":\"SUPPORTED\"}' /> | 动画时长 |\n@| easing | string | 否 | linear | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"4.61\",\"5.08\"]],\"status\":\"SUPPORTED\"}' /> | 动画曲线。 |\n@@| 合法值 |\n@@| :- |\n@@| ease |\n@@| ease-in |\n@@| ease-out |\n@@| ease-in-out |\n@@| linear |\n@@| cubic-bezier |\n@| fill | string | 否 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 决定动画效果是否应在播放前反映在元素中 |\n@@| 合法值 | 兼容性 | 描述 |\n@@| :- | :-: | :- |\n@@| backwards | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"√\",\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 动画播放完毕后恢复初始状态 |\n@@| forwards | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 动画播放完毕后保留状态 |\n@@| both | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"√\",\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 动画播放完毕后保留状态 |\n@@| none | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"√\",\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 动画播放完毕后恢复初始状态 |\n@| iterations | number | 否 | 1 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"4.61\",\"5.08\"]],\"status\":\"SUPPORTED\"}' /> | 动画重复的次数。当设置为`Infinity`时,动画将一直重复执行。 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| [UniAnimation](#unianimation-values) | 否 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| id | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"4.53\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 获取或设置用于标识动画的字符串 |\n@| playState | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 返回动画播放状态。可选值:`running`动画正在运行;`paused`动画暂停;`finished`动画播放完成;`idle`动画取消或者失败 |\n###### UniAnimation 的方法 @unianimation-values \n\n###### oncancel: (event: UniAnimationPlaybackEvent) => void @oncancel\noncancel\n监听动画取消事件\n###### oncancel 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | 5.21 | 4.51 | 4.53 | x | 5.08 |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| event | **UniAnimationPlaybackEvent** | 是 |\n@| 名称 | 类型 | 必备 | 描述 |\n@| :- | :- | :- | :- |\n@| type | string | 是 | 动画的事件类型 | \n\n\n\n###### onfinish: (event: UniAnimationPlaybackEvent) => void @onfinish\nonfinish\n监听动画完成事件\n###### onfinish 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | x | 4.51 | 4.53 | x | 5.08 |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| event | **UniAnimationPlaybackEvent** | 是 |\n@| 名称 | 类型 | 必备 | 描述 |\n@| :- | :- | :- | :- |\n@| type | string | 是 | 动画的事件类型 | \n\n\n\n###### cancel(): void @cancel\ncancel\n终止并取消所有动画\n###### cancel 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.53 | 4.51 | 4.53 | x | 5.08 |\n\n\n\n\n###### finish(): void @finish\nfinish\n动画跳转到最后一毫秒并立即播放完成\n###### finish 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | x | 4.51 | 4.53 | x | 5.08 |\n\n\n\n\n###### pause(): void @pause\npause\n暂停动画播放\n###### pause 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | x | 4.51 | 4.53 | x | 5.08 |\n\n\n\n\n###### play(): void @play\nplay\n开始或恢复动画播放\n###### play 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.53 | 4.51 | 4.53 | x | 5.08 |\n\n\n\n \n","tutorial":"","example":"##### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/API/animate/animate.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/API/animate/animate.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/API/animate/animate\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/API/animate/animate\n\n>示例\n```vue\n<template>\n <!-- #ifdef APP && !VUE3-VAPOR -->\n <scroll-view class=\"uni-theme-root\" style=\"flex:1\">\n <!-- #endif -->\n <view class=\"animate-page uni-theme-root\">\n <page-intro content=\"本页演示 uni.createAnimation 与 uni.createAnimateContext:点击开始/暂停/恢复/取消动画,可点击各 view 修改宽度、高度、margin、padding 等属性动画。\"></page-intro>\n <view id=\"main\" style=\"width: 100px;height: 100px; background-color: brown; transform: scale(1);\"></view>\n\n <button @click=\"startAnimate\">开始动画</button>\n <!-- #ifndef !VUE3-VAPOR && APP-HARMONY -->\n <!-- #ifndef MP -->\n <button @click=\"pauseAnimate\">暂停动画</button>\n <!-- #endif -->\n <button @click=\"resumeAnimate\">恢复动画</button>\n <button @click=\"cancelAnimate\">取消动画</button>\n <!-- #endif -->\n\n <image src=\"/static/test-image/logo.png\" id=\"roll\" style=\"width: 100px; height: 100px;margin: 10px;\"></image>\n\n\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改宽度</text>\n <view id=\"widthProperty\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"widthProperty\"></view>\n </view>\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改高度</text>\n <view id=\"height1\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"heightProperty\"></view>\n </view>\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改margin</text>\n <view id=\"marginProperty\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"marginProperty\"></view>\n </view>\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改padding</text>\n <view id=\"paddingProperty\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"paddingProperty\">\n <view style=\"width: 50px;height: 50px;background-color: black;\"></view>\n </view>\n </view>\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改border颜色</text>\n <view id=\"borderProperty\"\n style=\"width: 100px;height: 100px;background-color: brown;border-width: 10px;border-color: black;border-style: solid;\"\n @click=\"borderProperty\"></view>\n </view>\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改transform</text>\n <view id=\"transformProperty\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"transformProperty\"></view>\n </view>\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改position</text>\n <view id=\"positionProperty\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"positionProperty\"></view>\n </view>\n <!-- #ifndef MP-WEIXIN -->\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改背景色和宽度</text>\n <view id=\"backgroundAndWidthProperty\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"backgroundAndWidthProperty\"></view>\n </view>\n <view class=\"animation-item\">\n <text class=\"animation-label\">执行的动画只有一个值1</text>\n <view id=\"oneProperty1\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"oneProperty1\"></view>\n </view>\n <view class=\"animation-item\">\n <text class=\"animation-label\">执行的动画只有一个值2</text>\n <view id=\"oneProperty2\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"oneProperty2\"></view>\n </view>\n <!-- #endif -->\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改背景色和margin-left(关键帧)</text>\n <view id=\"backgroundAndMarginLeftProperty\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"backgroundAndMarginLeftProperty\"></view>\n </view>\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改背景色和transform(关键帧)</text>\n <view id=\"backgroundAndTransformProperty\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"backgroundAndTransformProperty\"></view>\n </view>\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改背景色(关键帧)</text>\n <view id=\"backgroundProperty\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"backgroundProperty\"></view>\n </view>\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改opacity(关键帧)</text>\n <view id=\"opacityProperty\" style=\"width: 100px;height: 100px;background-color: brown;\" @click=\"opacityProperty\"></view>\n </view>\n <view class=\"animation-item\">\n <text class=\"animation-label\">修改border-color和margin-left(关键帧)</text>\n <view id=\"borderColorMarginLeftProperty\" style=\"width: 100px;height: 100px;background-color: brown;border-width: 5px;border-style: solid;\"\n @click=\"borderColorMarginLeftProperty\"></view>\n </view>\n </view>\n <!-- #ifdef APP && !VUE3-VAPOR -->\n </scroll-view>\n <!-- #endif -->\n</template>\n\n<script setup lang=\"uts\">\n let mainView : UniElement | null = null\n let animation : UniAnimation | null = null\n\n type Data = {\n testTriggerFinishEvent : boolean,\n testTriggerCancelEvent : boolean\n }\n\n const data = {\n testTriggerFinishEvent: false,\n testTriggerCancelEvent: false\n } as Data\n\n function startAnimate() {\n animation = mainView!.animate([\n {\n transform: \"scale(1)\",\n transformOrigin: \"0px 0px\"\n },\n {\n transform: \"scale(0)\",\n transformOrigin: \"50px 50px\"\n },\n {\n transform: \"scale(1)\",\n transformOrigin: \"100px 100px\"\n }\n ], {\n duration: 5000,\n\n })\n if (animation != null) {\n animation!.oncancel = (_ : UniAnimationPlaybackEvent) => {\n data.testTriggerCancelEvent = true\n uni.showToast({\n title: \"动画被取消了\"\n })\n }\n animation!.onfinish = (_ : UniAnimationPlaybackEvent) => {\n data.testTriggerFinishEvent = true\n uni.showToast({\n title: \"动画播放完成\"\n })\n }\n }\n }\n\n function pauseAnimate() {\n animation?.pause()\n }\n\n function resumeAnimate() {\n animation?.play()\n }\n\n function cancelAnimate() {\n animation?.cancel()\n }\n\n function widthProperty(e : UniPointerEvent) {\n e.currentTarget?.animate({\n width: [\"100px\", \"200px\", \"150px\"]\n }, {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function heightProperty(e : UniPointerEvent) {\n e.currentTarget?.animate({\n height: [\"100px\", \"200px\"]\n }, {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function marginProperty(e : UniPointerEvent) {\n e.currentTarget?.animate({\n margin: [\"8px\", \"16px\", \"32px\"]\n }, {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function paddingProperty(e : UniPointerEvent) {\n e.currentTarget?.animate({\n padding: [\"0px\", \"16px\", \"32px\", \"16px\"]\n }, {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function backgroundProperty(e : UniPointerEvent) {\n e.currentTarget?.animate([\n {\n offset: 0.3,\n backgroundColor: \"yellow\"\n },\n {\n offset: 0.6,\n backgroundColor: \"red\"\n },\n {\n backgroundColor: \"blue\"\n }\n ], {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function borderProperty(e : UniPointerEvent) {\n e.currentTarget?.animate([\n {\n offset: 0.3,\n borderColor: \"yellow\"\n },\n {\n offset: 0.6,\n borderColor: \"pink\"\n },\n {\n borderColor: \"blue\"\n }\n ], {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function transformProperty(e : UniPointerEvent) {\n e.currentTarget?.animate([\n {\n transform: \"translateX(0px) scale(1) rotate(0deg)\"\n },\n {\n transform: \"translateX(100px)\"\n },\n {\n transform: \"scale(0.8) rotate(180deg)\"\n }\n ], {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function positionProperty(e : UniPointerEvent) {\n e.currentTarget?.animate({\n left: [\"0px\", \"16px\", \"32px\", \"16px\"]\n }, {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function backgroundAndWidthProperty(e : UniPointerEvent) {\n e.currentTarget?.animate({\n width: [\"100px\", \"200px\"],\n backgroundColor: [\"red\", \"yellow\", \"blue\"]\n }, {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function backgroundAndMarginLeftProperty(e : UniPointerEvent) {\n e.currentTarget?.animate([\n {\n offset: 0.2,\n backgroundColor: \"red\"\n }, {\n marginLeft: \"10px\"\n }, {\n marginLeft: \"20px\"\n }, {\n marginLeft: \"30px\",\n backgroundColor: \"pink\"\n }\n ], {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function backgroundAndTransformProperty(e : UniPointerEvent) {\n e.currentTarget?.animate([\n {\n offset: 0.2,\n backgroundColor: \"red\"\n }, {\n transform: \"translate(30px,0px)\"\n }, {\n transform: \"translate(50px,0px)\"\n }, {\n transform: \"translate(100px,0px)\",\n backgroundColor: \"pink\"\n }\n ], {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function oneProperty1(e : UniPointerEvent) {\n e.currentTarget?.animate({\n backgroundColor: \"green\"\n }, {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function oneProperty2(e : UniPointerEvent) {\n e.currentTarget?.animate([{\n backgroundColor: \"blue\"\n }], {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function borderColorMarginLeftProperty(e : UniPointerEvent) {\n e.currentTarget?.animate([\n {\n borderColor: \"red\",\n marginLeft: \"0px\",\n offset: 0\n },\n {\n marginLeft: \"20px\",\n offset: 0.5\n },\n {\n marginLeft: \"60px\",\n borderColor: \"yellow\",\n offset: 1\n }\n ], {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n function opacityProperty(e : UniPointerEvent) {\n e.currentTarget?.animate([\n {\n offset: 0.3,\n opacity: \"1\"\n },\n {\n offset: 0.6,\n opacity: \"0.1\"\n },\n {\n opacity: \"0.5\"\n }\n ], {\n duration: 1000,\n fill: \"forwards\"\n })\n }\n\n onReady(() => {\n mainView = uni.getElementById(\"main\")\n var roll = uni.getElementById(\"roll\")\n roll!.animate([\n { transform: \"translateX(0) rotate(0)\" },\n { transform: \"translateX(200px) rotate(540deg)\" },\n ],\n {\n duration: 2000,\n direction: \"alternate\",\n easing: \"ease-in-out\",\n iterations: Infinity,\n },\n )\n })\n\n defineExpose({\n data,\n startAnimate,\n cancelAnimate\n })\n</script>\n\n<style>\n .animation-item {\n border-radius: 5px;\n margin: 4px;\n padding: 4px;\n border-style: solid;\n background-color: var(--list-background-color, #eeeeee);\n border-color: var(--border-color, #eeeeee);\n }\n\n .animation-label {\n margin-bottom: 4px;\n color: var(--text-color, #333333);\n }\n\n .view-margin {\n margin: 8px;\n }\n</style>\n\n```\n\n:::"},"getHarmonyController":{"name":"#### getHarmonyController(): any \\| null @getharmonycontroller","originName":"getHarmonyController","description":"鸿蒙原生组件控制器,可以控制组件的状态。可能返回null","compatibility":"##### getHarmonyController 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- |\n| x | x | x | x | 4.61 | x | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| any | 否 |\n \n","tutorial":""},"getHarmonyController_1":{"name":"#### getHarmonyController\\<T>(): T \\| null @getharmonycontroller","originName":"getHarmonyController","description":"鸿蒙原生组件控制器,可以控制组件的状态。通过泛型定义view类型,可能返回null","compatibility":"##### getHarmonyController 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| x | x | x | x | 4.61 | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| T | 否 |\n \n","tutorial":""},"requestFullscreen":{"name":"#### requestFullscreen(options?: RequestFullscreenOptions): void @requestfullscreen","originName":"requestFullscreen","description":"控制元素进入全屏状态","compatibility":"##### requestFullscreen 兼容性 <Help /> \n| Web | 微信小程序 | Android | Android(VDOM) UTS 插件 | iOS | iOS(VDOM) UTS 插件 | HarmonyOS | HarmonyOS UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 4.61 | 5.23 | 4.61 | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| options | **RequestFullscreenOptions** | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| navigationUI | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 全屏模式时导航栏状态 |\n@@| 合法值 | 兼容性 | 描述 |\n@@| :- | :-: | :- |\n@@| hide | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 隐藏所有系统状态栏和底部导航栏 |\n@@| show | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 隐藏顶部系统状态栏,显示底部系统导航栏 |\n@@| auto | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 系统默认行为 |\n@| orientation | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 全屏显示方向 |\n@@| 合法值 | 兼容性 | 描述 |\n@@| :- | :-: | :- |\n@@| auto | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 根据重力感应自动调整 |\n@@| landscape | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 固定为横屏,会根据重力调整方向 |\n@@| landscape-secondary | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 固定为反向横屏 |\n@@| landscape-primary | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 固定为正向横屏 |\n@@| portrait | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 固定为竖屏 |\n@| success | () => void | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 成功回调 |\n@| fail | (error: [IFullscreenError](#ifullscreenerror-values)) => void | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 失败回调 |\n@| complete | (result?: any) => void | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 完成回调 | \n\n###### IFullscreenError 的属性值 @ifullscreenerror-values \n\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| errCode | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 错误码 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| 106600 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前页面已经有element处于全屏状态 |\n@| 106601 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前element不支持全屏 |\n@| 106602 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前页面没有element处于全屏状态 |\n@| 106603 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面已销毁或者尚未就绪 |\n@| 106604 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 组件未就绪 |\n| errSubject | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 统一错误主题(模块)名称 |\n| data | any | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 错误信息中包含的数据 |\n| cause | [Error](/err-spec.md#unierror) | 否 | | 源错误信息,可以包含多个错误,详见SourceError |\n| errMsg | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | |\n","fileFormats":"","returnValue":"","tutorial":"","example":"##### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/API/element-request-fullscreen/element-request-fullscreen.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/API/element-request-fullscreen/element-request-fullscreen.uvue) \n>\n> 该 API 不支持 Web,请运行 hello uni-app x 到 App 平台体验 \n\n::: preview\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/API/element-request-fullscreen/element-request-fullscreen\n```uvue\n<template>\r\n <scroll-view class=\"content uni-theme-root\" direction=\"vertical\">\n <view id=\"fullscreen\" class=\"view1\" @click=\"fullscreen\" @fullscreenchange=\"fullscreenchange\" @fullscreenerror=\"fullscreenerror\">\r\n <text style=\"color: white;\">{{ text }}</text>\r\n </view>\r\n <enum-data :items=\"orientation_enum\" title=\"orientation\" @change=\"radio_change_orientation\"></enum-data>\r\n <enum-data :items=\"navigationUI_enum\" title=\"navigationUI\" @change=\"radio_change_ui\"></enum-data>\r\n </scroll-view>\r\n</template>\r\n\r\n<script setup lang=\"uts\">\r\n \r\n import { ItemType } from '@/components/enum-data/enum-data-types';\r\n\r\n const orientation_enum = ref([{ \"value\": 0, \"name\": \"auto\" }, { \"value\": 1, \"name\": \"landscape\" }, { \"value\": 2, \"name\": \"landscape-primary\" }, { \"value\": 3, \"name\": \"landscape-secondary\" }, { \"value\": 4, \"name\": \"portrait\" }] as ItemType[])\r\n const navigationUI_enum = ref([{ \"value\": 0, \"name\": \"auto\" }, { \"value\": 1, \"name\": \"hide\" }, { \"value\": 2, \"name\": \"show\" }] as ItemType[])\r\n const text = ref(\"点击进入全屏\")\r\n let fullscreenElement: UniElement | null = null\r\n let isFullscreen = false\r\n const orientation = ref(\"landscape\")\r\n const navigationUI = ref(\"hide\")\r\n\r\n type DataType = {\r\n fullscreenchangeCount: number,\r\n requestFullscreenCallbackStatus: boolean,\r\n exitFullscreenCallbackStatus: boolean,\r\n }\r\n\r\n const data = reactive({\r\n fullscreenchangeCount: 0,\r\n requestFullscreenCallbackStatus: false,\r\n exitFullscreenCallbackStatus: false,\r\n } as DataType)\r\n\r\n function getCurrentPage() : UniPage {\r\n const pages = getCurrentPages()\r\n return pages[pages.length - 1]\r\n }\r\n\r\n function fullscreen() {\r\n if (isFullscreen) {\r\n // 重置退出全屏回调状态\r\n let status1 = false\r\n const page = getCurrentPage()\r\n page.exitFullscreen({\r\n success: () => {\r\n text.value = \"点击进入全屏\"\r\n status1 = true\r\n },\r\n fail: (err) => {\r\n console.log('fail', err)\r\n status1 = false\r\n },\r\n complete: () => {\r\n console.log('complete')\r\n data.exitFullscreenCallbackStatus = status1\r\n }\r\n })\r\n } else {\r\n // 重置进入全屏回调状态\r\n let status1 = false\r\n fullscreenElement?.requestFullscreen({\r\n navigationUI: navigationUI.value,\r\n orientation: orientation.value,\r\n success: () => {\r\n text.value = \"点击退出全屏\"\r\n status1 = true\r\n },\r\n fail: (err) => {\r\n console.log('fail', err)\r\n status1 = false\r\n },\r\n complete: () => {\r\n console.log('complete')\r\n data.requestFullscreenCallbackStatus = status1\r\n }\r\n })\r\n }\r\n\r\n isFullscreen = !isFullscreen\r\n }\r\n\r\n function fullscreenchange(e : UniEvent) {\r\n console.log(e.type)\r\n data.fullscreenchangeCount++\r\n console.log(data.fullscreenchangeCount)\r\n }\r\n\r\n function fullscreenerror(e : UniEvent) {\r\n console.log(e.type)\r\n }\r\n\r\n function radio_change_orientation(checked : number) {\r\n console.log(checked)\r\n orientation.value = orientation_enum.value[checked]['name'] as string\r\n }\r\n\r\n function radio_change_ui(checked : number) {\r\n console.log(checked)\r\n navigationUI.value = navigationUI_enum.value[checked]['name'] as string\r\n }\r\n\r\n onReady(() => {\r\n fullscreenElement = uni.getElementById('fullscreen') as UniElement\r\n })\r\n\r\n defineExpose({\r\n data,\r\n fullscreen\r\n })\r\n</script>\r\n\r\n<style>\r\n .content {\n flex: 1;\n background-color: #f0f0f0;\n }\n\n @media (prefers-color-scheme: dark) {\n .content {\n background-color: var(--background-color, #1a1a1a);\n }\n }\n\r\n .view1 {\r\n width: 100%;\r\n height: 150px;\r\n align-items: center;\r\n justify-content: center;\r\n background-color: black;\r\n }\r\n</style>\r\n\n```\n:::"},"getPage":{"name":"#### ~~getPage(): UniPage \\| null~~ @getpage","originName":"getPage","description":"获取元素所属的页面对象 **请使用 uniPage 属性**","compatibility":"##### getPage 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.31 | x | 4.31 | 4.31 | 4.61 |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| [UniPage](/api/unipage.md) | 否 |\n \n","tutorial":""}},"compatibility":"### UniElement 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | 4.0 | 4.11 | 4.61 |"},"UniDOMStringMap":{"name":"## UniDOMStringMap","description":"","extends":"","param":"","compatibility":""},"CSSStyleDeclaration":{"name":"## CSSStyleDeclaration","description":"CSSStyleDeclaration表示一个CSS 声明块对象,它是一个 CSS 属性键值对的集合,暴露样式信息和各种与样式相关的方法和属性。","extends":"","param":"","methods":{"setProperty":{"name":"#### setProperty(name: string \\| string.cssPropertyString, value?: string): void @setproperty","originName":"setProperty","description":"对CSS指定样式设置一个新值,如有此样式已存在则更新。","compatibility":"##### setProperty 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | 4.51 | 4.51 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| name | string ([string.cssPropertyString](/uts/data-type.md#ide-string)) | 是 | | CSS样式名称 |\n| value | string | 否 | \"\" | 要设置的新CSS样式值 默认值空字符串 | \n","fileFormats":"","returnValue":"","tutorial":""},"getPropertyValue":{"name":"#### getPropertyValue(property: string \\| string.cssPropertyString): string @getpropertyvalue","originName":"getPropertyValue","description":"获取CSS指定的样式值,如果指定的样式不存在则返回空字符串。","compatibility":"##### getPropertyValue 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | 4.51 | 4.51 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| property | string ([string.cssPropertyString](/uts/data-type.md#ide-string)) | 是 | 要获取的CSS样式名称 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| string |\n \n","tutorial":""},"removeProperty":{"name":"#### removeProperty(property: string \\| string.cssPropertyString): string @removeproperty","originName":"removeProperty","description":"删除CSS指定的样式值","compatibility":"##### removeProperty 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- |\n| 4.0 | 4.51 | 4.51 | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| property | string ([string.cssPropertyString](/uts/data-type.md#ide-string)) | 是 | 要删除的CSS样式名称 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| string |\n \n","tutorial":""},"setProperty_1":{"name":"#### ~~setProperty(name: string \\| string.cssPropertyString, value: any): void~~ @setproperty","originName":"setProperty","description":"对CSS指定样式设置一个新值,如有此样式已存在则更新。 **已废弃,仅为了向下兼容保留**","compatibility":"##### setProperty 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | 3.9 | 4.11 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| name | string ([string.cssPropertyString](/uts/data-type.md#ide-string)) | 是 | CSS样式名称 |\n| value | any | 否 | 要设置的新CSS样式值 | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":"### CSSStyleDeclaration 兼容性 <Help /> \n | Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.11 | 4.61 |"},"UniPage":{"name":"## UniPage","description":"","extends":"","param":"\n### UniPage 的属性值 @unipage-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| route | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.31\",\"x\",\"4.31\",\"4.31\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面的路由地址 |\n| options | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.31\",\"x\",\"4.31\",\"4.31\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面的路由参数信息 |\n| vm | **VueComponent** | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.31\",\"x\",\"4.31\",\"4.31\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | UniPage vue 实例对象 |\n@| 名称 | 类型 | 必备 | 兼容性 |\n@| :- | :- | :- | :-: |\n@| $data | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| $props | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| $attrs | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| $slots | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| $refs | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| $parent | VueComponent | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| $root | VueComponent | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| $options | VueComponentOptions | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| $el | [UniElement](/api/dom/unielement.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| $page | [UniPage](/api/unipage.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.31\",\"√\",\"4.31\",\"4.31\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| pageBody | **UniPageBody** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.51\",\"x\",\"4.51\",\"4.51\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | UniPage 页面可使用区域信息,单位为px |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| left | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容区域左上角横坐标 |\n@| right | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容区域右下角横坐标 |\n@| top | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容区域左上角纵坐标 |\n@| bottom | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容区域右下角纵坐标 |\n@| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容区域宽度 |\n@| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容区域高度 |\n| safeAreaInsets | **UniSafeAreaInsets** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.51\",\"x\",\"4.51\",\"4.51\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | UniPage 安全区域插入位置(与屏幕边界的距离)信息 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| left | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 安全区域左侧插入位置(距离左边边界距离) |\n@| right | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 安全区域右侧插入位置(距离右边边界距离) |\n@| top | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 安全区顶部插入位置(距离顶部边界距离) |\n@| bottom | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 安全区域底部插入位置(距离底部边界距离) |\n| fullscreenElement | [UniElement](/api/dom/unielement.md) | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.61\",\"4.61\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 已经进入全屏状态的元素 |\n| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.63\",\"4.63\",\"4.61\",\"4.61\",\"4.63\"]],\"status\":\"SUPPORTED\"}' /> | 页面窗口宽度 |\n| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.63\",\"4.63\",\"4.61\",\"4.61\",\"4.63\"]],\"status\":\"SUPPORTED\"}' /> | 页面窗口高度 |\n| statusBarHeight | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.63\",\"4.63\",\"4.61\",\"4.61\",\"4.63\"]],\"status\":\"SUPPORTED\"}' /> | 页面状态栏高度 |\n| ~~$vm~~ | [VueComponent](#vuecomponent-values) | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.31\",\"x\",\"4.31\",\"4.31\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | UniPage vue 实例对象 |\n","methods":{"getPageStyle":{"name":"#### getPageStyle(): UTSJSONObject @getpagestyle","originName":"getPageStyle","description":"获取当前页面样式。详细属性配置请参考PageStyle","compatibility":"##### getPageStyle 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.31 | x | 4.31 | 4.31 | 4.61 |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) |\n \n","tutorial":""},"setPageStyle":{"name":"#### setPageStyle(style: UTSJSONObject): void @setpagestyle","originName":"setPageStyle","description":"设置当前页面样式。详细属性配置请参考PageStyle","compatibility":"##### setPageStyle 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.31 | x | 4.31 | 4.31 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| style | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"getParentPage":{"name":"#### getParentPage(): UniPage \\| null @getparentpage","originName":"getParentPage","description":"用于 dialogPage 获取所属父页面","compatibility":"##### getParentPage 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.31 | x | 4.31 | 4.31 | 4.61 |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| [UniPage](/api/unipage.md) | 否 |\n \n","tutorial":""},"getDialogPages":{"name":"#### getDialogPages(): UniPage\\[\\] @getdialogpages","originName":"getDialogPages","description":"获取当前页面的 dialog 子页面集合","compatibility":"##### getDialogPages 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.31 | x | 4.31 | 4.31 | 4.61 |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| Array&lt;[UniPage](/api/unipage.md)&gt; |\n \n","tutorial":""},"getElementById":{"name":"#### getElementById(id: string.IDString \\| string): UniElement \\| null @getelementbyid","originName":"getElementById","description":"返回一个匹配特定 ID 的元素, 如果不存在,返回 null。\\\r\n如果需要获取指定的节点类型,需要使用 as 进行类型转换。\\\r\nID 区分大小写,且应该是唯一的。如果存在多个匹配的元素,则返回第一个匹配的元素。\r\n","compatibility":"##### getElementById 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.31 | x | 4.31 | 4.31 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| id | [string.IDString](/uts/data-type.md#ide-string) \\| string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 | 必备 |\n| :- | :- | :- |\n| [UniElement](/api/dom/unielement.md) | 所有组件的 DOM 元素对象基类,描述了 UVUE DOM 元素所普通具有的属性和方法。 | 否 |\n \n","tutorial":""},"getAndroidView":{"name":"#### getAndroidView(): View \\| null @getandroidview","originName":"getAndroidView","description":"返回 android 平台页面根 view\r\n","compatibility":"##### getAndroidView 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| x | x | 4.31 | x | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| View | 否 |\n \n","tutorial":""},"getAndroidActivity":{"name":"#### getAndroidActivity(): Activity \\| null @getandroidactivity","originName":"getAndroidActivity","description":"返回 android 平台加载页面内容的Activity\r\n","compatibility":"##### getAndroidActivity 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| x | x | 4.61 | x | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| Activity | 否 |\n \n","tutorial":""},"getIOSView":{"name":"#### getIOSView(): UIView \\| null @getiosview","originName":"getIOSView","description":"返回 ios 平台页面根 view\r\n","compatibility":"##### getIOSView 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | x | x | 4.33 | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| UIView | 否 |\n \n","tutorial":""},"getHTMLElement":{"name":"#### getHTMLElement(): UniElement \\| null @gethtmlelement","originName":"getHTMLElement","description":"返回页面 HTML Element 对象\r\n","compatibility":"##### getHTMLElement 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.31 | x | x | x | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 | 必备 |\n| :- | :- | :- |\n| [UniElement](/api/dom/unielement.md) | 所有组件的 DOM 元素对象基类,描述了 UVUE DOM 元素所普通具有的属性和方法。 | 否 |\n \n","tutorial":""},"exitFullscreen":{"name":"#### exitFullscreen(options: ExitFullscreenOptions): void @exitfullscreen","originName":"exitFullscreen","description":"将当前在全屏模式下显示的元素退出全屏模式,恢复全屏之前的状态\r\n","compatibility":"##### exitFullscreen 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| x | x | 4.61 | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| options | **ExitFullscreenOptions** | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| success | () => void | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 成功回调 |\n@| fail | (error: [IFullscreenError](#ifullscreenerror-values)) => void | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 失败回调 |\n@| complete | (result?: any) => void | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 完成回调 | \n\n###### IFullscreenError 的属性值 @ifullscreenerror-values \n\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| errCode | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 错误码 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| 106600 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前页面已经有element处于全屏状态 |\n@| 106601 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前element不支持全屏 |\n@| 106602 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前页面没有element处于全屏状态 |\n@| 106603 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面已销毁或者尚未就绪 |\n@| 106604 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 组件未就绪 |\n| errSubject | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 统一错误主题(模块)名称 |\n| data | any | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 错误信息中包含的数据 |\n| cause | [Error](/err-spec.md#unierror) | 否 | | 源错误信息,可以包含多个错误,详见SourceError |\n| errMsg | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | |\n","fileFormats":"","returnValue":"","tutorial":""},"createElement":{"name":"#### createElement(tagName: string): UniElement @createelement","originName":"createElement","description":"创建组件\r\n","compatibility":"##### createElement 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| x | x | x | x | 4.63 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| tagName | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| [UniElement](/api/dom/unielement.md) | 所有组件的 DOM 元素对象基类,描述了 UVUE DOM 元素所普通具有的属性和方法。 |\n \n","tutorial":""},"onLayoutChange":{"name":"#### onLayoutChange(callback: UniPageOnLayoutChangeCallback): number @onlayoutchange","originName":"onLayoutChange","description":"监听页面布局变化更新事件","compatibility":"##### onLayoutChange 兼容性 <Help /> \n| Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- |\n| x | x | x | 5.0 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| callback | (res: [UniPagePerformanceTiming](#unipageperformancetiming-values)) => void | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n##### UniPagePerformanceTiming 的属性值 @unipageperformancetiming-values \n\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| duration | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 性能计时持续的时间,单位为ms |\n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| number |\n \n","tutorial":""},"offLayoutChange":{"name":"#### offLayoutChange(id: number): void @offlayoutchange","originName":"offLayoutChange","description":"取消监听页面布局变化更新事件","compatibility":"##### offLayoutChange 兼容性 <Help /> \n| Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- |\n| x | x | x | 5.0 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| id | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"onRenderChange":{"name":"#### onRenderChange(callback: UniPageOnRenderChangeCallback): number @onrenderchange","originName":"onRenderChange","description":"监听页面渲染变化更新事件","compatibility":"##### onRenderChange 兼容性 <Help /> \n| Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- |\n| x | x | x | 5.0 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| callback | (res: [UniPagePerformanceRenderTiming](#unipageperformancerendertiming-values)) => void | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n##### UniPagePerformanceRenderTiming 的属性值 @unipageperformancerendertiming-values \n\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| updateDuration | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 更新渲染属性的总时间,单位为ms |\n| duration | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 性能计时持续的时间,单位为ms |\n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| number |\n \n","tutorial":""},"offRenderChange":{"name":"#### offRenderChange(id: number): void @offrenderchange","originName":"offRenderChange","description":"取消监听页面渲染变化更新事件","compatibility":"##### offRenderChange 兼容性 <Help /> \n| Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- |\n| x | x | x | 5.0 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| id | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"onTouchStart":{"name":"#### onTouchStart(callback: UniPageOnTouchEventCallback): number @ontouchstart","originName":"onTouchStart","description":"监听页面触摸开始事件","compatibility":"##### onTouchStart 兼容性 <Help /> \n| Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- |\n| x | x | x | 5.0 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| callback | (event: [UniTouchEvent](/component/common.md#unitouchevent)) => void | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| number |\n \n","tutorial":""},"offTouchStart":{"name":"#### offTouchStart(id: number): void @offtouchstart","originName":"offTouchStart","description":"取消监听页面触摸开始事件","compatibility":"##### offTouchStart 兼容性 <Help /> \n| Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- |\n| x | x | x | 5.0 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| id | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"onTouchEnd":{"name":"#### onTouchEnd(callback: UniPageOnTouchEventCallback): number @ontouchend","originName":"onTouchEnd","description":"监听页面触摸结束事件","compatibility":"##### onTouchEnd 兼容性 <Help /> \n| Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- |\n| x | x | x | 5.0 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| callback | (event: [UniTouchEvent](/component/common.md#unitouchevent)) => void | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| number |\n \n","tutorial":""},"offTouchEnd":{"name":"#### offTouchEnd(id: number): void @offtouchend","originName":"offTouchEnd","description":"取消监听页面触摸结束事件","compatibility":"##### offTouchEnd 兼容性 <Help /> \n| Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- |\n| x | x | x | 5.0 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| id | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"querySelector":{"name":"#### querySelector(selector: string.cssSelectorString): UniElement \\| null @queryselector","originName":"querySelector","description":"返回页面中与指定选择器或选择器组匹配的第一个 Element对象。如果找不到匹配项,则返回null","compatibility":"##### querySelector 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- |\n| 5.0 | x | 5.0 | 5.0 | 5.21 | 5.0 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| selector | [string.cssSelectorString](/uts/data-type.md#ide-string) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | CSS 选择器字符串 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 | 必备 |\n| :- | :- | :- |\n| [UniElement](/api/dom/unielement.md) | 所有组件的 DOM 元素对象基类,描述了 UVUE DOM 元素所普通具有的属性和方法。 | 否 |\n \n","tutorial":""},"querySelectorAll":{"name":"#### querySelectorAll(selector: string.cssSelectorString): UniElement\\[\\] @queryselectorall","originName":"querySelectorAll","description":"返回页面中与指定选择器或选择器组匹配的元素列表。","compatibility":"##### querySelectorAll 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- |\n| x | x | 5.0 | 5.0 | 5.21 | 5.0 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| selector | [string.cssSelectorString](/uts/data-type.md#ide-string) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | CSS 选择器字符串 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| Array&lt;[UniElement](/api/dom/unielement.md)&gt; |\n \n","tutorial":""},"takeSnapshot":{"name":"#### takeSnapshot(options: TakeSnapshotOptions): void; @takesnapshot","originName":"takeSnapshot","description":"对当前页面进行截图","compatibility":"##### takeSnapshot 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- |\n| x | x | 5.02 | 5.02 | x | 5.02 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| options | **TakeSnapshotOptions** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图的参数对象 |\n@| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n@| :- | :- | :- | :- | :-: | :- |\n@| type | string | 否 | \"file\" | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图导出类型,目前仅支持 'file' 保存到临时文件目录 |\n@| format | string | 否 | \"png\" | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图文件格式,目前仅支持 'png' |\n@| success | (res: [TakeSnapshotSuccess](#takesnapshotsuccess-values)) => void | 否 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 接口调用成功的回调函数 |\n@| fail | (res: [TakeSnapshotFail](#takesnapshotfail-values)) => void | 否 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 接口调用失败的回调函数 |\n@| complete | (res: any) => void | 否 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 接口调用结束的回调函数(调用成功、失败都会执行) | \n\n###### TakeSnapshotSuccess 的属性值 @takesnapshotsuccess-values \n\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| tempFilePath | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图保存的临时文件路径 |\n\n###### TakeSnapshotFail 的属性值 @takesnapshotfail-values \n\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| errMsg | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图失败时的错误描述信息 |\n","fileFormats":"","returnValue":"","tutorial":""},"$getPageStyle":{"name":"#### ~~$getPageStyle(): UTSJSONObject~~ @$getpagestyle","originName":"$getPageStyle","description":"获取当前页面样式。详细属性配置请参考PageStyle **已废弃,仅为了向下兼容保留**","compatibility":"##### $getPageStyle 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.13 | x | 4.13 | 4.13 | 4.61 |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) |\n \n","tutorial":""},"$setPageStyle":{"name":"#### ~~$setPageStyle(style: UTSJSONObject): void~~ @$setpagestyle","originName":"$setPageStyle","description":"设置当前页面样式。详细属性配置请参考PageStyle **已废弃,仅为了向下兼容保留**","compatibility":"##### $setPageStyle 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.13 | x | 4.13 | 4.13 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| style | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":""},"VueComponent":{"name":"## VueComponent","description":"","extends":"","param":"\n### 构造函数\n| 名称 | 类型 | 必备 |\n| :- | :- | :- |\n| ins | any | 是 |\n\n### VueComponent 的属性值 @vuecomponent-values\n| 名称 | 类型 | 必备 | 兼容性 |\n| :- | :- | :- | :-: |\n| $data | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $props | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $attrs | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $slots | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $refs | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $parent | VueComponent | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $root | VueComponent | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $options | VueComponentOptions | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $el | [UniElement](/api/dom/unielement.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $page | [UniPage](/api/unipage.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.31\",\"√\",\"4.31\",\"4.31\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n","methods":{"$nextTick":{"name":"#### $nextTick(task?: (() => void)): Promise\\<void>; @$nexttick","originName":"$nextTick","description":"","compatibility":"##### $nextTick 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | √ | 4.11 | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| task | () => void | 否 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<void> |\n \n","tutorial":""},"$forceUpdate":{"name":"#### $forceUpdate(): void; @$forceupdate","originName":"$forceUpdate","description":"","compatibility":"##### $forceUpdate 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | √ | x | 4.11 | x | x | 4.61 | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"$callMethod":{"name":"#### $callMethod(method: string, ...args: Array\\<any>): any \\| null; @$callmethod","originName":"$callMethod","description":"","compatibility":"##### $callMethod 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | √ | 4.11 | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| method | string | 是 |\n| args | Array&lt;any&gt; | 否 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| any | 否 |\n \n","tutorial":""},"$emit":{"name":"#### $emit(event: string, ...do_not_transform_spread: Array\\<any>): void; @$emit","originName":"$emit","description":"","compatibility":"##### $emit 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | √ | 4.11 | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| event | string | 是 |\n| do_not_transform_spread | Array&lt;any&gt; | 否 | \n","fileFormats":"","returnValue":"","tutorial":""},"$watch":{"name":"#### $watch(source: any, // string \\| Function, value: Function, options?: WatchOptions): WatchStopHandle; @$watch","originName":"$watch","description":"","compatibility":"##### $watch 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | √ | 4.11 | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| source | any | 是 |\n| value | () => void | 否 |\n| options | **WatchOptions** | 否 |\n@| 名称 | 类型 | 必备 |\n@| :- | :- | :- |\n@| flush | string | 否 |\n@| immediate | boolean | 否 |\n@| deep | boolean | 否 |\n@| onTrack | (event: DebuggerEvent) => void | 否 |\n@| onTrigger | (event: DebuggerEvent) => void | 否 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| () => void |\n \n","tutorial":""}},"compatibility":""},"TakeSnapshotOptions":{"name":"## TakeSnapshotOptions","description":"截图的参数配置选项","extends":"","param":"\n### TakeSnapshotOptions 的属性值 @takesnapshotoptions-values\n| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| type | string | 否 | \"file\" | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图导出类型,目前仅支持 'file' 保存到临时文件目录 |\n| format | string | 否 | \"png\" | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图文件格式,目前仅支持 'png' |\n","methods":{"success":{"name":"#### success: (res: TakeSnapshotSuccess) => void @success","originName":"success","description":"接口调用成功的回调函数","compatibility":"##### success 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- |\n| x | x | 5.02 | 5.02 | x | 5.02 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| res | **TakeSnapshotSuccess** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图成功的返回数据 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| tempFilePath | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图保存的临时文件路径 | \n","fileFormats":"","returnValue":"","tutorial":""},"fail":{"name":"#### fail: (res: TakeSnapshotFail) => void @fail","originName":"fail","description":"接口调用失败的回调函数","compatibility":"##### fail 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- |\n| x | x | 5.02 | 5.02 | x | 5.02 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| res | **TakeSnapshotFail** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图失败的返回数据 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| errMsg | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图失败时的错误描述信息 | \n","fileFormats":"","returnValue":"","tutorial":""},"complete":{"name":"#### complete: (res: any) => void @complete","originName":"complete","description":"接口调用结束的回调函数(调用成功、失败都会执行)","compatibility":"##### complete 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- |\n| x | x | 5.02 | 5.02 | x | 5.02 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| res | any | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":"### TakeSnapshotOptions 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS | HarmonyOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- | :- | :- |\n| x | x | 5.02 | 5.02 | x | 5.02 | x |"},"TakeSnapshotSuccessCallback":{"name":"## TakeSnapshotSuccessCallback","description":"","extends":"","param":"","compatibility":""},"TakeSnapshotSuccess":{"name":"## TakeSnapshotSuccess","description":"截图成功的返回数据","extends":"","param":"\n### TakeSnapshotSuccess 的属性值 @takesnapshotsuccess-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| tempFilePath | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图保存的临时文件路径 |\n","compatibility":"### TakeSnapshotSuccess 兼容性 <Help /> \n | Web | 微信小程序 |\n| :- | :- |\n| x | x |"},"TakeSnapshotFailCallback":{"name":"## TakeSnapshotFailCallback","description":"","extends":"","param":"","compatibility":""},"TakeSnapshotFail":{"name":"## TakeSnapshotFail","description":"截图失败的返回数据","extends":"","param":"\n### TakeSnapshotFail 的属性值 @takesnapshotfail-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| errMsg | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"},{\"title\":\"HarmonyOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"x\",\"5.02\",\"5.02\",\"x\",\"5.02\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 截图失败时的错误描述信息 |\n","compatibility":"### TakeSnapshotFail 兼容性 <Help /> \n | Web | 微信小程序 |\n| :- | :- |\n| x | x |"},"TakeSnapshotCompleteCallback":{"name":"## TakeSnapshotCompleteCallback","description":"","extends":"","param":"","compatibility":""},"DOMRect":{"name":"## DOMRect","description":"一个 DOMRect 代表一个矩形。","extends":"","param":"\n### 构造函数\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| x | number | 否 | 0 | 矩形原点的x坐标 |\n| y | number | 否 | 0 | 矩形原点的y坐标 |\n| width | number | 否 | 0 | 矩形的宽 |\n| height | number | 否 | 0 | 矩形的高 |\n\n### DOMRect 的属性值 @domrect-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.11\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 矩形的宽 |\n| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.11\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 矩形的高 |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.11\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 矩形原点的x坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.11\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 矩形原点的y坐标 |\n| left | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.11\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 矩形的左坐标值 |\n| right | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.11\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 矩形的右坐标值 |\n| top | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.11\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 矩形的顶坐标值 |\n| bottom | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.11\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 矩形的底坐标值 |\n","compatibility":"### DOMRect 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.0 | 4.11 | 3.9 | 4.11 | 4.61 |"},"GetBoundingClientRectAsyncOptions":{"name":"## GetBoundingClientRectAsyncOptions","description":"","extends":"","param":"","methods":{"success":{"name":"#### success: (rect: DOMRect) => void @success","originName":"success","description":"","compatibility":"","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| rect | [DOMRect](/api/dom/domrect.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.11\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 一个 DOMRect 代表一个矩形。 | \n","fileFormats":"","returnValue":"","tutorial":""},"fail":{"name":"#### fail: () => void @fail","originName":"fail","description":"","compatibility":"","param":"","fileFormats":"","returnValue":"","tutorial":""},"complete":{"name":"#### complete: (rect: any) => void @complete","originName":"complete","description":"","compatibility":"","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| rect | any | 否 | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":""},"GetBoundingClientRectAsyncSuccessCallback":{"name":"## GetBoundingClientRectAsyncSuccessCallback","description":"","extends":"","param":"","compatibility":""},"GetBoundingClientRectAsyncFailCallback":{"name":"## GetBoundingClientRectAsyncFailCallback","description":"","extends":"","param":"","compatibility":""},"GetBoundingClientRectAsyncCompleteCallback":{"name":"## GetBoundingClientRectAsyncCompleteCallback","description":"","extends":"","param":"","compatibility":""},"DrawableContext":{"name":"## DrawableContext","description":"","extends":"","param":"\n### DrawableContext 的属性值 @drawablecontext-values\n| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| font | string | 是 | 10px | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS(VDOM)\"},{\"title\":\"iOS(Vapor)\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"x\",\"x\",\"3.9\",\"x\",\"4.11\",\"x\",\"4.61\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置字体大小 |\n| fillStyle | [string.ColorString](/uts/data-type.md#ide-string) | 是 | #000 (黑色) | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS(VDOM)\"},{\"title\":\"iOS(Vapor)\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"x\",\"x\",\"3.9\",\"x\",\"4.11\",\"x\",\"4.61\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置填充颜色 |\n| lineCap | string | 是 | butt | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS(VDOM)\"},{\"title\":\"iOS(Vapor)\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"x\",\"x\",\"3.9\",\"x\",\"4.11\",\"x\",\"4.61\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定如何绘制每一条线条末端的属性,可选值:`butt`线段末端以方形结束;`round`线段末端以圆形结束;`square`线段末端以方形结束,但是会增加一个一半宽度的矩形区域。 |\n| lineDashOffset | number | 是 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS(VDOM)\"},{\"title\":\"iOS(Vapor)\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"x\",\"x\",\"3.9\",\"x\",\"4.11\",\"x\",\"4.61\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置虚线偏移量 |\n| lineJoin | string | 是 | miter | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS(VDOM)\"},{\"title\":\"iOS(Vapor)\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"x\",\"x\",\"3.9\",\"x\",\"4.11\",\"x\",\"4.61\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置 2 个长度不为 0 的线条相连部分如何连接在一起的属性,可选值:`bevel`斜角;`round`圆角;`miter`尖角。 |\n| lineWidth | number | 是 | 1px | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS(VDOM)\"},{\"title\":\"iOS(Vapor)\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"x\",\"x\",\"3.9\",\"x\",\"4.11\",\"x\",\"4.61\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置线条的宽度 |\n| strokeStyle | [string.ColorString](/uts/data-type.md#ide-string) | 是 | #000 (黑色) | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS(VDOM)\"},{\"title\":\"iOS(Vapor)\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"x\",\"x\",\"3.9\",\"x\",\"4.11\",\"x\",\"4.61\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置边框的颜色 |\n| textAlign | string | 是 | left | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS(VDOM)\"},{\"title\":\"iOS(Vapor)\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"x\",\"x\",\"3.9\",\"x\",\"4.11\",\"x\",\"4.61\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置文本的对齐方式,可取值:`left`左对齐;`center`居中对齐;`right`右对齐。 |\n","methods":{"beginPath":{"name":"#### beginPath(): void @beginpath","originName":"beginPath","description":"创建一个新的空路径","compatibility":"##### beginPath 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"arc":{"name":"#### arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void @arc","originName":"arc","description":"绘制一段弧线","compatibility":"##### arc 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| x | number | 是 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 圆心的X轴坐标 |\n| y | number | 是 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 圆心的Y轴坐标 |\n| radius | number | 是 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 圆弧的半径 |\n| startAngle | number | 是 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 圆弧的起始点,x 轴方向开始计算,单位为弧度 |\n| endAngle | number | 是 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 圆弧的终点,单位为弧度 |\n| anticlockwise | boolean | 否 | true | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 圆弧绘制方向,true:逆时针绘制,false:顺时针绘制。 | \n","fileFormats":"","returnValue":"","tutorial":""},"moveTo":{"name":"#### moveTo(x: number, y: number): void @moveto","originName":"moveTo","description":"将一个新的路径的起始点移动到 (x,y) 坐标","compatibility":"##### moveTo 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 点的X轴坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 点的Y轴坐标 | \n","fileFormats":"","returnValue":"","tutorial":""},"rect":{"name":"#### rect(x: number, y: number, width: number, height: number): void @rect","originName":"rect","description":"创建一个矩形路径","compatibility":"##### rect 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形起点的X轴坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形起点的Y轴坐标 |\n| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形宽度 |\n| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形高度 | \n","fileFormats":"","returnValue":"","tutorial":""},"lineTo":{"name":"#### lineTo(x: number, y: number): void @lineto","originName":"lineTo","description":"将路径的最后一个点连接到 (x,y) 坐标","compatibility":"##### lineTo 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 线终点的X轴坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 线终点的Y轴坐标 | \n","fileFormats":"","returnValue":"","tutorial":""},"closePath":{"name":"#### closePath(): void @closepath","originName":"closePath","description":"闭合路径,将最后一个点与起点连接起来。如果图形已经封闭,或者只有一个点,那么此方法不会产生任何效果。","compatibility":"##### closePath 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"stroke":{"name":"#### stroke(): void @stroke","originName":"stroke","description":"绘制当前或已经存在的路径的边框。","compatibility":"##### stroke 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"strokeRect":{"name":"#### strokeRect(x: number, y: number, width: number, height: number): void @strokerect","originName":"strokeRect","description":"绘制一个矩形框","compatibility":"##### strokeRect 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形起点的X轴坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形起点的Y轴坐标 |\n| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形宽度 |\n| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形高度 | \n","fileFormats":"","returnValue":"","tutorial":""},"strokeText":{"name":"#### strokeText(text: string, x: number, y: number): void @stroketext","originName":"strokeText","description":"绘制空心字符","compatibility":"##### strokeText 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| text | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 要绘制的字符 |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 字符开始绘制的X轴坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 字符开始绘制的Y轴坐标 | \n","fileFormats":"","returnValue":"","tutorial":""},"fill":{"name":"#### fill(fillRule?: string): void @fill","originName":"fill","description":"填充当前或已存在的路径","compatibility":"##### fill 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| fillRule | string | 否 | nonzero | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 填充规则。可取值:`nonzero`非零环绕规则;`evenodd`奇偶环绕规则。 | \n","fileFormats":"","returnValue":"","tutorial":""},"fillRect":{"name":"#### fillRect(x: number, y: number, width: number, height: number): void @fillrect","originName":"fillRect","description":"绘制一个实心矩形","compatibility":"##### fillRect 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形起点的X轴坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形起点的Y轴坐标 |\n| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形宽度 |\n| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形高度 | \n","fileFormats":"","returnValue":"","tutorial":""},"fillText":{"name":"#### fillText(text: string, x: number, y: number): void @filltext","originName":"fillText","description":"绘制实心字符","compatibility":"##### fillText 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| text | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 要绘制的字符 |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 字符开始绘制的X轴坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 字符开始绘制的Y轴坐标 | \n","fileFormats":"","returnValue":"","tutorial":""},"reset":{"name":"#### reset(): void @reset","originName":"reset","description":"清空绘制数据","compatibility":"##### reset 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"update":{"name":"#### update(): void @update","originName":"update","description":"将所有绘制内容更新到画布上","compatibility":"##### update 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"setLineDash":{"name":"#### setLineDash(segments: Array\\<number>): void @setlinedash","originName":"setLineDash","description":"设置虚线样式","compatibility":"##### setLineDash 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| segments | Array&lt;number&gt; | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 一组描述交替绘制线段和间距长度的数字。 | \n","fileFormats":"","returnValue":"","tutorial":""},"bezierCurveTo":{"name":"#### bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void @beziercurveto","originName":"bezierCurveTo","description":"创建三次方贝塞尔曲线路径","compatibility":"##### bezierCurveTo 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| cp1x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 第一个贝塞尔控制点的 x 坐标 |\n| cp1y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 第一个贝塞尔控制点的 y 坐标 |\n| cp2x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 第二个贝塞尔控制点的 x 坐标 |\n| cp2y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 第二个贝塞尔控制点的 y 坐标 |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 结束点的 x 坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 结束点的 y 坐标 | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":"### DrawableContext 兼容性 <Help /> \n | Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- |\n| x | x | 3.9 | x | 4.11 | x | 4.61 | x |","example":"### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/API/element-draw/element-draw.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/API/element-draw/element-draw.uvue) \n>\n> 该 API 不支持 Web,请运行 hello uni-app x 到 App 平台体验 \n```uvue\n<template>\r\n <!-- #ifdef APP -->\r\n <scroll-view class=\"page-scroll-view\">\r\n <!-- #endif -->\r\n <view>\r\n <page-intro content=\"本页演示 canvas 绘制:在 view 上绘制文本、线条、圆、虚线、图形、样式、arcto 等。\"></page-intro>\r\n <view class=\"drawing\" id=\"draw-text-view\"></view>\r\n <view class=\"drawing\" id=\"draw-line-view\"></view>\r\n <view class=\"drawing\" id=\"draw-circle-view\"></view>\r\n <view class=\"drawing\" id=\"draw-dash-line\"></view>\r\n <view class=\"drawing\" id=\"draw-house\"></view>\r\n <view class=\"drawing\" id=\"draw-style\"></view>\r\n <view class=\"drawing\" id=\"draw-odd\"></view>\r\n <view class=\"drawing\" id=\"draw-arcto\"></view>\r\n </view>\r\n <!-- #ifdef APP -->\r\n </scroll-view>\r\n <!-- #endif -->\r\n</template>\r\n\r\n<script setup lang=\"uts\">\r\n var y = 160\r\n const texts: string[] = [\r\n 'HBuilderX,轻巧、极速,极客编辑器',\r\n 'uni-app x,终极跨平台方案',\r\n 'uniCloud,js serverless云服务',\r\n 'uts,大一统语言',\r\n 'uniMPSdk,让你的App具备小程序能力',\r\n 'uni-admin,开源、现成的全端管理后台',\r\n 'uni-id,开源、全端的账户中心',\r\n 'uni-pay,开源、云端一体、全平台的支付',\r\n 'uni-ai,聚合ai能力',\r\n 'uni-cms,开源、云端一体、全平台的内容管理平台',\r\n 'uni-im,开源、云端一体、全平台的im即时消息',\r\n 'uni统计,开源、完善、全平台的统计报表',\r\n '......'\r\n ]\r\n\r\n onPageShow(() => {\r\n })\r\n\r\n onUnload(() => {\r\n y = 160\r\n })\r\n\r\n function drawText() {\r\n let element = uni.getElementById('draw-text-view')!\r\n let ctx = element.getDrawableContext()!\r\n let width = element.getBoundingClientRect().width\r\n ctx.reset()\r\n ctx.font = \"15px Arial\"\r\n ctx.textAlign = \"center\"\r\n for (var i = 0; i < texts.length; i++) {\r\n let value = texts[i]\r\n if (i % 2 == 0) {\r\n ctx.fillText(value, width / 2, (20 * (i + 1)))\r\n } else {\r\n ctx.lineWidth = 0.5\r\n ctx.strokeText(value, width / 2, (20 * (i + 1)))\r\n }\r\n }\r\n ctx.update()\r\n }\r\n\r\n function drawDashedLine(pattern : Array<number>, ctx : DrawableContext) {\r\n ctx.beginPath();\r\n ctx.setLineDash(pattern);\r\n ctx.moveTo(0, y);\r\n ctx.lineTo(300, y);\r\n ctx.stroke();\r\n y += 15;\r\n }\r\n\r\n function drawLines() {\r\n let ctx = uni.getElementById('draw-line-view')!.getDrawableContext()!\r\n ctx.reset()\r\n ctx.lineWidth = 10;\r\n\r\n [\"round\", \"bevel\", \"miter\"].forEach((join, i) => {\r\n ctx.lineJoin = join;\r\n ctx.beginPath();\r\n ctx.moveTo(5, 10 + i * 40);\r\n ctx.lineTo(50, 50 + i * 40);\r\n ctx.lineTo(90, 10 + i * 40);\r\n ctx.lineTo(130, 50 + i * 40);\r\n ctx.lineTo(170, 10 + i * 40);\r\n ctx.stroke();\r\n });\r\n ctx.lineWidth = 1\r\n var space = 170\r\n ctx.strokeStyle = '#09f';\r\n ctx.beginPath();\r\n ctx.moveTo(10 + space, 10);\r\n ctx.lineTo(140 + space, 10);\r\n ctx.moveTo(10 + space, 140);\r\n ctx.lineTo(140 + space, 140);\r\n ctx.stroke();\r\n // Draw lines\r\n ctx.strokeStyle = 'black';\r\n ['butt', 'round', 'square'].forEach((lineCap, i) => {\r\n ctx.lineWidth = 15;\r\n ctx.lineCap = lineCap;\r\n ctx.beginPath();\r\n ctx.moveTo(25 + space + i * 50, 10);\r\n ctx.lineTo(25 + space + i * 50, 140);\r\n ctx.stroke();\r\n });\r\n ctx.lineWidth = 1;\r\n drawDashedLine([], ctx);\r\n drawDashedLine([2, 2], ctx);\r\n drawDashedLine([10, 10], ctx);\r\n drawDashedLine([20, 5], ctx);\r\n drawDashedLine([15, 3, 3, 3], ctx);\r\n drawDashedLine([20, 3, 3, 3, 3, 3, 3, 3], ctx);\r\n ctx.lineDashOffset = 18;\r\n drawDashedLine([12, 3, 3], ctx);\r\n ctx.lineDashOffset = 0\r\n ctx.setLineDash([0])\r\n ctx.update()\r\n }\r\n\r\n function drawCircles() {\r\n let ctx = uni.getElementById('draw-circle-view')!.getDrawableContext()!\r\n ctx.reset()\r\n // Draw shapes\r\n for (var i = 0; i < 4; i++) {\r\n for (var j = 0; j < 3; j++) {\r\n ctx.beginPath();\r\n var x = 25 + j * 50; // x coordinate\r\n var y = 25 + i * 50; // y coordinate\r\n var radius = 20; // Arc radius\r\n var startAngle = 0; // Starting point on circle\r\n var endAngle = Math.PI + (Math.PI * j) / 2; // End point on circle\r\n var clockwise = i % 2 == 0 ? false : true; // clockwise or anticlockwise\r\n\r\n ctx.arc(x, y, radius, startAngle, endAngle, clockwise);\r\n\r\n if (i > 1) {\r\n ctx.fill();\r\n } else {\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n ctx.update()\r\n }\r\n\r\n function drawStar() {\r\n let ctx = uni.getElementById('draw-dash-line')!.getDrawableContext()!\r\n ctx.reset()\r\n ctx.beginPath();\r\n var horn = 5; // 画5个角\r\n var angle = 360 / horn; // 五个角的度数\r\n // 两个圆的半径\r\n var R = 50;\r\n var r = 20;\r\n // 坐标\r\n var x = 100;\r\n var y = 100;\r\n // #ifdef APP-HARMONY\r\n //TODO 鸿蒙首次调用lineTo并不是起始点,这里暂时先调用一次moveTo\r\n ctx.moveTo(Math.cos((18 + 0 * angle) / 180.0 * Math.PI) * R + x, -Math.sin((18 + 0 * angle) / 180.0 * Math.PI) * R + y);\r\n // #endif\r\n for (var i = 0; i < horn; i++) {\r\n // 角度转弧度:角度/180*Math.PI\r\n // 外圆顶点坐标\r\n ctx.lineTo(Math.cos((18 + i * angle) / 180.0 * Math.PI) * R + x, -Math.sin((18 + i * angle) / 180.0 * Math.PI) * R + y);\r\n // 內圆顶点坐标\r\n ctx.lineTo(Math.cos((54 + i * angle) / 180.0 * Math.PI) * r + x, -Math.sin((54 + i * angle) / 180.0 * Math.PI) * r + y);\r\n }\r\n // closePath:关闭路径,将路径的终点与起点相连\r\n ctx.closePath();\r\n ctx.lineWidth = 3;\r\n ctx.fillStyle = '#E4EF00';\r\n ctx.strokeStyle = \"red\";\r\n ctx.fill();\r\n ctx.stroke();\r\n\r\n ctx.lineWidth = 10;\r\n ctx.beginPath()\r\n ctx.moveTo(170, 100)\r\n ctx.lineTo(255, 15)\r\n ctx.lineTo(340, 100)\r\n ctx.closePath()\r\n ctx.fill()\r\n ctx.strokeStyle = \"blue\"\r\n ctx.stroke()\r\n ctx.beginPath()\r\n ctx.moveTo(170, 145)\r\n ctx.lineTo(255, 45)\r\n ctx.lineTo(340, 145)\r\n ctx.closePath()\r\n ctx.fill()\r\n ctx.strokeStyle = \"gray\"\r\n ctx.stroke()\r\n // 未设置beginPath,导致上下表现一致,与前端一致\r\n ctx.moveTo(170, 190)\r\n ctx.lineTo(255, 90)\r\n ctx.lineTo(340, 190)\r\n ctx.closePath()\r\n ctx.fillStyle = \"orange\"\r\n ctx.fill()\r\n ctx.strokeStyle = \"khaki\"\r\n ctx.stroke()\r\n ctx.update()\r\n }\r\n\r\n function hex(num : number) : string {\r\n if (num == 0) {\r\n return \"00\"\r\n }\r\n let hexChars = \"0123456789ABCDEF\";\r\n let result = \"\";\r\n while (num > 0) {\r\n let remainder = Math.floor(num) % 16;\r\n result = hexChars[remainder] + result;\r\n num = Math.floor(Math.floor(num) / 16);\r\n }\r\n if (result.length == 1) {\r\n return \"0\" + result\r\n }\r\n return result\r\n }\r\n\r\n function drawhouse() {\r\n let ctx = uni.getElementById('draw-house')!.getDrawableContext()!\r\n ctx.reset()\r\n ctx.lineWidth = 10;\r\n\r\n // Wall\r\n ctx.strokeRect(75, 140, 150, 110);\r\n\r\n // Door\r\n ctx.fillRect(130, 190, 40, 60);\r\n\r\n // Roof\r\n ctx.beginPath();\r\n ctx.moveTo(50, 140);\r\n ctx.lineTo(150, 60);\r\n ctx.lineTo(250, 140);\r\n ctx.closePath();\r\n ctx.stroke();\r\n ctx.update()\r\n }\r\n\r\n function drawPoint() {\r\n let ctx = uni.getElementById('draw-style')!.getDrawableContext()!\r\n ctx.reset()\r\n for (let i = 0; i < 6; i++) {\r\n for (let j = 0; j < 6; j++) {\r\n ctx.strokeStyle = `rgb(0,${Math.floor(255 - 42.5 * i)},${Math.floor(255 - 42.5 * j)})`;\r\n ctx.beginPath();\r\n ctx.arc(12.5 + j * 25, 12.5 + i * 25, 10, 0, Math.PI * 2, true);\r\n ctx.stroke();\r\n }\r\n }\r\n for (let i = 0; i < 6; i++) {\r\n for (let j = 0; j < 6; j++) {\r\n ctx.fillStyle = `rgb(${Math.floor(255 - 42.5 * i)},${Math.floor(255 - 42.5 * j)},0)`;\r\n ctx.fillRect(180 + j * 25, i * 25, 25, 25);\r\n }\r\n }\r\n ctx.update()\r\n }\r\n\r\n function drawRect() {\r\n let ctx = uni.getElementById('draw-odd')!.getDrawableContext()!\r\n ctx.reset()\r\n // Create path\r\n ctx.moveTo(30, 90);\r\n ctx.lineTo(110, 20);\r\n ctx.lineTo(240, 130);\r\n ctx.lineTo(60, 130);\r\n ctx.lineTo(190, 20);\r\n ctx.lineTo(270, 90);\r\n ctx.closePath();\r\n\r\n // Fill path\r\n ctx.fillStyle = \"green\";\r\n ctx.fill(\"evenodd\");\r\n ctx.update()\r\n\r\n }\r\n\r\n function drawArcTo() {\r\n let ctx = uni.getElementById('draw-arcto')!.getDrawableContext()!\r\n ctx.reset()\r\n ctx.beginPath();\r\n ctx.moveTo(50, 20);\r\n ctx.bezierCurveTo(230, 30, 150, 60, 50, 100);\r\n ctx.stroke();\r\n\r\n ctx.fillStyle = \"blue\";\r\n // start point\r\n ctx.fillRect(50, 20, 10, 10);\r\n // end point\r\n ctx.fillRect(50, 100, 10, 10);\r\n\r\n ctx.fillStyle = \"red\";\r\n // control point one\r\n ctx.fillRect(230, 30, 10, 10);\r\n // control point two\r\n ctx.fillRect(150, 70, 10, 10);\r\n\r\n ctx.fillStyle = 'transparent'\r\n ctx.fillRect(150, 70, 20, 20);\r\n\r\n ctx.update()\r\n }\r\n\r\n onReady(() => {\r\n drawText()\r\n drawLines()\r\n drawCircles()\r\n drawStar()\r\n drawhouse()\r\n drawPoint()\r\n drawRect()\r\n drawArcTo()\r\n })\r\n</script>\r\n\r\n<style>\r\n .drawing {\r\n height: 275px;\r\n background-color: lightgray;\r\n margin-bottom: 15px;\r\n }\r\n</style>\r\n\n```"},"DrawableContextColorString":{"name":"## DrawableContextColorString","description":"","extends":"","param":"","compatibility":""},"UniCallbackWrapper":{"name":"## UniCallbackWrapper","description":"事件回调封装类,用于注销监听函数的形参","extends":"","param":"","compatibility":"### UniCallbackWrapper 兼容性 <Help /> \n | 微信小程序 |\n| :- |\n| x |"},"UniEvent":{"name":"## UniEvent","description":"","extends":"","param":"\n### 构造函数\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| type | string | 是 | 事件的名称 |\n\n### 构造函数\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| type | string | 是 | 事件的名称 |\n| eventInit | any | 是 | 事件初始参数。支持字段:`bubbles`表明该事件是否冒泡。可选,默认为false;`cancelable`表明该事件是否可以被取消。可选,默认为false。 |\n\n### UniEvent 的属性值 @unievent-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| bubbles | boolean | 是 | | 是否冒泡 |\n| cancelable | boolean | 是 | | 是否可以取消 |\n| type | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 事件类型<br/> |\n| target | [UniElement](/api/dom/unielement.md) | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 触发事件的组件<br/> |\n| currentTarget | [UniElement](/api/dom/unielement.md) | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前组件<br/> |\n| timeStamp | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 事件发生时的时间戳<br/> |\n","methods":{"stopPropagation":{"name":"#### stopPropagation(): void @stoppropagation","originName":"stopPropagation","description":"阻止当前事件的进一步传播\n","compatibility":"##### stopPropagation 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.0 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"preventDefault":{"name":"#### preventDefault(): void @preventdefault","originName":"preventDefault","description":"阻止当前事件的默认行为\n","compatibility":"##### preventDefault 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 3.9 | 4.55 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":""},"UniAnimationKeyframe":{"name":"## UniAnimationKeyframe","description":"","extends":"","param":"\n### UniAnimationKeyframe 的属性值 @unianimationkeyframe-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| width | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制宽度属性的过渡效果 |\n| height | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制高度属性的过渡效果 |\n| margin | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制外边距属性的过渡效果 |\n| marginTop | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制上外边距属性的过渡效果 |\n| marginBottom | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制下外边距属性的过渡效果 |\n| marginLeft | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制左外边距属性的过渡效果 |\n| marginRight | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制右外边距属性的过渡效果 |\n| left | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制左侧位置属性的过渡效果 |\n| right | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制右侧位置属性的过渡效果 |\n| top | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制顶部位置属性的过渡效果 |\n| bottom | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制底部位置属性的过渡效果 |\n| padding | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制内边距属性的过渡效果 |\n| paddingLeft | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制左内边距属性的过渡效果 |\n| paddingRight | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制右内边距属性的过渡效果 |\n| paddingTop | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制上内边距属性的过渡效果 |\n| paddingBottom | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制下内边距属性的过渡效果 |\n| opacity | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制透明度属性的过渡效果 |\n| backgroundColor | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制背景颜色属性的过渡效果 |\n| borderColor | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制边框颜色属性的过渡效果 |\n| borderTopColor | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制上边框颜色属性的过渡效果 |\n| borderBottomColor | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制下边框颜色属性的过渡效果 |\n| borderLeftColor | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制左边框颜色属性的过渡效果 |\n| borderRightColor | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制右边框颜色属性的过渡效果 |\n| transform | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制变换属性的过渡效果 |\n| transformOrigin | Array&lt;any&gt; | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 控制元素变形的原点的过渡效果 |\n| offset | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 关键帧的偏移量。为0.0和1.0之间的数字。如果此值缺失,则关键帧将在相邻关键帧之间均匀分布。 |\n","compatibility":""},"UniAnimationOption":{"name":"## UniAnimationOption","description":"","extends":"","param":"\n### UniAnimationOption 的属性值 @unianimationoption-values\n| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| delay | number | 否 | 0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"4.61\",\"5.08\"]],\"status\":\"SUPPORTED\"}' /> | 动画延迟的毫秒数 |\n| direction | string | 否 | normal | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 动画运行方向 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| normal | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 正向运行 |\n@| reverse | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"x\",\"x\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 反向运行 |\n@| alternate | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 每次迭代后切换方向 |\n@| alternate-reverse | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"x\",\"x\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 反向运行并在每次迭代后切换方向 |\n| duration | number | 否 | 0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"4.61\",\"5.08\"]],\"status\":\"SUPPORTED\"}' /> | 动画时长 |\n| easing | string | 否 | linear | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"4.61\",\"5.08\"]],\"status\":\"SUPPORTED\"}' /> | 动画曲线。 |\n@| 合法值 |\n@| :- |\n@| ease |\n@| ease-in |\n@| ease-out |\n@| ease-in-out |\n@| linear |\n@| cubic-bezier |\n| fill | string | 否 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 决定动画效果是否应在播放前反映在元素中 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| backwards | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"√\",\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 动画播放完毕后恢复初始状态 |\n@| forwards | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 动画播放完毕后保留状态 |\n@| both | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"√\",\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 动画播放完毕后保留状态 |\n@| none | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"√\",\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 动画播放完毕后恢复初始状态 |\n| iterations | number | 否 | 1 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"√\",\"4.51\",\"4.53\",\"4.61\",\"5.08\"]],\"status\":\"SUPPORTED\"}' /> | 动画重复的次数。当设置为`Infinity`时,动画将一直重复执行。 |\n","compatibility":""},"UniAnimationOptionDirection":{"name":"## UniAnimationOptionDirection","description":"","extends":"","param":"","compatibility":""},"UniAnimationOptionEasing":{"name":"## UniAnimationOptionEasing","description":"","extends":"","param":"","compatibility":""},"UniAnimationOptionFill":{"name":"## UniAnimationOptionFill","description":"","extends":"","param":"","compatibility":""},"UniAnimation":{"name":"## UniAnimation","description":"","extends":"","param":"\n### UniAnimation 的属性值 @unianimation-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| id | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"4.53\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 获取或设置用于标识动画的字符串 |\n| playState | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"√\",\"x\",\"4.51\",\"4.53\",\"x\",\"5.08\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 返回动画播放状态。可选值:`running`动画正在运行;`paused`动画暂停;`finished`动画播放完成;`idle`动画取消或者失败 |\n","methods":{"oncancel":{"name":"#### oncancel: (event: UniAnimationPlaybackEvent) => void @oncancel","originName":"oncancel","description":"监听动画取消事件","compatibility":"##### oncancel 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | 5.21 | 4.51 | 4.53 | x | 5.08 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| event | **UniAnimationPlaybackEvent** | 是 |\n@| 名称 | 类型 | 必备 | 描述 |\n@| :- | :- | :- | :- |\n@| type | string | 是 | 动画的事件类型 | \n","fileFormats":"","returnValue":"","tutorial":""},"onfinish":{"name":"#### onfinish: (event: UniAnimationPlaybackEvent) => void @onfinish","originName":"onfinish","description":"监听动画完成事件","compatibility":"##### onfinish 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | x | 4.51 | 4.53 | x | 5.08 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| event | **UniAnimationPlaybackEvent** | 是 |\n@| 名称 | 类型 | 必备 | 描述 |\n@| :- | :- | :- | :- |\n@| type | string | 是 | 动画的事件类型 | \n","fileFormats":"","returnValue":"","tutorial":""},"cancel":{"name":"#### cancel(): void @cancel","originName":"cancel","description":"终止并取消所有动画","compatibility":"##### cancel 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.53 | 4.51 | 4.53 | x | 5.08 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"finish":{"name":"#### finish(): void @finish","originName":"finish","description":"动画跳转到最后一毫秒并立即播放完成","compatibility":"##### finish 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | x | 4.51 | 4.53 | x | 5.08 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"pause":{"name":"#### pause(): void @pause","originName":"pause","description":"暂停动画播放","compatibility":"##### pause 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | x | 4.51 | 4.53 | x | 5.08 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"play":{"name":"#### play(): void @play","originName":"play","description":"开始或恢复动画播放","compatibility":"##### play 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | 4.53 | 4.51 | 4.53 | x | 5.08 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":"### UniAnimation 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- |\n| √ | x | 4.51 | 4.53 | x | 5.08 |"},"UniAnimationOnCancel":{"name":"## UniAnimationOnCancel","description":"","extends":"","param":"","compatibility":""},"UniAnimationOnFinish":{"name":"## UniAnimationOnFinish","description":"","extends":"","param":"","compatibility":""},"RequestFullscreenOptions":{"name":"## RequestFullscreenOptions","description":"","extends":"","param":"\n### RequestFullscreenOptions 的属性值 @requestfullscreenoptions-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| navigationUI | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 全屏模式时导航栏状态 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| hide | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 隐藏所有系统状态栏和底部导航栏 |\n@| show | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 隐藏顶部系统状态栏,显示底部系统导航栏 |\n@| auto | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 系统默认行为 |\n| orientation | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 全屏显示方向 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| auto | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 根据重力感应自动调整 |\n@| landscape | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 固定为横屏,会根据重力调整方向 |\n@| landscape-secondary | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 固定为反向横屏 |\n@| landscape-primary | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 固定为正向横屏 |\n@| portrait | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 固定为竖屏 |\n","methods":{"success":{"name":"#### success: () => void @success","originName":"success","description":"成功回调","compatibility":"##### success 兼容性 <Help /> \n| Web | 微信小程序 |\n| :- | :- |\n| x | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"fail":{"name":"#### fail: (error: FullscreenError) => void @fail","originName":"fail","description":"失败回调","compatibility":"##### fail 兼容性 <Help /> \n| Web | 微信小程序 |\n| :- | :- |\n| x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| error | **IFullscreenError** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| errCode | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 错误码 |\n@@| 合法值 | 兼容性 | 描述 |\n@@| :- | :-: | :- |\n@@| 106600 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前页面已经有element处于全屏状态 |\n@@| 106601 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前element不支持全屏 |\n@@| 106602 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前页面没有element处于全屏状态 |\n@@| 106603 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面已销毁或者尚未就绪 |\n@@| 106604 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 组件未就绪 |\n@| errSubject | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 统一错误主题(模块)名称 |\n@| data | any | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 错误信息中包含的数据 |\n@| cause | [Error](/err-spec.md#unierror) | 否 | | 源错误信息,可以包含多个错误,详见SourceError |\n@| errMsg | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | | \n","fileFormats":"","returnValue":"","tutorial":""},"complete":{"name":"#### complete: (result: any) => void @complete","originName":"complete","description":"完成回调","compatibility":"##### complete 兼容性 <Help /> \n| Web | 微信小程序 |\n| :- | :- |\n| x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| result | any | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":""},"RequestFullscreenSuccessCallback":{"name":"## RequestFullscreenSuccessCallback","description":"","extends":"","param":"","compatibility":""},"RequestFullscreenFailCallback":{"name":"## RequestFullscreenFailCallback","description":"","extends":"","param":"","compatibility":""},"IFullscreenError":{"name":"## IFullscreenError","description":"","extends":"","param":"\n### IFullscreenError 的属性值 @ifullscreenerror-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| errCode | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 错误码 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| 106600 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前页面已经有element处于全屏状态 |\n@| 106601 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前element不支持全屏 |\n@| 106602 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前页面没有element处于全屏状态 |\n@| 106603 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面已销毁或者尚未就绪 |\n@| 106604 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 组件未就绪 |\n| errSubject | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 统一错误主题(模块)名称 |\n| data | any | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 错误信息中包含的数据 |\n| cause | [Error](/err-spec.md#unierror) | 否 | | 源错误信息,可以包含多个错误,详见SourceError |\n| errMsg | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | |\n","compatibility":""},"IUniError":{"name":"## IUniError","description":"","extends":"","param":"\n### IUniError 的属性值 @iunierror-values\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| errCode | number | 是 | 统一错误码 |\n| errSubject | string | 是 | 统一错误主题(模块)名称 |\n| data | any | 否 | 错误信息中包含的数据 |\n| cause | [Error](/err-spec.md#unierror) | 否 | 源错误信息,可以包含多个错误,详见SourceError |\n| errMsg | string | 是 | |\n","compatibility":""},"Error":{"name":"## Error","description":"UTS错误信息对象","extends":"","param":"\n### 构造函数\n### 构造函数\n| 名称 | 类型 | 必备 |\n| :- | :- | :- |\n| message | string | 是 |\n\n### 构造函数\n| 名称 | 类型 | 必备 |\n| :- | :- | :- |\n| message | string | 是 |\n| options | any | 是 |\n\n### Error 的属性值 @error-values\n| 名称 | 类型 | 必备 |\n| :- | :- | :- |\n| name | string | 是 |\n| message | string | 是 |\n| cause | [Error](/err-spec.md#unierror) | 否 |\n","compatibility":""},"FullscreenErrorCode":{"name":"## FullscreenErrorCode","description":"错误码","extends":"","param":"","compatibility":"### FullscreenErrorCode 兼容性 <Help /> \n | Web | 微信小程序 |\n| :- | :- |\n| x | x |"},"RequestFullscreenCompleteCallback":{"name":"## RequestFullscreenCompleteCallback","description":"","extends":"","param":"","compatibility":""},"WatchOptions":{"name":"## WatchOptions","description":"","extends":"","param":"\n### WatchOptions 的属性值 @watchoptions-values\n| 名称 | 类型 | 必备 |\n| :- | :- | :- |\n| flush | string | 否 |\n| immediate | boolean | 否 |\n| deep | boolean | 否 |\n| onTrack | (event: DebuggerEvent) => void | 否 |\n| onTrigger | (event: DebuggerEvent) => void | 否 |\n","compatibility":""},"WatchStopHandle":{"name":"## WatchStopHandle","description":"","extends":"","param":"","compatibility":""},"UniPageBody":{"name":"## UniPageBody","description":"","extends":"","param":"\n### UniPageBody 的属性值 @unipagebody-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| left | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容区域左上角横坐标 |\n| right | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容区域右下角横坐标 |\n| top | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容区域左上角纵坐标 |\n| bottom | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容区域右下角纵坐标 |\n| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容区域宽度 |\n| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容区域高度 |\n","compatibility":""},"UniSafeAreaInsets":{"name":"## UniSafeAreaInsets","description":"","extends":"","param":"\n### UniSafeAreaInsets 的属性值 @unisafeareainsets-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| left | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 安全区域左侧插入位置(距离左边边界距离) |\n| right | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 安全区域右侧插入位置(距离右边边界距离) |\n| top | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 安全区顶部插入位置(距离顶部边界距离) |\n| bottom | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"4.51\",\"4.51\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 安全区域底部插入位置(距离底部边界距离) |\n","compatibility":""},"ExitFullscreenOptions":{"name":"## ExitFullscreenOptions","description":"","extends":"","param":"","methods":{"success":{"name":"#### success: () => void @success","originName":"success","description":"成功回调","compatibility":"##### success 兼容性 <Help /> \n| Web | 微信小程序 | iOS |\n| :- | :- | :- |\n| x | x | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"fail":{"name":"#### fail: (error: FullscreenError) => void @fail","originName":"fail","description":"失败回调","compatibility":"##### fail 兼容性 <Help /> \n| Web | 微信小程序 | iOS |\n| :- | :- | :- |\n| x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| error | **IFullscreenError** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| errCode | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 错误码 |\n@@| 合法值 | 兼容性 | 描述 |\n@@| :- | :-: | :- |\n@@| 106600 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前页面已经有element处于全屏状态 |\n@@| 106601 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前element不支持全屏 |\n@@| 106602 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 当前页面没有element处于全屏状态 |\n@@| 106603 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面已销毁或者尚未就绪 |\n@@| 106604 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 组件未就绪 |\n@| errSubject | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 统一错误主题(模块)名称 |\n@| data | any | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 错误信息中包含的数据 |\n@| cause | [Error](/err-spec.md#unierror) | 否 | | 源错误信息,可以包含多个错误,详见SourceError |\n@| errMsg | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | | \n","fileFormats":"","returnValue":"","tutorial":""},"complete":{"name":"#### complete: (result: any) => void @complete","originName":"complete","description":"完成回调","compatibility":"##### complete 兼容性 <Help /> \n| Web | 微信小程序 | iOS |\n| :- | :- | :- |\n| x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| result | any | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":""},"ExitFullscreenSuccessCallback":{"name":"## ExitFullscreenSuccessCallback","description":"","extends":"","param":"","compatibility":""},"ExitFullscreenFailCallback":{"name":"## ExitFullscreenFailCallback","description":"","extends":"","param":"","compatibility":""},"ExitFullscreenCompleteCallback":{"name":"## ExitFullscreenCompleteCallback","description":"","extends":"","param":"","compatibility":""},"UniPageOnLayoutChangeCallback":{"name":"## UniPageOnLayoutChangeCallback","description":"","extends":"","param":"","compatibility":""},"UniPagePerformanceTiming":{"name":"## UniPagePerformanceTiming","description":"页面性能计时信息","extends":"","param":"\n### UniPagePerformanceTiming 的属性值 @unipageperformancetiming-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| duration | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 性能计时持续的时间,单位为ms |\n","compatibility":"### UniPagePerformanceTiming 兼容性 <Help /> \n | Android | iOS |\n| :- | :- |\n| x | x |"},"UniPageOnRenderChangeCallback":{"name":"## UniPageOnRenderChangeCallback","description":"","extends":"","param":"","compatibility":""},"UniPagePerformanceRenderTiming":{"name":"## UniPagePerformanceRenderTiming","description":"渲染性能计时信息<br/> UniPagePerformanceTiming基类的duration属性为渲染到屏幕的总时间","extends":"","param":"\n### UniPagePerformanceRenderTiming 的属性值 @unipageperformancerendertiming-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| updateDuration | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 更新渲染属性的总时间,单位为ms |\n| duration | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 性能计时持续的时间,单位为ms |\n","compatibility":"### UniPagePerformanceRenderTiming 兼容性 <Help /> \n | Android | iOS |\n| :- | :- |\n| x | x |"},"UniPageOnTouchEventCallback":{"name":"## UniPageOnTouchEventCallback","description":"","extends":"","param":"","compatibility":""},"UniTouchEvent":{"name":"## UniTouchEvent","description":"","extends":"```mermaid\ngraph LR\n \nUniTouchEvent -- Extends --> UniEvent\n style UniEvent color:#42b983\n click UniEvent \"https://doc.dcloud.net.cn/uni-app-x/component/common.html#unievent\"\n```","param":"\n### UniTouchEvent 的属性值 @unitouchevent-values\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| touches | Array&lt;**UniTouch**&gt; | 是 | 当前停留在屏幕中的触摸点信息的数组 |\n@| 名称 | 类型 | 必备 | 描述 |\n@| :- | :- | :- | :- |\n@| clientX | number | 是 | 相对于页面可显示区域左边的距离 |\n@| clientY | number | 是 | 相对于页面可显示区域顶部的距离 |\n@| identifier | number | 是 | 触摸点的标识符。这个值在这根手指所引发的所有事件中保持一致,直到手指抬起。 |\n@| pageX | number | 是 | 相对于屏幕左边的距离,包括滚动距离。 |\n@| pageY | number | 是 | 相对于屏幕顶部的距离,包括滚动距离。 |\n@| screenX | number | 是 | 相对于屏幕左边的距离,不包括滚动距离。 |\n@| screenY | number | 是 | 相对于屏幕顶部的距离,不包括滚动距离。 |\n@| force | number | 否 | 返回当前触摸点按下的压力大小 |\n| changedTouches | Array&lt;**UniTouch**&gt; | 是 | 当前变化的触摸点信息的数组 |\n@| 名称 | 类型 | 必备 | 描述 |\n@| :- | :- | :- | :- |\n@| clientX | number | 是 | 相对于页面可显示区域左边的距离 |\n@| clientY | number | 是 | 相对于页面可显示区域顶部的距离 |\n@| identifier | number | 是 | 触摸点的标识符。这个值在这根手指所引发的所有事件中保持一致,直到手指抬起。 |\n@| pageX | number | 是 | 相对于屏幕左边的距离,包括滚动距离。 |\n@| pageY | number | 是 | 相对于屏幕顶部的距离,包括滚动距离。 |\n@| screenX | number | 是 | 相对于屏幕左边的距离,不包括滚动距离。 |\n@| screenY | number | 是 | 相对于屏幕顶部的距离,不包括滚动距离。 |\n@| force | number | 否 | 返回当前触摸点按下的压力大小 |\n","compatibility":""},"UniTouch":{"name":"## UniTouch","description":"","extends":"","param":"\n### UniTouch 的属性值 @unitouch-values\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| clientX | number | 是 | 相对于页面可显示区域左边的距离 |\n| clientY | number | 是 | 相对于页面可显示区域顶部的距离 |\n| identifier | number | 是 | 触摸点的标识符。这个值在这根手指所引发的所有事件中保持一致,直到手指抬起。 |\n| pageX | number | 是 | 相对于屏幕左边的距离,包括滚动距离。 |\n| pageY | number | 是 | 相对于屏幕顶部的距离,包括滚动距离。 |\n| screenX | number | 是 | 相对于屏幕左边的距离,不包括滚动距离。 |\n| screenY | number | 是 | 相对于屏幕顶部的距离,不包括滚动距离。 |\n| force | number | 否 | 返回当前触摸点按下的压力大小 |\n","compatibility":""},"UniKeyEvent":{"name":"## UniKeyEvent","description":"","extends":"```mermaid\ngraph LR\n \nUniKeyEvent -- Extends --> UniEvent\n style UniEvent color:#42b983\n click UniEvent \"https://doc.dcloud.net.cn/uni-app-x/component/common.html#unievent\"\n```","param":"\n### UniKeyEvent 的属性值 @unikeyevent-values\n| 名称 | 类型 | 必备 |\n| :- | :- | :- |\n| keyCode | number | 是 |\n| keyType | string | 是 |\n","compatibility":""},"UniMouseEvent":{"name":"## UniMouseEvent","description":"","extends":"```mermaid\ngraph LR\n \nUniPointerEvent -- Extends --> UniEvent\n style UniEvent color:#42b983\n click UniEvent \"https://doc.dcloud.net.cn/uni-app-x/component/common.html#unievent\"\n```","param":"\n### UniMouseEvent 的属性值 @unimouseevent-values\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| clientX | number | 是 | 相对于页面可显示区域左边的距离 |\n| clientY | number | 是 | 相对于页面可显示区域顶部的距离 |\n| x | number | 是 | 相对于页面可显示区域左边的距离,同`clientX` |\n| y | number | 是 | 相对于页面可显示区域顶部的距离,同`clientY` |\n| pageX | number | 是 | 相对于屏幕左边的距离,包括滚动距离。 |\n| pageY | number | 是 | 相对于屏幕顶部的距离,包括滚动距离。 |\n| screenX | number | 是 | 相对于屏幕左边的距离,不包括滚动距离。 |\n| screenY | number | 是 | 相对于屏幕顶部的距离,不包括滚动距离。 |\n","compatibility":""},"UniCustomEvent":{"name":"## UniCustomEvent","description":"","extends":"```mermaid\ngraph LR\n \nUniCustomEvent -- Extends --> UniEvent\n style UniEvent color:#42b983\n click UniEvent \"https://doc.dcloud.net.cn/uni-app-x/component/common.html#unievent\"\n```","param":"\n### 构造函数\n| 名称 | 类型 | 必备 |\n| :- | :- | :- |\n| type | string | 是 |\n| detail | T | 是 |\n\n### 构造函数\n| 名称 | 类型 | 必备 |\n| :- | :- | :- |\n| type | string | 是 |\n| options | any | 是 |\n\n### UniCustomEvent 的属性值 @unicustomevent-values\n| 名称 | 类型 | 必备 |\n| :- | :- | :- |\n| detail | T | 是 |\n","compatibility":""},"UniPointerEvent":{"name":"## UniPointerEvent","description":"","extends":"```mermaid\ngraph LR\n \nUniPointerEvent -- Extends --> UniEvent\n style UniEvent color:#42b983\n click UniEvent \"https://doc.dcloud.net.cn/uni-app-x/component/common.html#unievent\"\n```","param":"\n### UniPointerEvent 的属性值 @unipointerevent-values\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| clientX | number | 是 | 相对于页面可显示区域左边的距离 |\n| clientY | number | 是 | 相对于页面可显示区域顶部的距离 |\n| x | number | 是 | 相对于页面可显示区域左边的距离,同`clientX` |\n| y | number | 是 | 相对于页面可显示区域顶部的距离,同`clientY` |\n| pageX | number | 是 | 相对于屏幕左边的距离,包括滚动距离。 |\n| pageY | number | 是 | 相对于屏幕顶部的距离,包括滚动距离。 |\n| screenX | number | 是 | 相对于屏幕左边的距离,不包括滚动距离。 |\n| screenY | number | 是 | 相对于屏幕顶部的距离,不包括滚动距离。 |\n","compatibility":""},"UniNativeViewEvent":{"name":"## UniNativeViewEvent","description":"native-view自定义事件","extends":"```mermaid\ngraph LR\n \nUniNativeViewEvent -- Extends --> UniCustomEvent\n style UniCustomEvent color:#42b983\n click UniCustomEvent \"https://doc.dcloud.net.cn/uni-app-x/component/common.html#unicustomevent\"\n```","param":"\n### 构造函数\n| 名称 | 类型 | 必备 |\n| :- | :- | :- |\n| type | string | 是 |\n| detail | any | 是 |\n\n### 构造函数\n| 名称 | 类型 | 必备 |\n| :- | :- | :- |\n| type | string | 是 |\n\n### UniNativeViewEvent 的属性值 @uninativeviewevent-values\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| type | string | 是 | 事件类型 |\n| detail | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 是 | |\n","compatibility":"### UniNativeViewEvent 兼容性 <Help /> \n | Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| 4.31 | 4.31 | 4.61 |"},"UniImageElement":{"name":"## UniImageElement","description":"image 组件的 DOM 元素对象。","extends":"```mermaid\ngraph LR\n \nUniImageElement -- Extends --> UniElement\n style UniElement color:#42b983\n click UniElement \"https://doc.dcloud.net.cn/uni-app-x/api/dom/unielement.html\"\n```","param":"\n### UniImageElement 的属性值 @uniimageelement-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| src | [string.ImageURIString](/uts/data-type.md#ide-string) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.25\",\"4.25\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 图片url |\n","compatibility":"### UniImageElement 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 4.11 | 4.25 | x |"},"UniInputElement":{"name":"## UniInputElement","description":"input 组件的 DOM 元素对象。","extends":"```mermaid\ngraph LR\n \nUniInputElement -- Extends --> UniElement\n style UniElement color:#42b983\n click UniElement \"https://doc.dcloud.net.cn/uni-app-x/api/dom/unielement.html\"\n```","param":"\n### UniInputElement 的属性值 @uniinputelement-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| name | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"4.0\",\"4.11\",\"4.25\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 表单的控件名称,作为键值对的一部分与表单(form组件)一同提交 |\n| type | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"4.0\",\"4.11\",\"4.25\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | input的类型 |\n| disabled | boolean | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"4.0\",\"4.11\",\"4.25\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 是否禁用 |\n| autofocus | boolean | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"4.0\",\"4.11\",\"4.25\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 自动获取焦点 |\n| value | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"4.0\",\"4.11\",\"4.25\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 输入框的初始内容 |\n","compatibility":"### UniInputElement 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 4.11 | x | 4.61 |"},"UniTextareaElement":{"name":"## UniTextareaElement","description":"textarea 组件的 DOM 元素对象。","extends":"```mermaid\ngraph LR\n \nUniTextareaElement -- Extends --> UniElement\n style UniElement color:#42b983\n click UniElement \"https://doc.dcloud.net.cn/uni-app-x/api/dom/unielement.html\"\n```","param":"\n### UniTextareaElement 的属性值 @unitextareaelement-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| name | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"4.0\",\"4.11\",\"4.25\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 表单的控件名称,作为键值对的一部分与表单(form组件)一同提交 |\n| type | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"4.0\",\"4.11\",\"4.25\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | input的类型 |\n| disabled | boolean | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"4.0\",\"4.11\",\"4.25\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 是否禁用 |\n| autofocus | boolean | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"}],\"rows\":[[\"x\",\"4.0\",\"4.11\",\"4.25\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 自动获取焦点 |\n| value | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"}],\"rows\":[[\"4.0\",\"4.11\",\"4.25\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 输入框的初始内容 |\n","compatibility":"### UniTextareaElement 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 4.11 | 4.25 | 4.61 |"},"UniTextElement":{"name":"## UniTextElement","description":"text 组件的 DOM 元素对象。","extends":"```mermaid\ngraph LR\n \nUniTextElement -- Extends --> UniElement\n style UniElement color:#42b983\n click UniElement \"https://doc.dcloud.net.cn/uni-app-x/api/dom/unielement.html\"\n```","param":"\n### UniTextElement 的属性值 @unitextelement-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| value | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.0\",\"4.11\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只读属性 text元素的文案内容 |\n","methods":{"setTextLayout":{"name":"#### setTextLayout(layout: UniTextLayout): void @settextlayout","originName":"setTextLayout","description":"设置文本内容","compatibility":"##### setTextLayout 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| layout | [UniTextLayout](#unitextlayout-values) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本对象 | \n\n##### UniTextLayout 的方法 @unitextlayout-values \n\n##### setText(text: string): void @settext\nsetText\n设置文本\n###### setText 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| text | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setColor(color: string): void @setcolor\nsetColor\n设置文本颜色\n###### setColor 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| color | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setFontFamily(family: string): void @setfontfamily\nsetFontFamily\n设置字体名称\n###### setFontFamily 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| family | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setFontSize(size: string): void @setfontsize\nsetFontSize\n设置字体大小\n###### setFontSize 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| size | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setFontStyle(style: string): void @setfontstyle\nsetFontStyle\n设置字体样式\n###### setFontStyle 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| style | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setFontWeight(weight: string): void @setfontweight\nsetFontWeight\n设置字体粗细\n###### setFontWeight 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| weight | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setLineHeight(height: string): void @setlineheight\nsetLineHeight\n设置行高\n###### setLineHeight 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| height | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setTextAlign(align: string): void @settextalign\nsetTextAlign\n设置文字水平对齐方式\n###### setTextAlign 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| align | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setTextOverflow(overflow: string): void @settextoverflow\nsetTextOverflow\n设置文字溢出裁剪方式\n###### setTextOverflow 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| overflow | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setTextShadow(shadow: string): void @settextshadow\nsetTextShadow\n设置文字阴影\n###### setTextShadow 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| shadow | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setTextDecorationLine(decorationLine: string): void @settextdecorationline\nsetTextDecorationLine\n设置文本修饰类型\n###### setTextDecorationLine 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| decorationLine | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setWhiteSpace(whiteSpace: string): void @setwhitespace\nsetWhiteSpace\n设置处理空白字符\n###### setWhiteSpace 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| whiteSpace | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### append(layout: UniTextLayout): void @append\nappend\n添加子文本对象\n###### append 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| layout | [UniTextLayout](#unitextlayout-values) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本对象 | \n\n\n\n##### measure(constraint: UniLayoutConstraintSize): UniLayoutSize @measure\nmeasure\n测量文本大小\n###### measure 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| constraint | **UniLayoutConstraintSize** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 布局约束大小 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| minWidth | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素最小宽度,逻辑像素值<br/>可选值,不设置则认为没有最小宽度 |\n@| maxWidth | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素最大宽度,逻辑像素值<br/>可选值,不设置则认为可以无限宽 |\n@| minHeight | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素最小高度,逻辑像素值<br/>可选值,不设置则认为没有最小高度 |\n@| maxHeight | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素最大高度,逻辑像素值<br/>可选值,不设置则认为可以无限高 | \n\n\n###### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| **UniLayoutSize** | 布局大小 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素宽度,逻辑像素值 |\n@| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素高度,逻辑像素值 | \n","fileFormats":"","returnValue":"","tutorial":""},"getContentSize":{"name":"#### getContentSize(): UniLayoutSize @getcontentsize","originName":"getContentSize","description":"获取内容宽高","compatibility":"##### getContentSize 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| **UniLayoutSize** | 布局大小 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素宽度,逻辑像素值 |\n@| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素高度,逻辑像素值 | \n","tutorial":""}},"compatibility":"### UniTextElement 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 4.11 | 4.25 | 4.61 |"},"UniTextLayout":{"name":"## UniTextLayout","description":"文本对象","extends":"","param":"","methods":{"setText":{"name":"#### setText(text: string): void @settext","originName":"setText","description":"设置文本","compatibility":"##### setText 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| text | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"setColor":{"name":"#### setColor(color: string): void @setcolor","originName":"setColor","description":"设置文本颜色","compatibility":"##### setColor 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| color | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"setFontFamily":{"name":"#### setFontFamily(family: string): void @setfontfamily","originName":"setFontFamily","description":"设置字体名称","compatibility":"##### setFontFamily 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| family | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"setFontSize":{"name":"#### setFontSize(size: string): void @setfontsize","originName":"setFontSize","description":"设置字体大小","compatibility":"##### setFontSize 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| size | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"setFontStyle":{"name":"#### setFontStyle(style: string): void @setfontstyle","originName":"setFontStyle","description":"设置字体样式","compatibility":"##### setFontStyle 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| style | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"setFontWeight":{"name":"#### setFontWeight(weight: string): void @setfontweight","originName":"setFontWeight","description":"设置字体粗细","compatibility":"##### setFontWeight 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| weight | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"setLineHeight":{"name":"#### setLineHeight(height: string): void @setlineheight","originName":"setLineHeight","description":"设置行高","compatibility":"##### setLineHeight 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| height | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"setTextAlign":{"name":"#### setTextAlign(align: string): void @settextalign","originName":"setTextAlign","description":"设置文字水平对齐方式","compatibility":"##### setTextAlign 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| align | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"setTextOverflow":{"name":"#### setTextOverflow(overflow: string): void @settextoverflow","originName":"setTextOverflow","description":"设置文字溢出裁剪方式","compatibility":"##### setTextOverflow 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| overflow | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"setTextShadow":{"name":"#### setTextShadow(shadow: string): void @settextshadow","originName":"setTextShadow","description":"设置文字阴影","compatibility":"##### setTextShadow 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| shadow | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"setTextDecorationLine":{"name":"#### setTextDecorationLine(decorationLine: string): void @settextdecorationline","originName":"setTextDecorationLine","description":"设置文本修饰类型","compatibility":"##### setTextDecorationLine 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| decorationLine | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"setWhiteSpace":{"name":"#### setWhiteSpace(whiteSpace: string): void @setwhitespace","originName":"setWhiteSpace","description":"设置处理空白字符","compatibility":"##### setWhiteSpace 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| whiteSpace | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"append":{"name":"#### append(layout: UniTextLayout): void @append","originName":"append","description":"添加子文本对象","compatibility":"##### append 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| layout | [UniTextLayout](#unitextlayout-values) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本对象 | \n\n##### UniTextLayout 的方法 @unitextlayout-values \n\n##### setText(text: string): void @settext\nsetText\n设置文本\n###### setText 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| text | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setColor(color: string): void @setcolor\nsetColor\n设置文本颜色\n###### setColor 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| color | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setFontFamily(family: string): void @setfontfamily\nsetFontFamily\n设置字体名称\n###### setFontFamily 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| family | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setFontSize(size: string): void @setfontsize\nsetFontSize\n设置字体大小\n###### setFontSize 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| size | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setFontStyle(style: string): void @setfontstyle\nsetFontStyle\n设置字体样式\n###### setFontStyle 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| style | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setFontWeight(weight: string): void @setfontweight\nsetFontWeight\n设置字体粗细\n###### setFontWeight 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| weight | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setLineHeight(height: string): void @setlineheight\nsetLineHeight\n设置行高\n###### setLineHeight 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| height | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setTextAlign(align: string): void @settextalign\nsetTextAlign\n设置文字水平对齐方式\n###### setTextAlign 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| align | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setTextOverflow(overflow: string): void @settextoverflow\nsetTextOverflow\n设置文字溢出裁剪方式\n###### setTextOverflow 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| overflow | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setTextShadow(shadow: string): void @settextshadow\nsetTextShadow\n设置文字阴影\n###### setTextShadow 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| shadow | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setTextDecorationLine(decorationLine: string): void @settextdecorationline\nsetTextDecorationLine\n设置文本修饰类型\n###### setTextDecorationLine 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| decorationLine | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### setWhiteSpace(whiteSpace: string): void @setwhitespace\nsetWhiteSpace\n设置处理空白字符\n###### setWhiteSpace 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| whiteSpace | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n\n\n\n##### append(layout: UniTextLayout): void @append\nappend\n添加子文本对象\n###### append 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| layout | [UniTextLayout](#unitextlayout-values) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本对象 | \n\n\n\n##### measure(constraint: UniLayoutConstraintSize): UniLayoutSize @measure\nmeasure\n测量文本大小\n###### measure 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| constraint | **UniLayoutConstraintSize** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 布局约束大小 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| minWidth | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素最小宽度,逻辑像素值<br/>可选值,不设置则认为没有最小宽度 |\n@| maxWidth | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素最大宽度,逻辑像素值<br/>可选值,不设置则认为可以无限宽 |\n@| minHeight | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素最小高度,逻辑像素值<br/>可选值,不设置则认为没有最小高度 |\n@| maxHeight | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素最大高度,逻辑像素值<br/>可选值,不设置则认为可以无限高 | \n\n\n###### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| **UniLayoutSize** | 布局大小 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素宽度,逻辑像素值 |\n@| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素高度,逻辑像素值 | \n","fileFormats":"","returnValue":"","tutorial":""},"measure":{"name":"#### measure(constraint: UniLayoutConstraintSize): UniLayoutSize @measure","originName":"measure","description":"测量文本大小","compatibility":"##### measure 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| x | x | 4.81 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| constraint | **UniLayoutConstraintSize** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 布局约束大小 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| minWidth | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素最小宽度,逻辑像素值<br/>可选值,不设置则认为没有最小宽度 |\n@| maxWidth | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素最大宽度,逻辑像素值<br/>可选值,不设置则认为可以无限宽 |\n@| minHeight | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素最小高度,逻辑像素值<br/>可选值,不设置则认为没有最小高度 |\n@| maxHeight | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素最大高度,逻辑像素值<br/>可选值,不设置则认为可以无限高 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| **UniLayoutSize** | 布局大小 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素宽度,逻辑像素值 |\n@| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素高度,逻辑像素值 | \n","tutorial":""}},"compatibility":"### UniTextLayout 兼容性 <Help /> \n | Web | 微信小程序 | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| x | x | x | x |"},"UniLayoutSize":{"name":"## UniLayoutSize","description":"布局大小","extends":"","param":"\n### UniLayoutSize 的属性值 @unilayoutsize-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素宽度,逻辑像素值 |\n| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android(VDOM)\"},{\"title\":\"Android(Vapor)\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.81\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 元素高度,逻辑像素值 |\n","compatibility":"### UniLayoutSize 兼容性 <Help /> \n | Web | 微信小程序 | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| x | x | x | x |"},"UniWebViewElement":{"name":"## UniWebViewElement","description":"web-view 组件的 DOM 元素对象。","extends":"```mermaid\ngraph LR\n \nUniWebViewElement -- Extends --> UniElement\n style UniElement color:#42b983\n click UniElement \"https://doc.dcloud.net.cn/uni-app-x/api/dom/unielement.html\"\n```","param":"","methods":{"back":{"name":"#### back(): void @back","originName":"back","description":"后退","compatibility":"##### back 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 4.11 | 4.25 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"forward":{"name":"#### forward(): void @forward","originName":"forward","description":"前进","compatibility":"##### forward 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 4.11 | 4.25 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"reload":{"name":"#### reload(): void @reload","originName":"reload","description":"重新加载","compatibility":"##### reload 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 4.11 | 4.25 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"stop":{"name":"#### stop(): void @stop","originName":"stop","description":"停止加载","compatibility":"##### stop 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 4.11 | 4.25 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"evalJS":{"name":"#### evalJS(js: string): void @evaljs","originName":"evalJS","description":"原生和WebView通信(执行JS脚本)","compatibility":"##### evalJS 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 |\n| :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 4.11 | 4.25 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| js | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"getContentHeight":{"name":"#### getContentHeight(): number @getcontentheight","originName":"getContentHeight","description":"获取webview内容高度","compatibility":"##### getContentHeight 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS |\n| :- | :- | :- | :- |\n| x | x | 4.63 | 4.63 |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| number |\n \n","tutorial":""},"loadData":{"name":"#### loadData(options: UniWebViewElementLoadDataOptions): void @loaddata","originName":"loadData","description":"加载页面内容","compatibility":"##### loadData 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS |\n| :- | :- | :- | :- |\n| x | x | 4.65 | 4.65 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| options | **UniWebViewElementLoadDataOptions** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.65\",\"4.65\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | web-view 组件加载数据参数。 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| data | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"4.65\",\"4.65\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 要加载的html字符串,注意:这里是编码过的字符串 |\n@| baseURL | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"4.65\",\"4.65\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面的基础URL, 可选 |\n@| mimeType | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"4.65\",\"4.65\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 加载的页面内容类型,默认值为\"text/html\",可选 |\n@| encoding | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"4.65\",\"4.65\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容的编码类型,默认值为\"utf-8\",可选 | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":"### UniWebViewElement 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | x | 4.0 | 4.11 | 4.25 | 4.61 |"},"UniWebViewElementLoadDataOptions":{"name":"## UniWebViewElementLoadDataOptions","description":"web-view 组件加载数据参数。","extends":"","param":"\n### UniWebViewElementLoadDataOptions 的属性值 @uniwebviewelementloaddataoptions-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| data | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"4.65\",\"4.65\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 要加载的html字符串,注意:这里是编码过的字符串 |\n| baseURL | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"4.65\",\"4.65\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面的基础URL, 可选 |\n| mimeType | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"4.65\",\"4.65\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 加载的页面内容类型,默认值为\"text/html\",可选 |\n| encoding | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"4.65\",\"4.65\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 页面内容的编码类型,默认值为\"utf-8\",可选 |\n","compatibility":"### UniWebViewElementLoadDataOptions 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| x | x | 4.65 | 4.65 | 4.61 |"},"UniVideoElement":{"name":"## UniVideoElement","description":"video元素对象","extends":"```mermaid\ngraph LR\n \nUniVideoElement -- Extends --> UniElement\n style UniElement color:#42b983\n click UniElement \"https://doc.dcloud.net.cn/uni-app-x/api/dom/unielement.html\"\n```","param":"","methods":{"play":{"name":"#### play(): void @play","originName":"play","description":"播放","compatibility":"##### play 兼容性 <Help /> \n| Web | 微信小程序 |\n| :- | :- |\n| 4.0 | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"pause":{"name":"#### pause(): void @pause","originName":"pause","description":"暂停","compatibility":"##### pause 兼容性 <Help /> \n| Web | 微信小程序 |\n| :- | :- |\n| 4.0 | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"seek":{"name":"#### seek(position: number): void @seek","originName":"seek","description":"跳转到指定位置","compatibility":"##### seek 兼容性 <Help /> \n| Web | 微信小程序 |\n| :- | :- |\n| 4.0 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| position | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 跳转到指定位置(秒) | \n","fileFormats":"","returnValue":"","tutorial":""},"stop":{"name":"#### stop(): void @stop","originName":"stop","description":"停止视频","compatibility":"##### stop 兼容性 <Help /> \n| Web | 微信小程序 |\n| :- | :- |\n| 4.0 | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"sendDanmu":{"name":"#### sendDanmu(danmu: Danmu): void @senddanmu","originName":"sendDanmu","description":"发送弹幕","compatibility":"##### sendDanmu 兼容性 <Help /> \n| Web | 微信小程序 |\n| :- | :- |\n| 4.0 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| danmu | **Danmu** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 弹幕数据 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| text | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 弹幕文字 |\n@| color | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 弹幕颜色 |\n@| time | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 显示时刻 | \n","fileFormats":"","returnValue":"","tutorial":""},"playbackRate":{"name":"#### playbackRate(rate: number): void @playbackrate","originName":"playbackRate","description":"设置倍速播放","compatibility":"##### playbackRate 兼容性 <Help /> \n| Web | 微信小程序 |\n| :- | :- |\n| 4.0 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| rate | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 支持倍率 0.5/0.8/1.0/1.25/1.5 | \n","fileFormats":"","returnValue":"","tutorial":""},"requestFullScreen":{"name":"#### requestFullScreen(direction?: RequestFullScreenOptions): void @requestfullscreen","originName":"requestFullScreen","description":"进入全屏","compatibility":"##### requestFullScreen 兼容性 <Help /> \n| Web | 微信小程序 |\n| :- | :- |\n| 4.0 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| direction | **RequestFullScreenOptions** | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 0\\|正常竖向, 90\\|屏幕逆时针90度, -90\\|屏幕顺时针90度 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| direction | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"3.9.0\",\"4.11\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | direction |\n@@| 合法值 | 兼容性 | 描述 |\n@@| :- | :-: | :- |\n@@| 0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 正常竖向 |\n@@| 90 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 屏幕逆时针90度 |\n@@| -90 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 屏幕顺时针90度 | \n","fileFormats":"","returnValue":"","tutorial":""},"exitFullScreen":{"name":"#### exitFullScreen(): void @exitfullscreen","originName":"exitFullScreen","description":"退出全屏","compatibility":"##### exitFullScreen 兼容性 <Help /> \n| Web | 微信小程序 |\n| :- | :- |\n| 4.0 | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":"### UniVideoElement 兼容性 <Help /> \n | Web | 微信小程序 |\n| :- | :- |\n| 4.0 | x |"},"Danmu":{"name":"## Danmu","description":"","extends":"","param":"\n### Danmu 的属性值 @danmu-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| text | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 弹幕文字 |\n| color | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 弹幕颜色 |\n| time | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 显示时刻 |\n","compatibility":""},"RequestFullScreenOptions":{"name":"## RequestFullScreenOptions","description":"","extends":"","param":"\n### RequestFullScreenOptions 的属性值 @requestfullscreenoptions-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| direction | number | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\",\"3.9.0\",\"4.11\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | direction |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| 0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 正常竖向 |\n@| 90 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 屏幕逆时针90度 |\n@| -90 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 屏幕顺时针90度 |\n","compatibility":""},"UniCanvasElement":{"name":"## UniCanvasElement","description":"canvas 组件的 DOM 元素对象。","extends":"```mermaid\ngraph LR\n \nUniCanvasElement -- Extends --> UniElement\n style UniElement color:#42b983\n click UniElement \"https://doc.dcloud.net.cn/uni-app-x/api/dom/unielement.html\"\n```","param":"\n### UniCanvasElement 的属性值 @unicanvaselement-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.21\",\"x\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | Canvas宽度(注意:App平台只读不支持设置) |\n| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.21\",\"x\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | Canvas高度(注意:App平台只读不支持设置) |\n","methods":{"getContext":{"name":"#### getContext(contentType: string): CanvasRenderingContext2D \\| null @getcontext","originName":"getContext","description":"返回 Canvas 的绘图上下文","compatibility":"##### getContext 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.21 | x | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| contentType | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| [CanvasRenderingContext2D](/api/canvasrenderingcontext2d.md) | 否 |\n \n","tutorial":""},"toBlob":{"name":"#### toBlob(callback: BlobCallback): void @toblob","originName":"toBlob","description":"创造 Blob 对象","compatibility":"##### toBlob 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.21 | x | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| callback | BlobCallback | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"toBlob_1":{"name":"#### toBlob(callback: BlobCallback, type: string): void @toblob","originName":"toBlob","description":"","compatibility":"","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| callback | BlobCallback | 是 |\n| type | string | 是 | \n","fileFormats":"","returnValue":"","tutorial":""},"toBlob_2":{"name":"#### toBlob(callback: BlobCallback, type: string, quality: number): void @toblob","originName":"toBlob","description":"","compatibility":"","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| callback | BlobCallback | 是 |\n| type | string | 是 |\n| quality | number | 是 | \n","fileFormats":"","returnValue":"","tutorial":""},"toDataURL":{"name":"#### toDataURL(type?: string, encoderOptions?: any): string @todataurl","originName":"toDataURL","description":"返回一个包含图片展示的 data URI (iOS平台不支持webp格式)\r\n如果画布的高度或宽度是 0,那么会返回字符串“data:,”。\r\n如果传入的类型非“image/png”,但是返回的值以“data:image/png”开头,那么该传入的类型是不支持的。","compatibility":"##### toDataURL 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.21 | x | 4.25 | 4.25 | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| type | string | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| encoderOptions | any | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"微信小程序\"}],\"rows\":[[\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| string |\n \n","tutorial":""}},"compatibility":"### UniCanvasElement 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.21 | x | 4.25 | 4.25 | 4.61 |"},"CanvasRenderingContext2D":{"name":"## CanvasRenderingContext2D","description":"canvas元素的绘图2D渲染上下文, 它用于绘制形状、文本、图像和其他对象","extends":"","param":"\n### CanvasRenderingContext2D 的属性值 @canvasrenderingcontext2d-values\n| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |\n| :- | :- | :- | :- | :-: | :- |\n| canvas | [UniCanvasElement](/api/dom/unicanvaselement.md) | 是 | | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 是对与给定上下文关联的HTMLCanvasElement对象的只读引用 |\n| direction | string | 是 | inherit | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 描述当前文本方向 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| ltr | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文字方向为从左到右 |\n@| rtl | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文字方向为从右到左 |\n@| inherit | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文字方向从相应的 \\<canvas> 元素或 Document 继承 |\n| fillStyle | [CanvasGradient](#canvasgradient-values) \\| CanvasPattern \\| [string.ColorString](/uts/data-type.md#ide-string) | 是 | #000 (黑色) | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置填充颜色 |\n| filter | string | 是 | none | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 提供模糊、灰度等过滤效果的属性。它类似于 CSS filter 属性,并且接受相同的函数 |\n| font | string | 是 | 10px sans-serif | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定绘制文字所使用的字体样式。使用和 CSS 字体描述符相同的字符串值。<br/>注意App平台只支持font-size、font-family、font-weight |\n| fontStretch | string | 是 | normal | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定绘制文本时字体如何被扩展或压缩。该属性对应于 CSS 中的 font-stretch 属性 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| ultra-condensed | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定比普通字体更紧凑的字体,对应百分比数值为50% |\n@| extra-condensed | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定比普通字体更紧凑的字体,对应百分比数值为62.5% |\n@| condensed | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定比普通字体更紧凑的字体,对应百分比数值为75% |\n@| semi-condensed | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定比普通字体更紧凑的字体,对应百分比数值为87.5% |\n@| normal | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 普通字体外观 |\n@| semi-expanded | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定比普通字体更扩展的字体,对应百分比数值为112.5% |\n@| expanded | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定比普通字体更扩展的字体,对应百分比数值为125% |\n@| extra-expanded | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定比普通字体更扩展的字体,对应百分比数值为150% |\n@| ultra-expanded | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定比普通字体更扩展的字体,对应百分比数值为200% |\n| globalAlpha | number | 是 | 1.0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 用来描述在 canvas 上绘图之前,设置图形和图片透明度的属性。数值的范围从 0.0(完全透明)到 1.0(完全不透明) |\n| globalCompositeOperation | string | 是 | source-over | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 在绘制新形状时应用的合成操作的类型,其中 type 是用于标识要使用的合成或混合模式操作的字符串 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| source-over | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 在现有画布上下文之上绘制新图形 |\n@| source-in | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 新图形只在新图形和目标画布重叠的地方绘制。其他的都是透明的 |\n@| source-out | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 在不与现有画布内容重叠的地方绘制新图形 |\n@| source-atop | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 新图形只在与现有画布内容重叠的地方绘制。 |\n@| destination-over | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 在现有的画布内容后面绘制新的图形。 |\n@| destination-atop | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 现有的画布只保留与新图形重叠的部分,新的图形是在画布内容后面绘制的。 |\n@| destination-in | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 现有的画布内容保持在新图形和现有画布内容重叠的位置。其他的都是透明的。 |\n@| destination-out | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 现有内容保持在新图形不重叠的地方。 |\n@| lighter | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 两个重叠图形的颜色是通过颜色值相加来确定的。 |\n@| copy | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 只显示新图形。 |\n@| xor | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 图像中,那些重叠和正常绘制之外的其他地方是透明的。 |\n@| multiply | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 将顶层像素与底层相应像素相乘,结果是一幅更黑暗的图片。 |\n@| screen | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 像素被倒转,相乘,再倒转,结果是一幅更明亮的图片。 |\n@| overlay | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | multiply 和 screen 的结合,原本暗的地方更暗,原本亮的地方更亮。 |\n@| darken | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 保留两个图层中最暗的像素 |\n@| lighten | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 保留两个图层中最亮的像素。 |\n@| color-dodge | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 将底层除以顶层的反置。 |\n@| color-burn | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 将反置的底层除以顶层,然后将结果反过来。 |\n@| hard-light | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | multiply 和 screen 的结合,类似于叠加,但上下图层互换了。 |\n@| soft-light | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 用顶层减去底层或者相反来得到一个正值。 |\n@| difference | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 一个柔和版本的 hard-light。纯黑或纯白不会导致纯黑或纯白。 |\n@| exclusion | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 和 difference 相似,但对比度较低。 |\n@| hue | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 保留了底层的亮度和色度,同时采用了顶层的色调。 |\n@| saturation | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 保留底层的亮度和色调,同时采用顶层的色度。 |\n@| color | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 保留了底层的亮度,同时采用了顶层的色调和色度。 |\n@| luminosity | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 保持底层的色调和色度,同时采用顶层的亮度。 |\n| imageSmoothingEnabled | boolean | 是 | true | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 用于设置是否对缩放后的图片进行平滑处理,true 表示进行平滑处理,false 表示不进行 |\n| imageSmoothingQuality | string | 是 | low | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 用于设置图像平滑度,要使此属性生效,imageSmoothingEnabled 属性必须为 true,可选值:`low`低质量; `medium`中等质量;`high`高质量。 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| low | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 低质量。 |\n@| medium | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 中等质量。 |\n@| high | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 高质量。 |\n| letterSpacing | string | 是 | 0px | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 用于指定绘制文本时字母之间的间距。这对应于 CSS 中的 letter-spacing 属性 |\n| lineCap | string | 是 | butt | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定如何绘制每一条线条末端的属性,可选值:`butt`线段末端以方形结束;`round`线段末端以圆形结束;`square`线段末端以方形结束,但是会增加一个一半宽度的矩形区域。 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| butt | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | `butt`线段末端以方形结束; |\n@| round | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | `round`线段末端以圆形结束; |\n@| square | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | `square`线段末端以方形结束,但是会增加一个一半宽度的矩形区域。 |\n| lineDashOffset | number | 是 | 0.0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置虚线偏移量 |\n| lineJoin | string | 是 | miter | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置 2 个长度不为 0 的线条相连部分如何连接在一起的属性,可选值:`bevel`斜角;`round`圆角;`miter`尖角。 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| round | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 通过填充一个额外的,圆心在相连部分末端的扇形,绘制拐角的形状。圆角的半径是线段的宽度。 |\n@| bevel | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 在相连部分的末端填充一个额外的以三角形为底的区域,每个部分都有各自独立的矩形拐角。 |\n@| miter | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 通过延伸相连部分的外边缘,使其相交于一点,形成一个额外的菱形区域。这个设置受到 miterLimit 属性的影响。默认值。 |\n| lineWidth | number | 是 | 1.0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置线条的宽度, 零、负数、Infinity 和 NaN 值将被忽略 |\n| miterLimit | number | 是 | 10.0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置斜接面限制比例的属性。当获取属性值时,会返回当前的值。当给属性赋值时,0、负数、 Infinity 和 NaN 都会被忽略;除此之外都会被赋予一个新值。 |\n| shadowBlur | number | 是 | 0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 用于描述模糊效果程度,其中 0 表示没有模糊,数字越大表示模糊程度越高。这个值不对应于像素数量,并且不受当前变换矩阵的影响。负数、Infinity 和 NaN 将被忽略 |\n| shadowColor | string | 是 | fully-transparent black | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 描述阴影颜色,只有当 shadowColor 属性设置为非透明值时,阴影才会被绘制。其中的 shadowBlur、shadowOffsetX 或 shadowOffsetY 属性中至少有一个必须是非零的。 |\n| shadowOffsetX | number | 是 | 0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定阴影在水平方向上的偏移距离。正值向右偏移,负值向左偏移。默认值为 0(无水平偏移)。Infinity 和 NaN 值将被忽略 |\n| shadowOffsetY | number | 是 | 0 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 指定阴影在垂直方向上的偏移距离。正值向右偏移,负值向左偏移。默认值为 0(无水平偏移)。Infinity 和 NaN 值将被忽略 |\n| strokeStyle | [CanvasGradient](#canvasgradient-values) \\| CanvasPattern \\| [string.ColorString](/uts/data-type.md#ide-string) | 是 | #000 (黑色) | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置边框的颜色 |\n| textAlign | string | 是 | left | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 设置文本的对齐方式,可取值:`left`左对齐;`center`居中对齐;`right`右对齐。 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| left | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本左对齐。 |\n@| right | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本右对齐。 |\n@| center | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本居中对齐。 |\n@| start | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本对齐界线开始的地方(左对齐指本地从左向右,右对齐指本地从右向左)。 |\n@| end | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本对齐界线结束的地方(左对齐指本地从左向右,右对齐指本地从右向左)。 |\n| textBaseline | string | 是 | alphabetic | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 描述绘制文本时,当前文本基线的属性 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| top | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本基线在文本块的顶部。 |\n@| hanging | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本基线是悬挂基线。 |\n@| middle | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本基线在文本块的中间。 |\n@| alphabetic | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本基线是标准的字母基线。默认值。 |\n@| ideographic | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文字基线是表意字基线;如果字符本身超出了 alphabetic 基线,那么 ideograhpic 基线位置在字符本身的底部。(用于中文、日文和韩文。) |\n@| bottom | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本基线在文本块的底部。与 ideographic 基线的区别在于 ideographic 基线不需要考虑下行字母。 |\n| textRendering | string | 是 | auto | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 用于在渲染文本时向渲染引擎提供应该如何优化的相关信息 |\n@| 合法值 | 兼容性 | 描述 |\n@| :- | :-: | :- |\n@| auto | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 浏览器在绘制文本时根据情况对速度、易读性和几何精确性进行优化。 |\n@| optimizeSpeed | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 浏览器在绘制文本时优先考虑渲染速度,而不是易读性和几何精确性。它禁用字距调整和连字。 |\n@| optimizeLegibility | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 浏览器在绘制文本时优先考虑易读性,而不是渲染速度和几何精确性。这启用了字距调整和可选连字。 |\n@| geometricPrecision | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 浏览器在绘制文本时优先考虑几何精确性,而不是渲染速度和易读性。字体的某些方面(例如字距调整)不会线性缩放。对于大的缩放比例,你可能会看到不太美观的文本渲染,但大小是你所期望的(不会被向上或向下舍入到底层操作系统支持的最接近的字体大小)。 |\n| wordSpacing | string | 是 | 0px | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 用于指定绘制文本时单词之间的间距, 如果设置为无效或无法解析的值,则属性值将保持不变 |\n","methods":{"arc":{"name":"#### arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void @arc","originName":"arc","description":"绘制一段弧线","compatibility":"##### arc 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| x | number | 是 | | 圆弧中心(圆心)的 x 轴坐标 |\n| y | number | 是 | | 圆弧中心(圆心)的 y 轴坐标 |\n| radius | number | 是 | | 圆弧的半径 |\n| startAngle | number | 是 | | 圆弧的起始点,x 轴方向开始计算,单位为弧度 |\n| endAngle | number | 是 | | 圆弧的终点,单位为弧度 |\n| anticlockwise | boolean | 否 | true | 圆弧绘制方向,true:逆时针绘制,false:顺时针绘制。 | \n","fileFormats":"","returnValue":"","tutorial":""},"arcTo":{"name":"#### arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void @arcto","originName":"arcTo","description":"根据控制点和半径绘制圆弧路径,使用当前的描点 (前一个 moveTo 或 lineTo 等函数的止点)。根据当前描点与给定的控制点 1 连接的直线,和控制点 1 与控制点 2 连接的直线,作为使用指定半径的圆的切线,画出两条切线之间的弧线路径","compatibility":"##### arcTo 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x1 | number | 是 | 第一个控制点的 x 轴坐标 |\n| y1 | number | 是 | 第一个控制点的 y 轴坐标 |\n| x2 | number | 是 | 第二个控制点的 x 轴坐标 |\n| y2 | number | 是 | 第二个控制点的 y 轴坐标 |\n| radius | number | 是 | 圆弧的半径 | \n","fileFormats":"","returnValue":"","tutorial":""},"beginPath":{"name":"#### beginPath(): void @beginpath","originName":"beginPath","description":"开始创建一个路径。需要调用 fill 或者 stroke 才会使用路径进行填充或描边","compatibility":"##### beginPath 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"bezierCurveTo":{"name":"#### bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void @beziercurveto","originName":"bezierCurveTo","description":"绘制三次贝赛尔曲线路径","compatibility":"##### bezierCurveTo 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| cp1x | number | 是 | 第一个控制点的 x 轴坐标 |\n| cp1y | number | 是 | 第一个控制点的 y 轴坐标 |\n| cp2x | number | 是 | 第二个控制点的 x 轴坐标 |\n| cp2y | number | 是 | 第二个控制点的 y 轴坐标 |\n| x | number | 是 | 结束点的 x 轴坐标 |\n| y | number | 是 | 结束点的 y 轴坐标 | \n","fileFormats":"","returnValue":"","tutorial":""},"clearRect":{"name":"#### clearRect(x: number, y: number, width: number, height: number): void @clearrect","originName":"clearRect","description":"清除画布上在该矩形区域内的内容","compatibility":"##### clearRect 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x | number | 是 | 矩形起点的 x 轴坐标 |\n| y | number | 是 | 矩形起点的 y 轴坐标 |\n| width | number | 是 | 矩形的宽度 |\n| height | number | 是 | 矩形的高度 | \n","fileFormats":"","returnValue":"","tutorial":""},"clip":{"name":"#### clip(): void @clip","originName":"clip","description":"将当前创建的路径设置为当前剪切路径","compatibility":"##### clip 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"clip_1":{"name":"#### clip(path: Path2D): void @clip","originName":"clip","description":"将当前创建的路径设置为当前剪切路径","compatibility":"##### clip 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | x | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| path | [Path2D](/api/path2d.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | Path2D用来声明路径,用来在canvas中根据需要创建可以保留并重用的路径, 此路径会被CanvasRenderingContext2D对象使用 | \n","fileFormats":"","returnValue":"","tutorial":""},"clip_2":{"name":"#### clip(fillRule: string): void @clip","originName":"clip","description":"将当前创建的路径设置为当前剪切路径","compatibility":"##### clip 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| fillRule | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"clip_3":{"name":"#### clip(path: Path2D, fillRule: string): void @clip","originName":"clip","description":"将当前创建的路径设置为当前剪切路径","compatibility":"##### clip 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| path | [Path2D](/api/path2d.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | Path2D用来声明路径,用来在canvas中根据需要创建可以保留并重用的路径, 此路径会被CanvasRenderingContext2D对象使用 |\n| fillRule | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | | \n","fileFormats":"","returnValue":"","tutorial":""},"closePath":{"name":"#### closePath(): void @closepath","originName":"closePath","description":"关闭一个路径","compatibility":"##### closePath 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"createImageData":{"name":"#### createImageData(width: number, height: number): void @createimagedata","originName":"createImageData","description":"创建一个新的、空白的、指定大小的 ImageData 对象。所有的像素在新对象中都是透明的黑色","compatibility":"##### createImageData 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"createPattern":{"name":"#### createPattern(image: Image, repetition?: string): CanvasPattern \\| null @createpattern","originName":"createPattern","description":"对指定的图像创建模式的方法,可在指定的方向上重复元图像","compatibility":"##### createPattern 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| image | [Image](/api/image.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 重复的图像源,支持代码包路径和本地临时路径 (本地路径) |\n| repetition | string | 否 | | 如何重复图像 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| CanvasPattern | 否 |\n \n","tutorial":""},"createLinearGradient":{"name":"#### createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient @createlineargradient","originName":"createLinearGradient","description":"创建一个线性的渐变颜色。返回的CanvasGradient对象需要使用 CanvasGradient.addColorStop() 来指定渐变点,至少要两个","compatibility":"##### createLinearGradient 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x0 | number | 是 | 起点的 x 坐标 |\n| y0 | number | 是 | 起点的 y 坐标 |\n| x1 | number | 是 | 终点的 x 坐标 |\n| y1 | number | 是 | 终点的 y 坐标 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| [CanvasGradient](#canvasgradient-values) | 表示描述渐变的不透明对象。该接口通过 CanvasRenderingContext2D.createLinearGradient()、<br/>CanvasRenderingContext2D.createConicGradient()<br/>或 CanvasRenderingContext2D.createRadialGradient() 方法返回 |\n\n###### CanvasGradient 的方法 @canvasgradient-values \n\n###### addColorStop(stop: number, color: string): void @addcolorstop\naddColorStop\n添加颜色的渐变点。小于最小 stop 的部分会按最小 stop 的 color 来渲染,大于最大 stop 的部分会按最大 stop 的 color 来渲染, 最大支持5个分段\n###### addColorStop 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| stop | number | 是 | 表示渐变中开始与结束之间的位置,范围 0-1 |\n| color | string | 是 | 渐变点的颜色 | \n\n\n \n","tutorial":""},"createRadialGradient":{"name":"#### createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r01: number): CanvasGradient @createradialgradient","originName":"createRadialGradient","description":"根据参数确定两个圆的坐标,绘制放射性渐变。注意App平台和Web平台绘制效果有差异","compatibility":"##### createRadialGradient 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x0 | number | 是 | 开始圆形的 x 轴坐标 |\n| y0 | number | 是 | 开始圆形的 y 轴坐标 |\n| r0 | number | 是 | 开始圆形的半径 |\n| x1 | number | 是 | 结束圆形的 x 轴坐标 |\n| y1 | number | 是 | 结束圆形的 y 轴坐标 |\n| r01 | number | 是 | 结束圆形的半径 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| [CanvasGradient](#canvasgradient-values) | 表示描述渐变的不透明对象。该接口通过 CanvasRenderingContext2D.createLinearGradient()、<br/>CanvasRenderingContext2D.createConicGradient()<br/>或 CanvasRenderingContext2D.createRadialGradient() 方法返回 |\n\n###### CanvasGradient 的方法 @canvasgradient-values \n\n###### addColorStop(stop: number, color: string): void @addcolorstop\naddColorStop\n添加颜色的渐变点。小于最小 stop 的部分会按最小 stop 的 color 来渲染,大于最大 stop 的部分会按最大 stop 的 color 来渲染, 最大支持5个分段\n###### addColorStop 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n\n##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| stop | number | 是 | 表示渐变中开始与结束之间的位置,范围 0-1 |\n| color | string | 是 | 渐变点的颜色 | \n\n\n \n","tutorial":""},"draw":{"name":"#### draw(): void @draw","originName":"draw","description":"将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas 中, 该操作为可选非web标准,canvas组件会自动选择合适时机进行绘制","compatibility":"##### draw 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"drawImage":{"name":"#### drawImage(imageResource: Image, dx: number, dy: number): void @drawimage","originName":"drawImage","description":"绘制图像到画布","compatibility":"##### drawImage 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| imageResource | [Image](/api/image.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 所要绘制的图片资源 |\n| dx | number | 是 | | imageResource的左上角在目标 canvas 上 x 轴的位置 |\n| dy | number | 是 | | imageResource的左上角在目标 canvas 上 y 轴的位置 | \n","fileFormats":"","returnValue":"","tutorial":""},"drawImage_1":{"name":"#### drawImage(imageResource: Image, dx: number, dy: number, dWidth: number, dHeight: number): void @drawimage","originName":"drawImage","description":"绘制图像到画布","compatibility":"##### drawImage 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| imageResource | [Image](/api/image.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 所要绘制的图片资源 |\n| dx | number | 是 | | imageResource的左上角在目标 canvas 上 x 轴的位置 |\n| dy | number | 是 | | imageResource的左上角在目标 canvas 上 y 轴的位置 |\n| dWidth | number | 是 | | 在目标画布上绘制imageResource的宽度,允许对绘制的imageResource进行缩放 |\n| dHeight | number | 是 | | 在目标画布上绘制imageResource的高度,允许对绘制的imageResource进行缩放 | \n","fileFormats":"","returnValue":"","tutorial":""},"drawImage_2":{"name":"#### drawImage(imageResource: Image, sx: number, sy: number, sWidth: number, sHeight: number, dx: number, dy: number, dWidth: number, dHeight: number): void @drawimage","originName":"drawImage","description":"绘制图像到画布","compatibility":"##### drawImage 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| imageResource | [Image](/api/image.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 所要绘制的图片资源 |\n| sx | number | 是 | | 需要绘制到画布中的,imageResource的矩形(裁剪)选择框的左上角 x 坐标 |\n| sy | number | 是 | | 需要绘制到画布中的,imageResource的矩形(裁剪)选择框的左上角 y 坐标 |\n| sWidth | number | 是 | | 需要绘制到画布中的,imageResource的矩形(裁剪)选择框的宽度 |\n| sHeight | number | 是 | | 需要绘制到画布中的,imageResource的矩形(裁剪)选择框的高度 |\n| dx | number | 是 | | imageResource的左上角在目标 canvas 上 x 轴的位置 |\n| dy | number | 是 | | imageResource的左上角在目标 canvas 上 y 轴的位置 |\n| dWidth | number | 是 | | 在目标画布上绘制imageResource的宽度,允许对绘制的imageResource进行缩放 |\n| dHeight | number | 是 | | 在目标画布上绘制imageResource的高度,允许对绘制的imageResource进行缩放 | \n","fileFormats":"","returnValue":"","tutorial":""},"ellipse":{"name":"#### ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise: boolean): void @ellipse","originName":"ellipse","description":"添加椭圆路径。椭圆的圆心在(x,y)位置,半径分别是radiusX 和 radiusY,按照anticlockwise(默认顺时针)指定的方向,从 startAngle 开始绘制,到 endAngle 结束","compatibility":"##### ellipse 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆圆心的 x 轴(水平)坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆圆心的 y 轴(垂直)坐标 |\n| radiusX | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆长轴的半径。必须为非负数 |\n| radiusY | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆短轴的半径。必须为非负数。 |\n| rotation | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆的旋转角度,以弧度表示。 |\n| startAngle | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆弧的起始偏心角,从正 x 轴沿顺时针测量,用弧度表示。 |\n| endAngle | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆弧的结束偏心角,从正 x 轴沿顺时针测量,用弧度表示。 |\n| anticlockwise | boolean | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 一个可选的布尔值,如果为 true,则逆时针绘制椭圆弧。默认值为 false(顺时针)。 | \n","fileFormats":"","returnValue":"","tutorial":""},"fill":{"name":"#### fill(): void @fill","originName":"fill","description":"对当前路径中的内容进行填充","compatibility":"##### fill 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"fill_1":{"name":"#### fill(fillRule: \"nonzero\" \\| \"evenodd\"): void @fill","originName":"fill","description":"对当前路径中的内容进行填充","compatibility":"##### fill 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| fillRule | string | 是 | 填充当前或已存在的路径的方法。采取非零环绕(nonzero)或者奇偶环绕(evenodd)规则 |\n@| 合法值 |\n@| :- |\n@| nonzero |\n@| evenodd | \n","fileFormats":"","returnValue":"","tutorial":""},"fill_2":{"name":"#### fill(path: Path2D): void @fill","originName":"fill","description":"对指定路径中的内容进行填充","compatibility":"##### fill 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| path | [Path2D](/api/path2d.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 填充路径 | \n","fileFormats":"","returnValue":"","tutorial":""},"fill_3":{"name":"#### fill(path: Path2D, fillRule: \"nonzero\" \\| \"evenodd\"): void @fill","originName":"fill","description":"对指定路径中的内容进行填充","compatibility":"##### fill 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| path | [Path2D](/api/path2d.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 填充路径 |\n| fillRule | string | 是 | | 填充当前或已存在的路径的方法。采取非零环绕(nonzero)或者奇偶环绕(evenodd)规则 |\n@| 合法值 |\n@| :- |\n@| nonzero |\n@| evenodd | \n","fileFormats":"","returnValue":"","tutorial":""},"fillRect":{"name":"#### fillRect(x: number, y: number, width: number, height: number): void @fillrect","originName":"fillRect","description":"填充一个矩形。用 setFillStyle 设置矩形的填充色,如果没设置默认是黑色","compatibility":"##### fillRect 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x | number | 是 | 矩形起点的 x 轴坐标 |\n| y | number | 是 | 矩形起点的 y 轴坐标 |\n| width | number | 是 | 矩形的宽度 |\n| height | number | 是 | 矩形的高度 | \n","fileFormats":"","returnValue":"","tutorial":""},"fillText":{"name":"#### fillText(text: string, x: number, y: number, maxWidth?: number): void @filltext","originName":"fillText","description":"在画布上绘制文本","compatibility":"##### fillText 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| text | string | 是 | 要渲染的文本字符串 |\n| x | number | 是 | 开始绘制文本的点的 x 轴坐标 |\n| y | number | 是 | 开始绘制文本的点的 y 轴坐标 |\n| maxWidth | number | 否 | 需要绘制的最大宽度 | \n","fileFormats":"","returnValue":"","tutorial":""},"getImageData":{"name":"#### getImageData(sx: number, sy: number, sw: number, sh: number): ImageData @getimagedata","originName":"getImageData","description":"返回一个ImageData对象,用来描述 canvas 区域隐含的像素数据,这个区域通过矩形表示,起始点为*(sx, sy)、宽为sw、高为sh。","compatibility":"##### getImageData 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| sx | number | 是 | 将要被提取的图像数据矩形区域的左上角 x 坐标 |\n| sy | number | 是 | 将要被提取的图像数据矩形区域的左上角 y 坐标 |\n| sw | number | 是 | 将要被提取的图像数据矩形区域的宽度 |\n| sh | number | 是 | 将要被提取的图像数据矩形区域的高度 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| **ImageData** | 描述canvas元素的一个隐含像素数据的区域,注意:App平台ImageData只支持context接口获取不支持通过new ImageData方式创建 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| data | [Uint8ClampedArray](/uts/buildin-object-api/uint8clampedarray.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 一维数组,包含以 RGBA 顺序的数据,数据使用 0 至 255(包含)的整数表示 |\n@| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 使用像素描述 ImageData 的实际宽度 |\n@| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 使用像素描述 ImageData 的实际高度 | \n","tutorial":""},"isContextLost":{"name":"#### isContextLost(): Boolean @iscontextlost","originName":"isContextLost","description":"返回一个Boolean 标记上下文是否已经丢失","compatibility":"##### isContextLost 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| Boolean |\n \n","tutorial":""},"isPointInPath":{"name":"#### isPointInPath(x: number, y: number): boolean @ispointinpath","originName":"isPointInPath","description":"判断在当前路径中是否包含检测点","compatibility":"##### isPointInPath 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 检测点的 X 坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 检测点的 Y 坐标 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| boolean |\n \n","tutorial":""},"isPointInPath_1":{"name":"#### isPointInPath(x: number, y: number, fillRule: string): boolean @ispointinpath","originName":"isPointInPath","description":"判断在当前路径中是否包含检测点","compatibility":"##### isPointInPath 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 检测点的 X 坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 检测点的 Y 坐标 |\n| fillRule | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 用来决定点在路径内还是在路径外的算法 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| boolean |\n \n","tutorial":""},"isPointInPath_2":{"name":"#### isPointInPath(path: Path2D, x: number, y: number): boolean @ispointinpath","originName":"isPointInPath","description":"判断在当前路径中是否包含检测点","compatibility":"##### isPointInPath 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| path | [Path2D](/api/path2d.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | Path2D应用的路径 |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 检测点的 X 坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 检测点的 Y 坐标 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| boolean |\n \n","tutorial":""},"isPointInPath_3":{"name":"#### isPointInPath(path: Path2D, x: number, y: number, fillRule: string): boolean @ispointinpath","originName":"isPointInPath","description":"判断在当前路径中是否包含检测点","compatibility":"##### isPointInPath 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| path | [Path2D](/api/path2d.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | Path2D应用的路径 |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 检测点的 X 坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 检测点的 Y 坐标 |\n| fillRule | string | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 用来决定点在路径内还是在路径外的算法 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| boolean |\n \n","tutorial":""},"isPointInStroke":{"name":"#### isPointInStroke(x: number, y: number): boolean @ispointinstroke","originName":"isPointInStroke","description":"检测某点是否在路径的描边线","compatibility":"##### isPointInStroke 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 检测点的 X 坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 检测点的 Y 坐标 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| boolean |\n \n","tutorial":""},"isPointInStroke_1":{"name":"#### isPointInStroke(path: Path2D, x: number, y: number): boolean @ispointinstroke","originName":"isPointInStroke","description":"检测某点是否在路径的描边线","compatibility":"##### isPointInStroke 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| path | [Path2D](/api/path2d.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | Path2D应用的路径 |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 检测点的 X 坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 检测点的 Y 坐标 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| boolean |\n \n","tutorial":""},"getLineDash":{"name":"#### getLineDash(): Array\\<number> @getlinedash","originName":"getLineDash","description":"在填充线时使用虚线模式, 它使用一组值来指定描述模式的线和间隙的交替长度。注意App平台和Web平台绘制效果有差异","compatibility":"##### getLineDash 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| Array&lt;number&gt; |\n \n","tutorial":""},"lineTo":{"name":"#### lineTo(x: number, y: number): void @lineto","originName":"lineTo","description":"增加一个新点,然后创建一条从上次指定点到目标点的线。用 stroke 方法来画线条","compatibility":"##### lineTo 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x | number | 是 | 目标位置的 x 坐标 |\n| y | number | 是 | 目标位置的 y 坐标 | \n","fileFormats":"","returnValue":"","tutorial":""},"measureText":{"name":"#### measureText(text: string): TextMetrics @measuretext","originName":"measureText","description":"测量文本尺寸信息。目前仅返回文本宽度","compatibility":"##### measureText 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| text | string | 是 | 要渲测量的文本字符串 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 描述 |\n| :- | :- |\n| **TextMetrics** | 表示文本的尺寸,通过 CanvasRenderingContext2D.measureText() 方法创建 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本的宽度 | \n","tutorial":""},"moveTo":{"name":"#### moveTo(x: number, y: number): void @moveto","originName":"moveTo","description":"把路径移动到画布中的指定点","compatibility":"##### moveTo 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x | number | 是 | 目标位置的 x 坐标 |\n| y | number | 是 | 目标位置的 y 坐标 | \n","fileFormats":"","returnValue":"","tutorial":""},"putImageData":{"name":"#### putImageData(imageData: ImageData, x: number, y: number): void @putimagedata","originName":"putImageData","description":"将数据从已有的 ImageData 对象绘制到位图的方法。如果提供了一个绘制过的矩形,则只绘制该矩形的像素。此方法不受画布转换矩阵的影响","compatibility":"##### putImageData 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| imageData | **ImageData** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 包含像素值的数组对象 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| data | [Uint8ClampedArray](/uts/buildin-object-api/uint8clampedarray.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 一维数组,包含以 RGBA 顺序的数据,数据使用 0 至 255(包含)的整数表示 |\n@| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 使用像素描述 ImageData 的实际宽度 |\n@| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 使用像素描述 ImageData 的实际高度 |\n| x | number | 是 | | 源图像数据在目标画布中的位置偏移量(x 轴方向的偏移量) |\n| y | number | 是 | | 源图像数据在目标画布中的位置偏移量(y 轴方向的偏移量) | \n","fileFormats":"","returnValue":"","tutorial":""},"putImageData_1":{"name":"#### putImageData(imageData: ImageData, x: number, y: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void @putimagedata","originName":"putImageData","description":"将数据从已有的 ImageData 对象绘制到位图的方法。如果提供了一个绘制过的矩形,则只绘制该矩形的像素。此方法不受画布转换矩阵的影响","compatibility":"##### putImageData 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| imageData | **ImageData** | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 包含像素值的数组对象 |\n@| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n@| :- | :- | :- | :-: | :- |\n@| data | [Uint8ClampedArray](/uts/buildin-object-api/uint8clampedarray.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 一维数组,包含以 RGBA 顺序的数据,数据使用 0 至 255(包含)的整数表示 |\n@| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 使用像素描述 ImageData 的实际宽度 |\n@| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 使用像素描述 ImageData 的实际高度 |\n| x | number | 是 | | 源图像数据在目标画布中的位置偏移量(x 轴方向的偏移量) |\n| y | number | 是 | | 源图像数据在目标画布中的位置偏移量(y 轴方向的偏移量) |\n| dirtyX | number | 是 | | 在源图像数据中,矩形区域左上角的位置。默认是整个图像数据的左上角(x 坐标) |\n| dirtyY | number | 是 | | 在源图像数据中,矩形区域左上角的位置。默认是整个图像数据的左上角(y 坐标) |\n| dirtyWidth | number | 是 | | 在源图像数据中,矩形区域的宽度。默认是图像数据的宽度) |\n| dirtyHeight | number | 是 | | 在源图像数据中,矩形区域的高度。默认是图像数据的高度 | \n","fileFormats":"","returnValue":"","tutorial":""},"quadraticCurveTo":{"name":"#### quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void @quadraticcurveto","originName":"quadraticCurveTo","description":"创建二次贝塞尔曲线路径","compatibility":"##### quadraticCurveTo 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| cpx | number | 是 | 贝塞尔控制点的 x 坐标 |\n| cpy | number | 是 | 贝塞尔控制点的 y 坐标 |\n| x | number | 是 | 结束点的 x 坐标 |\n| y | number | 是 | 结束点的 y 坐标 | \n","fileFormats":"","returnValue":"","tutorial":""},"rect":{"name":"#### rect(x: number, y: number, width: number, height: number): void @rect","originName":"rect","description":"创建一个矩形路径","compatibility":"##### rect 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x | number | 是 | 矩形路径起点的 x 轴坐标 |\n| y | number | 是 | 矩形路径起点的 y 轴坐标 |\n| width | number | 是 | 矩形路径的宽度 |\n| height | number | 是 | 矩形路径的高度 | \n","fileFormats":"","returnValue":"","tutorial":""},"resetTransform":{"name":"#### resetTransform(): void @resettransform","originName":"resetTransform","description":"使用单位矩阵重新设置当前变换","compatibility":"##### resetTransform 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"restore":{"name":"#### restore(): void @restore","originName":"restore","description":"恢复之前保存的绘图上下文","compatibility":"##### restore 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"rotate":{"name":"#### rotate(rotate: number): void @rotate","originName":"rotate","description":"以原点为中心顺时针旋转当前坐标轴","compatibility":"##### rotate 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| rotate | number | 是 | ,以弧度计 degrees * Math.PI/180;degrees 范围为 0-360 | \n","fileFormats":"","returnValue":"","tutorial":""},"roundRect":{"name":"#### roundRect(x: number, y: number, width: number, height: number, radii: any): void @roundrect","originName":"roundRect","description":"在当前路径中添加一个圆角矩形","compatibility":"##### roundRect 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | x | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形起点的 x 轴坐标,以像素为单位 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形起点的 y 轴坐标,以像素为单位 |\n| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形的宽度。正值向右,负值向左 |\n| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 矩形的高度。正值向下,负值向上 |\n| radii | any | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 其数量和顺序与 width 和 height 为正值时的 border-radius CSS 属性相同 | \n","fileFormats":"","returnValue":"","tutorial":""},"save":{"name":"#### save(): void @save","originName":"save","description":"保存绘图上下文","compatibility":"##### save 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"scale":{"name":"#### scale(x: number, y: number): void @scale","originName":"scale","description":"缩放变换","compatibility":"##### scale 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| x | number | 是 |\n| y | number | 是 | \n","fileFormats":"","returnValue":"","tutorial":""},"setLineDash":{"name":"#### setLineDash(segments: Array\\<number>): void @setlinedash","originName":"setLineDash","description":"在填充线时使用虚线模式, 它使用一组值来指定描述模式的线和间隙的交替长度。","compatibility":"##### setLineDash 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| segments | Array&lt;number&gt; | 是 | \\<number>一组描述交替绘制线段和间距(坐标空间单位)长度的数字 | \n","fileFormats":"","returnValue":"","tutorial":""},"setTransform":{"name":"#### setTransform(scaleX: Number, skewY: Number, skewX: Number, scaleY: Number, translateX: Number, translateY: Number): void @settransform","originName":"setTransform","description":"使用单位矩阵重新设置(覆盖)当前的变换并调用变换","compatibility":"##### setTransform 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| scaleX | Number | 是 | 水平缩放 |\n| skewY | Number | 是 | 垂直倾斜 |\n| skewX | Number | 是 | 水平倾斜 |\n| scaleY | Number | 是 | 垂直缩放 |\n| translateX | Number | 是 | 水平移动 |\n| translateY | Number | 是 | 垂直移动 | \n","fileFormats":"","returnValue":"","tutorial":""},"stroke":{"name":"#### stroke(): void @stroke","originName":"stroke","description":"画出当前路径的边框。默认颜色色为黑色","compatibility":"##### stroke 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"stroke_1":{"name":"#### stroke(path: Path2D): void @stroke","originName":"stroke","description":"画出指定路径的边框。默认颜色色为黑色","compatibility":"##### stroke 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| path | [Path2D](/api/path2d.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"strokeRect":{"name":"#### strokeRect(x: number, y: number, width: number, height: number): void @strokerect","originName":"strokeRect","description":"画一个矩形(非填充)","compatibility":"##### strokeRect 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x | number | 是 | 矩形起点的 x 轴坐标 |\n| y | number | 是 | 矩形起点的 y 轴坐标 |\n| width | number | 是 | 矩形的宽度 |\n| height | number | 是 | 矩形的高度 | \n","fileFormats":"","returnValue":"","tutorial":""},"strokeText":{"name":"#### strokeText(text: string, x: number, y: number, maxWidth?: number): void @stroketext","originName":"strokeText","description":"文本描边","compatibility":"##### strokeText 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| text | string | 是 | 要渲染的文本字符串 |\n| x | number | 是 | 开始绘制文本的点的 x 轴坐标 |\n| y | number | 是 | 开始绘制文本的点的 y 轴坐标 |\n| maxWidth | number | 否 | 需要绘制的最大宽度 | \n","fileFormats":"","returnValue":"","tutorial":""},"transform":{"name":"#### transform(scaleX: Number, skewY: number, skewX: number, scaleY: number, translateX: number, translateY: number): void @transform","originName":"transform","description":"使用矩阵多次叠加当前变换,矩阵由方法的参数进行描述。可以缩放、旋转、移动和倾斜上下文","compatibility":"##### transform 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| scaleX | Number | 是 | 水平缩放 |\n| skewY | number | 是 | 垂直倾斜 |\n| skewX | number | 是 | 水平倾斜 |\n| scaleY | number | 是 | 垂直缩放 |\n| translateX | number | 是 | 水平移动 |\n| translateY | number | 是 | 垂直移动 | \n","fileFormats":"","returnValue":"","tutorial":""},"translate":{"name":"#### translate(translateX: number, translateY: number): void @translate","originName":"translate","description":"当前网格添加平移变换","compatibility":"##### translate 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| translateX | number | 是 | 水平方向的移动距离 |\n| translateY | number | 是 | 垂直方向的移动距离 | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":"### CanvasRenderingContext2D 兼容性 <Help /> \n | Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |"},"CanvasDirection":{"name":"## CanvasDirection","description":"","extends":"","param":"","compatibility":""},"CanvasFillStyle":{"name":"## CanvasFillStyle","description":"","extends":"","param":"","compatibility":""},"CanvasGradient":{"name":"## CanvasGradient","description":"表示描述渐变的不透明对象。该接口通过 CanvasRenderingContext2D.createLinearGradient()、<br/>CanvasRenderingContext2D.createConicGradient()<br/>或 CanvasRenderingContext2D.createRadialGradient() 方法返回","extends":"","param":"","methods":{"addColorStop":{"name":"#### addColorStop(stop: number, color: string): void @addcolorstop","originName":"addColorStop","description":"添加颜色的渐变点。小于最小 stop 的部分会按最小 stop 的 color 来渲染,大于最大 stop 的部分会按最大 stop 的 color 来渲染, 最大支持5个分段","compatibility":"##### addColorStop 兼容性 <Help /> \n| Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| stop | number | 是 | 表示渐变中开始与结束之间的位置,范围 0-1 |\n| color | string | 是 | 渐变点的颜色 | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":"### CanvasGradient 兼容性 <Help /> \n | Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |"},"CanvasPattern":{"name":"## CanvasPattern","description":"接口表示一个不透明对象,描述了一个基于图像、画布或视频的模板,该模板通过 CanvasRenderingContext2D.createPattern() 方法创建","extends":"","param":"","compatibility":"### CanvasPattern 兼容性 <Help /> \n | Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |"},"CanvasFontStretch":{"name":"## CanvasFontStretch","description":"","extends":"","param":"","compatibility":""},"CanvasGlobalCompositeOperation":{"name":"## CanvasGlobalCompositeOperation","description":"","extends":"","param":"","compatibility":""},"CanvasSmoothingQuality":{"name":"## CanvasSmoothingQuality","description":"","extends":"","param":"","compatibility":""},"CanvasLineCap":{"name":"## CanvasLineCap","description":"","extends":"","param":"","compatibility":""},"CanvasLineJoin":{"name":"## CanvasLineJoin","description":"","extends":"","param":"","compatibility":""},"CanvasStokeStyle":{"name":"## CanvasStokeStyle","description":"","extends":"","param":"","compatibility":""},"CanvasTextAlign":{"name":"## CanvasTextAlign","description":"","extends":"","param":"","compatibility":""},"CanvasTextBaseline":{"name":"## CanvasTextBaseline","description":"","extends":"","param":"","compatibility":""},"CanvasTextRendering":{"name":"## CanvasTextRendering","description":"","extends":"","param":"","compatibility":""},"Path2D":{"name":"## Path2D","description":"Path2D用来声明路径,用来在canvas中根据需要创建可以保留并重用的路径, 此路径会被CanvasRenderingContext2D对象使用","extends":"","param":"","methods":{"closePath":{"name":"#### closePath(): void @closepath","originName":"closePath","description":"闭合路径,将最后一个点与起点连接起来。如果图形已经封闭,或者只有一个点,那么此方法不会产生任何效果。","compatibility":"##### closePath 兼容性 <Help /> \n| Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| 4.25 | 4.25 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"moveTo":{"name":"#### moveTo(x: number, y: number): void @moveto","originName":"moveTo","description":"将一个新的路径的起始点移动到 (x,y) 坐标","compatibility":"##### moveTo 兼容性 <Help /> \n| Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x | number | 是 | 点的X轴坐标 |\n| y | number | 是 | 点的Y轴坐标 | \n","fileFormats":"","returnValue":"","tutorial":""},"lineTo":{"name":"#### lineTo(x: number, y: number): void @lineto","originName":"lineTo","description":"将路径的最后一个点连接到 (x,y) 坐标","compatibility":"##### lineTo 兼容性 <Help /> \n| Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x | number | 是 | 线终点的X轴坐标 |\n| y | number | 是 | 线终点的Y轴坐标 | \n","fileFormats":"","returnValue":"","tutorial":""},"bezierCurveTo":{"name":"#### bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void @beziercurveto","originName":"bezierCurveTo","description":"创建三次方贝塞尔曲线路径","compatibility":"##### bezierCurveTo 兼容性 <Help /> \n| Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| cp1x | number | 是 | 第一个贝塞尔控制点的 x 坐标 |\n| cp1y | number | 是 | 第一个贝塞尔控制点的 y 坐标 |\n| cp2x | number | 是 | 第二个贝塞尔控制点的 x 坐标 |\n| cp2y | number | 是 | 第二个贝塞尔控制点的 y 坐标 |\n| x | number | 是 | 结束点的 x 坐标 |\n| y | number | 是 | 结束点的 y 坐标 | \n","fileFormats":"","returnValue":"","tutorial":""},"quadraticCurveTo":{"name":"#### quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void @quadraticcurveto","originName":"quadraticCurveTo","description":"创建二次贝塞尔曲线路径","compatibility":"##### quadraticCurveTo 兼容性 <Help /> \n| Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| cpx | number | 是 | 贝塞尔控制点的 x 坐标 |\n| cpy | number | 是 | 贝塞尔控制点的 y 坐标 |\n| x | number | 是 | 结束点的 x 坐标 |\n| y | number | 是 | 结束点的 y 坐标 | \n","fileFormats":"","returnValue":"","tutorial":""},"arc":{"name":"#### arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise: boolean): void @arc","originName":"arc","description":"绘制一段弧线","compatibility":"##### arc 兼容性 <Help /> \n| Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| x | number | 是 | | 圆弧中心(圆心)的 x 轴坐标 |\n| y | number | 是 | | 圆弧中心(圆心)的 y 轴坐标 |\n| radius | number | 是 | | 圆弧的半径 |\n| startAngle | number | 是 | | 圆弧的起始点,x 轴方向开始计算,单位为弧度 |\n| endAngle | number | 是 | | 圆弧的终点,单位为弧度 |\n| anticlockwise | boolean | 是 | true | 圆弧绘制方向,true:逆时针绘制,false:顺时针绘制。 | \n","fileFormats":"","returnValue":"","tutorial":""},"arcTo":{"name":"#### arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void @arcto","originName":"arcTo","description":"根据控制点和半径绘制圆弧路径,使用当前的描点 (前一个 moveTo 或 lineTo 等函数的止点)。根据当前描点与给定的控制点 1 连接的直线,和控制点 1 与控制点 2 连接的直线,作为使用指定半径的圆的切线,画出两条切线之间的弧线路径","compatibility":"##### arcTo 兼容性 <Help /> \n| Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x1 | number | 是 | 第一个控制点的 x 轴坐标 |\n| y1 | number | 是 | 第一个控制点的 y 轴坐标 |\n| x2 | number | 是 | 第二个控制点的 x 轴坐标 |\n| y2 | number | 是 | 第二个控制点的 y 轴坐标 |\n| radius | number | 是 | 圆弧的半径 | \n","fileFormats":"","returnValue":"","tutorial":""},"ellipse":{"name":"#### ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise: boolean): void @ellipse","originName":"ellipse","description":"添加椭圆路径。椭圆的圆心在(x,y)位置,半径分别是radiusX 和 radiusY,按照anticlockwise(默认顺时针)指定的方向,从 startAngle 开始绘制,到 endAngle 结束","compatibility":"##### ellipse 兼容性 <Help /> \n| Web | Android | iOS |\n| :- | :- | :- |\n| 4.0 | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| x | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆圆心的 x 轴(水平)坐标 |\n| y | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆圆心的 y 轴(垂直)坐标 |\n| radiusX | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆长轴的半径。必须为非负数 |\n| radiusY | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆短轴的半径。必须为非负数。 |\n| rotation | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆的旋转角度,以弧度表示。 |\n| startAngle | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆弧的起始偏心角,从正 x 轴沿顺时针测量,用弧度表示。 |\n| endAngle | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 椭圆弧的结束偏心角,从正 x 轴沿顺时针测量,用弧度表示。 |\n| anticlockwise | boolean | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 一个可选的布尔值,如果为 true,则逆时针绘制椭圆弧。默认值为 false(顺时针)。 | \n","fileFormats":"","returnValue":"","tutorial":""},"rect":{"name":"#### rect(x: number, y: number, width: number, height: number): void @rect","originName":"rect","description":"创建一个矩形路径","compatibility":"##### rect 兼容性 <Help /> \n| Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| 4.25 | 4.25 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 描述 |\n| :- | :- | :- | :- |\n| x | number | 是 | 矩形路径起点的 x 轴坐标 |\n| y | number | 是 | 矩形路径起点的 y 轴坐标 |\n| width | number | 是 | 矩形路径的宽度 |\n| height | number | 是 | 矩形路径的高度 | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":"### Path2D 兼容性 <Help /> \n | Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| 4.25 | 4.25 | 4.61 |"},"Image":{"name":"## Image","description":"图片对象, 用于 canvas 绘制图片。","extends":"```mermaid\ngraph LR\n \nImage -- Extends --> UniImageElement\n style UniImageElement color:#42b983\n click UniImageElement \"https://doc.dcloud.net.cn/uni-app-x/api/dom/uniimageelement.html\"\n```","param":"\n### Image 的属性值 @image-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| src | [string.ImageURIString](/uts/data-type.md#ide-string) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"4.25\",\"4.25\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 图片url |\n","compatibility":"### Image 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.0 | x | 4.25 | 4.25 | 4.61 |"},"ImageData":{"name":"## ImageData","description":"描述canvas元素的一个隐含像素数据的区域,注意:App平台ImageData只支持context接口获取不支持通过new ImageData方式创建","extends":"","param":"\n### ImageData 的属性值 @imagedata-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| data | [Uint8ClampedArray](/uts/buildin-object-api/uint8clampedarray.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 一维数组,包含以 RGBA 顺序的数据,数据使用 0 至 255(包含)的整数表示 |\n| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 使用像素描述 ImageData 的实际宽度 |\n| height | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 使用像素描述 ImageData 的实际高度 |\n","compatibility":"### ImageData 兼容性 <Help /> \n | Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |"},"TextMetrics":{"name":"## TextMetrics","description":"表示文本的尺寸,通过 CanvasRenderingContext2D.measureText() 方法创建","extends":"","param":"\n### TextMetrics 的属性值 @textmetrics-values\n| 名称 | 类型 | 必备 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| width | number | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.25\",\"4.25\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 文本的宽度 |\n","compatibility":"### TextMetrics 兼容性 <Help /> \n | Web | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- |\n| 4.0 | 4.25 | 4.25 | 4.61 |"},"UniNativeViewElement":{"name":"## UniNativeViewElement","description":"native-view 元素对象","extends":"```mermaid\ngraph LR\n \nUniNativeViewElement -- Extends --> UniElement\n style UniElement color:#42b983\n click UniElement \"https://doc.dcloud.net.cn/uni-app-x/api/dom/unielement.html\"\n```","param":"","methods":{"bindAndroidView":{"name":"#### bindAndroidView(view: View): void @bindandroidview","originName":"bindAndroidView","description":"绑定安卓平台原生view","compatibility":"##### bindAndroidView 兼容性 <Help /> \n| Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| 4.31 | x | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| view | View | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"bindIOSView":{"name":"#### bindIOSView(view: UIView): void @bindiosview","originName":"bindIOSView","description":"绑定IOS平台原生view","compatibility":"##### bindIOSView 兼容性 <Help /> \n| Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- |\n| x | x | 4.31 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| view | UIView | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.31\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"bindHarmonyFrameNode":{"name":"#### bindHarmonyFrameNode(node: FrameNode): void @bindharmonyframenode","originName":"bindHarmonyFrameNode","description":"绑定鸿蒙 FrameNode","compatibility":"##### bindHarmonyFrameNode 兼容性 <Help /> \n| Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- |\n| x | x | 4.61 | x |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| node | FrameNode | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""},"bindHarmonyWrappedBuilder":{"name":"#### bindHarmonyWrappedBuilder\\<O extends Object>(builder: WrappedBuilder\\<\\[options: O]>, options?: ESObject): BuilderNode\\<\\[O]> @bindharmonywrappedbuilder","originName":"bindHarmonyWrappedBuilder","description":"绑定鸿蒙 wrapperBuilder","compatibility":"##### bindHarmonyWrappedBuilder 兼容性 <Help /> \n| Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| x | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| builder | WrappedBuilder\\<\\[options: O]> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| options | ESObject | 否 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| BuilderNode\\<\\[O]> |\n \n","tutorial":""},"getHarmonyFrameNode":{"name":"#### getHarmonyFrameNode(): FrameNode \\| null @getharmonyframenode","originName":"getHarmonyFrameNode","description":"获取鸿蒙 FrameNode","compatibility":"##### getHarmonyFrameNode 兼容性 <Help /> \n| Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- |\n| x | x | 4.61 | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| FrameNode | 否 |\n \n","tutorial":""},"getHarmonyBuilderNode":{"name":"#### getHarmonyBuilderNode\\<O extends Object>(): BuilderNode\\<\\[O]> @getharmonybuildernode","originName":"getHarmonyBuilderNode","description":"获取鸿蒙 BuilderNode","compatibility":"##### getHarmonyBuilderNode 兼容性 <Help /> \n| Android | iOS | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- |\n| x | x | 4.61 | x |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| BuilderNode\\<\\[O]> |\n \n","tutorial":""},"getHarmonyComponentContent":{"name":"#### getHarmonyComponentContent\\<O extends Object>(): ComponentContent\\<\\[O]> @getharmonycomponentcontent","originName":"getHarmonyComponentContent","description":"获取鸿蒙 ComponentContent","compatibility":"##### getHarmonyComponentContent 兼容性 <Help /> \n| Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| x | x | 4.91 |\n","param":"","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| ComponentContent\\<\\[O]> |\n \n","tutorial":""},"bindHarmonyController":{"name":"#### bindHarmonyController\\<T extends Object>(controller: T): void @bindharmonycontroller","originName":"bindHarmonyController","description":"绑定鸿蒙控制器","compatibility":"##### bindHarmonyController 兼容性 <Help /> \n| Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| x | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 |\n| :- | :- | :- | :-: |\n| controller | T | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Android\"},{\"title\":\"iOS\"}],\"rows\":[[\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":"### UniNativeViewElement 兼容性 <Help /> \n | Android | iOS | HarmonyOS |\n| :- | :- | :- |\n| 4.31 | 4.31 | 4.61 |"},"UniResizeObserver":{"name":"## UniResizeObserver","description":"用于监视 UniElement 元素的大小变化。它可以观察一个或多个","extends":"","param":"\n### 构造函数\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| callback | (entries: Array&lt;UniResizeObserverEntry&gt;) => void | 是 | 每当监视的元素调整大小时,回调该函数 |\n\n### 构造函数\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| callback | (entries: Array&lt;UniResizeObserverEntry&gt;, observer: [UniResizeObserver](/api/dom/uniresizeobserver.md)) => void | 是 | 每当监视的元素调整大小时,回调该函数 |\n","methods":{"disconnect":{"name":"#### disconnect(): void @disconnect","originName":"disconnect","description":"取消所有的对 UniElement 目标的监视","compatibility":"##### disconnect 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.16 | x | 4.13 | 4.18 | 4.61 |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"observe":{"name":"#### observe(target: UniElement): void @observe","originName":"observe","description":"监视指定 UniElement 大小变化","compatibility":"##### observe 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.16 | x | 4.13 | 4.18 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| target | [UniElement](/api/dom/unielement.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"4.0\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 被监视的 UniElement | \n","fileFormats":"","returnValue":"","tutorial":""},"unobserve":{"name":"#### unobserve(target: UniElement): void @unobserve","originName":"unobserve","description":"结束对指定的 UniElement 的监视","compatibility":"##### unobserve 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.16 | x | 4.13 | 4.18 | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 | 兼容性 | 描述 |\n| :- | :- | :- | :-: | :- |\n| target | [UniElement](/api/dom/unielement.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"4.0\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 取消监视的 UniElement | \n","fileFormats":"","returnValue":"","tutorial":""}},"compatibility":"### UniResizeObserver 兼容性 <Help /> \n | Web | 微信小程序 | Android | iOS | HarmonyOS |\n| :- | :- | :- | :- | :- |\n| 4.16 | x | 4.13 | 4.18 | 4.61 |","example":""},"UniError":{"name":"## UniError","description":"uni api统一错误信息对象 ","extends":"","param":"\n### 构造函数\n### 构造函数\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| message | string | 是 | 统一错误描述信息 |\n\n### 构造函数\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| message | string | 是 | 统一错误描述信息 |\n| options | any | 是 | 源错误对象,原始错误对象应该包含在 options.cause 属性中 |\n\n### 构造函数\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| errSubject | string | 是 | 统一错误主题(模块)名称 |\n| errCode | number | 是 | 统一错误码 |\n| errMsg | string | 是 | 统一错误描述信息 |\n\n### UniError 的属性值 @unierror-values\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| errSubject | string | 是 | 统一错误主题(模块)名称 |\n| errCode | number | 是 | 统一错误码 |\n| errMsg | string | 是 | 统一错误描述信息 |\n| data | any | 否 | 错误信息中包含的数据 |\n| cause | [Error](/err-spec.md#unierror) | 否 | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | |\n| message | string | 是 | |\n","compatibility":""},"SourceError":{"name":"## SourceError","description":"源错误信息对象 ","extends":"","param":"\n### 构造函数\n### 构造函数\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| message | string | 是 | 源错误描述信息 |\n\n### 构造函数\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| message | string | 是 | 源错误描述信息 |\n| options | any | 是 | 引发此源错误对象,原始错误对象应该包含在 options.cause 属性中 |\n\n### SourceError 的属性值 @sourceerror-values\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| subject | string | 否 | 源错误模块名称 |\n| message | string | 是 | 源错误描述信息 |\n| code | number | 是 | 源错误的错误码 |\n| name | string | 是 | |\n| cause | [Error](/err-spec.md#unierror) | 否 | |\n","compatibility":""},"UniProvider":{"name":"## UniProvider","description":"服务供应商","extends":"","param":"\n### UniProvider 的属性值 @uniprovider-values\n| 名称 | 类型 | 必备 | 描述 |\n| :- | :- | :- | :- |\n| id | string | 是 | 服务供应商标识 |\n| description | string | 是 | 服务供应商描述 |\n| ~~isAppExist~~ | boolean | 是 | 判断服务供应商依赖的App是否安装(仅支持微信支付) |\n","compatibility":"### UniProvider 兼容性 <Help /> \n | Android | iOS |\n| :- | :- |\n| 4.18 | 4.18 |"},"ComponentPublicInstance":{"name":"## ComponentPublicInstance","description":"","extends":"","param":"\n### 构造函数\n| 名称 | 类型 | 必备 |\n| :- | :- | :- |\n| ins | any | 是 |\n\n### ComponentPublicInstance 的属性值 @componentpublicinstance-values\n| 名称 | 类型 | 必备 | 兼容性 |\n| :- | :- | :- | :-: |\n| $data | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $props | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $attrs | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $slots | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $refs | Map\\<string, any> | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $parent | VueComponent | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $root | VueComponent | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $options | VueComponentOptions | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $el | [UniElement](/api/dom/unielement.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n| $page | [UniPage](/api/unipage.md) | 是 | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"iOS(VDOM) UTS 插件\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.31\",\"√\",\"4.31\",\"4.31\",\"x\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> |\n","methods":{"$nextTick":{"name":"#### $nextTick(task?: (() => void)): Promise\\<void>; @$nexttick","originName":"$nextTick","description":"","compatibility":"##### $nextTick 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | √ | 4.11 | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| task | () => void | 否 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| Promise\\<void> |\n \n","tutorial":""},"$forceUpdate":{"name":"#### $forceUpdate(): void; @$forceupdate","originName":"$forceUpdate","description":"","compatibility":"##### $forceUpdate 兼容性 <Help /> \n| Web | 微信小程序 | Android(VDOM) | Android(Vapor) | iOS(VDOM) | iOS(Vapor) | iOS(VDOM) UTS 插件 | HarmonyOS(VDOM) | HarmonyOS(Vapor) |\n| :- | :- | :- | :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | √ | x | 4.11 | x | x | 4.61 | x |\n","param":"","fileFormats":"","returnValue":"","tutorial":""},"$callMethod":{"name":"#### $callMethod(method: string, ...args: Array\\<any>): any \\| null; @$callmethod","originName":"$callMethod","description":"","compatibility":"##### $callMethod 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | √ | 4.11 | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| method | string | 是 |\n| args | Array&lt;any&gt; | 否 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 | 必备 |\n| :- | :- |\n| any | 否 |\n \n","tutorial":""},"$emit":{"name":"#### $emit(event: string, ...do_not_transform_spread: Array\\<any>): void; @$emit","originName":"$emit","description":"","compatibility":"##### $emit 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | √ | 4.11 | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| event | string | 是 |\n| do_not_transform_spread | Array&lt;any&gt; | 否 | \n","fileFormats":"","returnValue":"","tutorial":""},"$watch":{"name":"#### $watch(source: any, // string \\| Function, value: Function, options?: WatchOptions): WatchStopHandle; @$watch","originName":"$watch","description":"","compatibility":"##### $watch 兼容性 <Help /> \n| Web | 微信小程序 | Android | iOS | iOS(VDOM) UTS 插件 | HarmonyOS |\n| :- | :- | :- | :- | :- | :- |\n| 4.0 | 4.41 | √ | 4.11 | x | 4.61 |\n","param":"##### 参数 \n\n| 名称 | 类型 | 必填 |\n| :- | :- | :- |\n| source | any | 是 |\n| value | () => void | 否 |\n| options | **WatchOptions** | 否 |\n@| 名称 | 类型 | 必备 |\n@| :- | :- | :- |\n@| flush | string | 否 |\n@| immediate | boolean | 否 |\n@| deep | boolean | 否 |\n@| onTrack | (event: DebuggerEvent) => void | 否 |\n@| onTrigger | (event: DebuggerEvent) => void | 否 | \n","fileFormats":"","returnValue":"##### 返回值 \n\n| 类型 |\n| :- |\n| () => void |\n \n","tutorial":""}},"compatibility":""},"general-attribute":{"name":"组件公共属性","description":"","attribute":"| 名称 | 类型 | 兼容性 | 描述 |\n| :- | :- | :- | :- |\n| id | string(string.IDString) | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 组件的唯一标识。需避免同页面中不同组件设置重复id;需避免使用uni-、uni.等前缀 |\n| style | string \\| UTSJSONObject \\| Array\\<string \\| UTSJSONObject> | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 组件的内联样式,可以动态设置的内联样式 |\n| class | string(string.ClassString) \\| UTSJSONObject \\| Array\\<string(string.ClassString) \\| UTSJSONObject> | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 组件的样式类,在对应的 css 中定义的样式类 |\n| ref | string \\| Function | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | vue中组件的唯一标识,用来给子组件注册引用信息,[详见](https://doc.dcloud.net.cn/uni-app-x/vue/built-in.html#ref) |\n| data-* | any | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS(VDOM)\"},{\"title\":\"iOS(Vapor)\"},{\"title\":\"HarmonyOS(VDOM)\"},{\"title\":\"HarmonyOS(Vapor)\"}],\"rows\":[[\"4.0\",\"4.41\",\"√\",\"4.11\",\"5.21\",\"4.61\",\"5.21\"]],\"status\":\"SUPPORTED\"}' /> | 自定义属性,组件上触发的事件时,会发送给事件处理函数 |\n| android-* | any | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"3.9\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | App-Android平台专有属性,详见[App-Android平台专有属性](https://doc.dcloud.net.cn/uni-app-x/component/common.html#attribute-android)章节 |","compatibility":""},"general-event":{"name":"组件公共事件","description":"","attribute":"| 名称 | 类型 | 兼容性 | 描述 |\n| :- | :- | :- | :- |\n| @click | (event: [UniPointerEvent](/component/common.md#unipointerevent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 手指触摸后马上离开。与tap相同,(推荐使用tap事件代替),冒泡事件 |\n| @mousedown | (event: [UniMouseEvent](/component/common.md#unimouseevent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 鼠标在元素上点击后触发 |\n| @mousemove | (event: [UniMouseEvent](/component/common.md#unimouseevent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 鼠标在元素上移动时触发 |\n| @mouseup | (event: [UniMouseEvent](/component/common.md#unimouseevent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"x\",\"x\",\"x\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 鼠标主按钮在元素上松开时触发 |\n| @touchstart | (event: [UniTouchEvent](/component/common.md#unitouchevent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 手指触摸动作开始,冒泡事件,event.type 值为 touchstart |\n| @touchmove | (event: [UniTouchEvent](/component/common.md#unitouchevent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 手指触摸后移动,冒泡事件,event.type 值为 touchmove |\n| @touchcancel | (event: [UniTouchEvent](/component/common.md#unitouchevent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 手指触摸动作被打断,如来电提醒,弹窗,冒泡事件,event.type 值为 touchcancel |\n| @touchend | (event: [UniTouchEvent](/component/common.md#unitouchevent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 手指触摸动作结束,冒泡事件,event.type 值为 touchend |\n| @tap | (event: [UniPointerEvent](/component/common.md#unipointerevent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 手指触摸后马上离开,冒泡事件 |\n| @longpress | (event: [UniTouchEvent](/component/common.md#unitouchevent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 如果一个组件被绑定了 longpress 事件,那么当用户手指触摸后,超过350ms再离开会触发,冒泡事件 |\n| @longtap | (event: [UniTouchEvent](/component/common.md#unitouchevent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.9\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | 手指触摸后,超过350ms再离开(推荐使用 longpress 事件代替) |\n| @transitionend | (event: [UniEvent](/component/common.md#unievent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"4.0\",\"4.41\",\"3.93\",\"4.11\",\"4.61\"]],\"status\":\"SUPPORTED\"}' /> | transition 效果结束时触发 |\n| @fullscreenchange | (event: [UniEvent](/component/common.md#unievent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.61\",\"4.61\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 进入或退出全屏模式时触发 |\n| @fullscreenerror | (event: [UniEvent](/component/common.md#unievent)) => void | <CompatibilityTable table='{\"headers\":[{\"title\":\"Web\"},{\"title\":\"微信小程序\"},{\"title\":\"Android\"},{\"title\":\"iOS\"},{\"title\":\"HarmonyOS\"}],\"rows\":[[\"x\",\"x\",\"4.61\",\"4.61\",\"4.61\"]],\"status\":\"PARTIALLY_SUPPORTED\"}' /> | 进入或退出全屏模式失败时触发 |","compatibility":"","example":""},"global-properties":{"example":"### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/component/global-properties/global-properties.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/component/global-properties/global-properties.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/component/global-properties/global-properties\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/component/global-properties/global-properties\n\n>示例\n```vue\n<template>\r\n <!-- #ifdef APP && !VUE3-VAPOR -->\r\n <scroll-view style=\"flex: 1\">\r\n <!-- #endif -->\r\n <view>\r\n <page-head title=\"global-properties\"></page-head>\r\n <page-intro content=\"本页演示组件通用属性:id、class、data、style 的绑定与校验,以及 ref、hover-class、hover-start-time、hover-stay-time 等点击态效果。\"></page-intro>\r\n <view class=\"uni-padding-wrap\">\r\n <view :id=\"generalId\" :class=\"generalClass\"\r\n :data-test=\"generalData\"\r\n :style=\"generalStyle\" ref=\"generalTargetRef\">\r\n <text>id: {{ generalId }}</text>\r\n <text>class: {{ generalClass }}</text>\r\n <text>data-test: {{ generalData }}</text>\r\n <text>style: {{ generalStyle }}</text>\r\n </view>\r\n <view class=\"btn btn-style uni-common-mt\" @click=\"validateGeneralAttributes\">\r\n <text class=\"btn-inner\">{{ validateGeneralAttrText }}</text>\r\n </view>\r\n <view class=\"btn btn-ref uni-common-mt\" @click=\"changeHeight\">\r\n <text class=\"btn-inner\">{{ changeHeightByRefText }}</text>\r\n </view>\r\n <view class=\"view-class\" :hover-class=\"hoverClass\" ref=\"viewTargetRef\">\r\n <text class=\"text\">按下 50 ms 后背景变红</text>\r\n <text class=\"text\">抬起 400 ms 后背景恢复</text>\r\n </view>\r\n <view class=\"view-class\" :hover-class=\"hoverClass\" :hover-start-time=\"1000\" :hover-stay-time=\"1000\"\r\n ref=\"viewTargetRef\">\r\n <text class=\"text\">按下 1000 ms 后背景变红</text>\r\n <text class=\"text\">抬起 1000 ms 后背景恢复</text>\r\n </view>\r\n </view>\r\n </view>\r\n <!-- #ifdef APP && !VUE3-VAPOR -->\r\n </scroll-view>\r\n <!-- #endif -->\r\n</template>\r\n\r\n<script setup lang=\"uts\">\r\n const generalId = ref('general-id')\r\n const generalClass = ref('general-class')\r\n const generalData = ref('general-data')\r\n const generalStyle = ref('background-color: aqua')\r\n const validateGeneralAttrText = ref('验证基础属性')\r\n const hoverClass = ref('hover-class')\r\n const validateViewAttrText = ref('验证 view 属性')\r\n const changeHeightByRefText = ref('通过 ref 修改高度')\r\n\r\n const generalTargetRef = ref<UniElement | null>(null)\r\n const viewTargetRef = ref<UniElement | null>(null)\r\n\r\n const validateGeneralAttributes = () => {\r\n const generalTargetElement = generalTargetRef.value as UniElement\r\n const generalIdValue = generalTargetElement.getAttribute('id')\r\n if (generalIdValue != generalId.value) {\r\n validateGeneralAttrText.value = '基础属性 id 验证失败'\r\n return\r\n }\r\n // #ifdef APP\r\n if (!generalTargetElement.classList.includes('general-class')) {\r\n validateGeneralAttrText.value = '基础属性 class 验证失败'\r\n return\r\n }\r\n // #endif\r\n // #ifdef WEB\r\n if (!Array.from(generalTargetElement.classList).includes('general-class')) {\r\n validateGeneralAttrText.value = '基础属性 class 验证失败'\r\n return\r\n }\r\n // #endif\r\n // #ifndef MP\r\n const generalDataValue = generalTargetElement.dataset.test\r\n if (generalDataValue != generalData.value) {\r\n validateGeneralAttrText.value = '基础属性 data-test 验证失败'\r\n return\r\n }\r\n // #endif\r\n validateGeneralAttrText.value = '基础属性验证成功'\r\n }\r\n\r\n const changeHeight = () => {\r\n const generalTargetElement = generalTargetRef.value as UniElement\r\n changeHeightByRefText.value = '已通过 ref 修改高度'\r\n generalTargetElement.style.setProperty('height', '200px')\r\n }\r\n\r\n</script>\r\n\r\n<style>\r\n .btn {\r\n height: 50px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background-color: #409eff;\r\n border-radius: 5px;\r\n }\r\n\r\n .btn-inner {\r\n color: #fff;\r\n }\r\n\r\n .general-class {\r\n margin-left: 40px;\r\n padding: 10px;\r\n width: 260px;\r\n height: 160px;\r\n background-color: antiquewhite;\r\n }\r\n\r\n .view-class {\r\n margin: 20px 0 0 50px;\r\n padding: 10px;\r\n width: 240px;\r\n height: 100px;\r\n background-color: antiquewhite;\r\n }\r\n\r\n .text {\r\n margin-top: 5px;\r\n text-align: center;\r\n }\r\n\r\n .hover-class {\r\n background-color: red;\r\n }\r\n</style>\r\n\n```\n\n:::"},"global-events":{"example":"### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/component/global-events/global-events.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/component/global-events/global-events.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/component/global-events/global-events\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/component/global-events/global-events\n\n>示例\n```vue\n<template>\r\n <!-- #ifdef APP && !VUE3-VAPOR -->\r\n <scroll-view style=\"flex: 1\">\r\n <!-- #endif -->\r\n <page-head title=\"组件全局事件示例\"></page-head>\r\n <page-intro content=\"本页演示组件全局事件:触摸区域展示 touchstart/touchmove/touchend/touchcancel,点击区域展示 tap/click/longpress,并显示事件详情与清除;可跳转冒泡、阻止默认、transform 等子示例。\"></page-intro>\r\n <view class=\"uni-padding-wrap uni-common-mt container uni-theme-root\">\r\n <view class=\"section\">\r\n <text class=\"section-title\">触摸事件区域:touchstart/touchmove/touchend/touchcancel</text>\r\n <text class=\"section-desc\">在下方蓝色区域滑动查看触摸事件详情</text>\r\n <view class=\"target touch-area\" id=\"touch-target\" @touchstart=\"onTouchStart\" @touchcancel=\"onTouchCancel\"\r\n @touchmove=\"onTouchMove\" @touchend=\"onTouchEnd\">\r\n <text class=\"target-text\">在此区域滑动</text>\r\n </view>\r\n </view>\r\n\r\n <view class=\"section\">\r\n <text class=\"section-title\">点击/长按事件区域:tap/click/longpress</text>\r\n <text class=\"section-desc\">点击或长按下方绿色区域查看事件详情</text>\r\n <view class=\"target click-area\" id=\"longpress-target\" @tap=\"onTap\" @click=\"onClick\" @longpress=\"onLongPress\">\r\n <text class=\"target-text\">点击或长按</text>\r\n </view>\r\n </view>\r\n\r\n <view class=\"section\" v-if=\"touchStartEvent !== null || touchMoveEvent !== null || touchEndEvent !== null || touchCancelEvent !== null || tapEvent !== null || clickEvent !== null || longPressEvent !== null\">\r\n <view class=\"clear-btn-wrapper\">\r\n <button class=\"clear-btn\" @click=\"clearAllEvents\">清除所有事件</button>\r\n </view>\r\n </view>\r\n <view v-if=\"touchStartEvent !== null\" class=\"event-detail\">\r\n <text class=\"event-title\">touchStart Event(触摸开始事件)</text>\r\n <view class=\"event-base-info\">\r\n <text class=\"info-title\">UniEvent 基础属性:</text>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.type (事件类型):</text>\r\n <text class=\"info-value\">{{ touchStartEvent!.type }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.bubbles (是否冒泡):</text>\r\n <text class=\"info-value\">{{ touchStartEvent!.bubbles }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.cancelable (是否可取消):</text>\r\n <text class=\"info-value\">{{ touchStartEvent!.cancelable }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.timeStamp (时间戳):</text>\r\n <text class=\"info-value\">{{ touchStartEvent!.timeStamp }}</text>\r\n </view>\r\n </view>\r\n <text class=\"touches-title\">event.touches (当前所有触摸点):</text>\r\n <template v-for=\"(touch, index) in touchStartEvent!.touches\" :key=\"index\">\r\n <view class=\"touch-item\">\r\n <text class=\"touch-index\">event.touches[{{ index }}]:</text>\r\n <view class=\"touch-props\">\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .identifier (触摸点标识符):</text>\r\n <text class=\"prop-value\" id=\"touch-start-touch-identifier\">{{ touch.identifier }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageX (相对于页面左边,含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-start-touch-page-x\">{{ touch.pageX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageY (相对于页面顶部,含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-start-touch-page-y\">{{ touch.pageY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientX (相对于可视区域左边):</text>\r\n <text class=\"prop-value\" id=\"touch-start-touch-client-x\">{{ touch.clientX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientY (相对于可视区域顶部):</text>\r\n <text class=\"prop-value\" id=\"touch-start-touch-client-y\">{{ touch.clientY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenX (相对于屏幕左边,不含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-start-touch-screen-x\">{{ touch.screenX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenY (相对于屏幕顶部,不含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-start-touch-screen-y\">{{ touch.screenY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .force (触摸点的压力大小):</text>\r\n <text class=\"prop-value\" id=\"touch-start-touch-force\">{{ touch.force }}</text>\r\n </view>\r\n </view>\r\n </view>\r\n </template>\r\n <text class=\"touches-title\">event.changedTouches (变化的触摸点):</text>\r\n <template v-for=\"(touch, index) in touchStartEvent!.changedTouches\" :key=\"index\">\r\n <view class=\"touch-item\">\r\n <text class=\"touch-index\">event.changedTouches[{{ index }}]:</text>\r\n <view class=\"touch-props\">\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .identifier:</text>\r\n <text class=\"prop-value\" id=\"touch-start-changed-touch-identifier\">{{ touch.identifier }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageX:</text>\r\n <text class=\"prop-value\" id=\"touch-start-changed-touch-page-x\">{{ touch.pageX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageY:</text>\r\n <text class=\"prop-value\" id=\"touch-start-changed-touch-page-y\">{{ touch.pageY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientX:</text>\r\n <text class=\"prop-value\" id=\"touch-start-changed-touch-client-x\">{{ touch.clientX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientY:</text>\r\n <text class=\"prop-value\" id=\"touch-start-changed-touch-client-y\">{{ touch.clientY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenX:</text>\r\n <text class=\"prop-value\" id=\"touch-start-changed-touch-screen-x\">{{ touch.screenX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenY:</text>\r\n <text class=\"prop-value\" id=\"touch-start-changed-touch-screen-y\">{{ touch.screenY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .force:</text>\r\n <text class=\"prop-value\" id=\"touch-start-changed-touch-force\">{{ touch.force }}</text>\r\n </view>\r\n </view>\r\n </view>\r\n </template>\r\n </view>\r\n <view v-if=\"touchCancelEvent !== null\" class=\"event-detail\">\r\n <text class=\"event-title\">touchCancel Event(触摸取消事件)</text>\r\n <view class=\"event-base-info\">\r\n <text class=\"info-title\">UniEvent 基础属性:</text>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.type (事件类型):</text>\r\n <text class=\"info-value\">{{ touchCancelEvent!.type }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.bubbles (是否冒泡):</text>\r\n <text class=\"info-value\">{{ touchCancelEvent!.bubbles }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.cancelable (是否可取消):</text>\r\n <text class=\"info-value\">{{ touchCancelEvent!.cancelable }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.timeStamp (时间戳):</text>\r\n <text class=\"info-value\">{{ touchCancelEvent!.timeStamp }}</text>\r\n </view>\r\n </view>\r\n <text class=\"touches-title\">event.touches (当前所有触摸点):</text>\r\n <template v-for=\"(touch, index) in touchCancelEvent!.touches\" :key=\"index\">\r\n <view class=\"touch-item\">\r\n <text class=\"touch-index\">event.touches[{{ index }}]:</text>\r\n <view class=\"touch-props\">\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .identifier (触摸点标识符):</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-touch-identifier\">{{\r\n touch.identifier\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageX (相对于页面左边,含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-touch-page-x\">{{ touch.pageX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageY (相对于页面顶部,含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-touch-page-y\">{{ touch.pageY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientX (相对于可视区域左边):</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-touch-client-x\">{{ touch.clientX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientY (相对于可视区域顶部):</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-touch-client-y\">{{ touch.clientY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenX (相对于屏幕左边,不含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-touch-screen-x\">{{ touch.screenX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenY (相对于屏幕顶部,不含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-touch-screen-y\">{{ touch.screenY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .force (触摸点的压力大小):</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-touch-force\">{{ touch.force }}</text>\r\n </view>\r\n </view>\r\n </view>\r\n </template>\r\n <text class=\"touches-title\">event.changedTouches (变化的触摸点):</text>\r\n <template v-for=\"(touch, index) in touchCancelEvent!.changedTouches\" :key=\"index\">\r\n <view class=\"touch-item\">\r\n <text class=\"touch-index\">event.changedTouches[{{ index }}]:</text>\r\n <view class=\"touch-props\">\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .identifier:</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-changed-touch-identifier\">{{\r\n touch.identifier\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageX:</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-changed-touch-page-x\">{{\r\n touch.pageX\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageY:</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-changed-touch-page-y\">{{\r\n touch.pageY\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientX:</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-changed-touch-client-x\">{{\r\n touch.clientX\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientY:</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-changed-touch-client-y\">{{\r\n touch.clientY\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenX:</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-changed-touch-screen-x\">{{\r\n touch.screenX\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenY:</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-changed-touch-screen-y\">{{\r\n touch.screenY\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .force:</text>\r\n <text class=\"prop-value\" id=\"touch-cancel-changed-touch-force\">{{\r\n touch.force\r\n }}</text>\r\n </view>\r\n </view>\r\n </view>\r\n </template>\r\n </view>\r\n <view v-if=\"touchMoveEvent !== null\" class=\"event-detail\">\r\n <text class=\"event-title\">touchMove Event(触摸移动事件)</text>\r\n <view class=\"event-base-info\">\r\n <text class=\"info-title\">UniEvent 基础属性:</text>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.type (事件类型):</text>\r\n <text class=\"info-value\">{{ touchMoveEvent!.type }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.bubbles (是否冒泡):</text>\r\n <text class=\"info-value\">{{ touchMoveEvent!.bubbles }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.cancelable (是否可取消):</text>\r\n <text class=\"info-value\">{{ touchMoveEvent!.cancelable }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.timeStamp (时间戳):</text>\r\n <text class=\"info-value\">{{ touchMoveEvent!.timeStamp }}</text>\r\n </view>\r\n </view>\r\n <text class=\"touches-title\">event.touches (当前所有触摸点):</text>\r\n <template v-for=\"(touch, index) in touchMoveEvent!.touches\" :key=\"index\">\r\n <view class=\"touch-item\">\r\n <text class=\"touch-index\">event.touches[{{ index }}]:</text>\r\n <view class=\"touch-props\">\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .identifier (触摸点标识符):</text>\r\n <text class=\"prop-value\" id=\"touch-move-touch-identifier\">{{ touch.identifier }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageX (相对于页面左边,含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-move-touch-page-x\">{{ touch.pageX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageY (相对于页面顶部,含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-move-touch-page-y\">{{ touch.pageY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientX (相对于可视区域左边):</text>\r\n <text class=\"prop-value\" id=\"touch-move-touch-client-x\">{{ touch.clientX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientY (相对于可视区域顶部):</text>\r\n <text class=\"prop-value\" id=\"touch-move-touch-client-y\">{{ touch.clientY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenX (相对于屏幕左边,不含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-move-touch-screen-x\">{{ touch.screenX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenY (相对于屏幕顶部,不含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-move-touch-screen-y\">{{ touch.screenY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .force (触摸点的压力大小):</text>\r\n <text class=\"prop-value\" id=\"touch-move-touch-force\">{{ touch.force }}</text>\r\n </view>\r\n </view>\r\n </view>\r\n </template>\r\n <text class=\"touches-title\">event.changedTouches (变化的触摸点):</text>\r\n <template v-for=\"(touch, index) in touchMoveEvent!.changedTouches\" :key=\"index\">\r\n <view class=\"touch-item\">\r\n <text class=\"touch-index\">event.changedTouches[{{ index }}]:</text>\r\n <view class=\"touch-props\">\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .identifier:</text>\r\n <text class=\"prop-value\" id=\"touch-move-changed-touch-identifier\">{{ touch.identifier }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageX:</text>\r\n <text class=\"prop-value\" id=\"touch-move-changed-touch-page-x\">{{ touch.pageX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageY:</text>\r\n <text class=\"prop-value\" id=\"touch-move-changed-touch-page-y\">{{ touch.pageY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientX:</text>\r\n <text class=\"prop-value\" id=\"touch-move-changed-touch-client-x\">{{ touch.clientX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientY:</text>\r\n <text class=\"prop-value\" id=\"touch-move-changed-touch-client-y\">{{ touch.clientY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenX:</text>\r\n <text class=\"prop-value\" id=\"touch-move-changed-touch-screen-x\">{{ touch.screenX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenY:</text>\r\n <text class=\"prop-value\" id=\"touch-move-changed-touch-screen-y\">{{ touch.screenY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .force:</text>\r\n <text class=\"prop-value\" id=\"touch-move-changed-touch-force\">{{ touch.force }}</text>\r\n </view>\r\n </view>\r\n </view>\r\n </template>\r\n </view>\r\n <view v-if=\"touchEndEvent !== null\" class=\"event-detail\">\r\n <text class=\"event-title\">touchEnd Event(触摸结束事件)</text>\r\n <view class=\"event-base-info\">\r\n <text class=\"info-title\">UniEvent 基础属性:</text>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.type (事件类型):</text>\r\n <text class=\"info-value\">{{ touchEndEvent!.type }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.bubbles (是否冒泡):</text>\r\n <text class=\"info-value\">{{ touchEndEvent!.bubbles }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.cancelable (是否可取消):</text>\r\n <text class=\"info-value\">{{ touchEndEvent!.cancelable }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.timeStamp (时间戳):</text>\r\n <text class=\"info-value\">{{ touchEndEvent!.timeStamp }}</text>\r\n </view>\r\n </view>\r\n <text class=\"touches-title\">event.touches (当前所有触摸点):</text>\r\n <template v-for=\"(touch, index) in touchEndEvent!.touches\" :key=\"index\">\r\n <view class=\"touch-item\">\r\n <text class=\"touch-index\">event.touches[{{ index }}]:</text>\r\n <view class=\"touch-props\">\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .identifier (触摸点标识符):</text>\r\n <text class=\"prop-value\" id=\"touch-end-touch-identifier\">{{ touch.identifier }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageX (相对于页面左边,含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-end-touch-page-x\">{{ touch.pageX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageY (相对于页面顶部,含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-end-touch-page-y\">{{ touch.pageY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientX (相对于可视区域左边):</text>\r\n <text class=\"prop-value\" id=\"touch-end-touch-client-x\">{{ touch.clientX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientY (相对于可视区域顶部):</text>\r\n <text class=\"prop-value\" id=\"touch-end-touch-client-y\">{{ touch.clientY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenX (相对于屏幕左边,不含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-end-touch-screen-x\">{{ touch.screenX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenY (相对于屏幕顶部,不含滚动):</text>\r\n <text class=\"prop-value\" id=\"touch-end-touch-screen-y\">{{ touch.screenY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .force (触摸点的压力大小):</text>\r\n <text class=\"prop-value\" id=\"touch-end-touch-force\">{{ touch.force }}</text>\r\n </view>\r\n </view>\r\n </view>\r\n </template>\r\n <text class=\"touches-title\">event.changedTouches (变化的触摸点):</text>\r\n <template v-for=\"(touch, index) in touchEndEvent!.changedTouches\" :key=\"index\">\r\n <view class=\"touch-item\">\r\n <text class=\"touch-index\">event.changedTouches[{{ index }}]:</text>\r\n <view class=\"touch-props\">\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .identifier:</text>\r\n <text class=\"prop-value\" id=\"touch-end-changed-touch-identifier\">{{ touch.identifier }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageX:</text>\r\n <text class=\"prop-value\" id=\"touch-end-changed-touch-page-x\">{{ touch.pageX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageY:</text>\r\n <text class=\"prop-value\" id=\"touch-end-changed-touch-page-y\">{{ touch.pageY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientX:</text>\r\n <text class=\"prop-value\" id=\"touch-end-changed-touch-client-x\">{{ touch.clientX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientY:</text>\r\n <text class=\"prop-value\" id=\"touch-end-changed-touch-client-y\">{{ touch.clientY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenX:</text>\r\n <text class=\"prop-value\" id=\"touch-end-changed-touch-screen-x\">{{ touch.screenX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenY:</text>\r\n <text class=\"prop-value\" id=\"touch-end-changed-touch-screen-y\">{{ touch.screenY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .force:</text>\r\n <text class=\"prop-value\" id=\"touch-end-changed-touch-force\">{{ touch.force }}</text>\r\n </view>\r\n </view>\r\n </view>\r\n </template>\r\n </view>\r\n <view v-if=\"longPressEvent !== null\" class=\"event-detail\">\r\n <text class=\"event-title\">longPress Event(长按事件)</text>\r\n <view class=\"event-base-info\">\r\n <text class=\"info-title\">UniEvent 基础属性:</text>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.type (事件类型):</text>\r\n <text class=\"info-value\">{{ longPressEvent!.type }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.bubbles (是否冒泡):</text>\r\n <text class=\"info-value\">{{ longPressEvent!.bubbles }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.cancelable (是否可取消):</text>\r\n <text class=\"info-value\">{{ longPressEvent!.cancelable }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.timeStamp (时间戳):</text>\r\n <text class=\"info-value\">{{ longPressEvent!.timeStamp }}</text>\r\n </view>\r\n </view>\r\n <text class=\"touches-title\">event.touches (当前所有触摸点):</text>\r\n <template v-for=\"(touch, index) in longPressEvent!.touches\"\r\n :key=\"index\">\r\n <view class=\"touch-item\">\r\n <text class=\"touch-index\">event.touches[{{ index }}]:</text>\r\n <view class=\"touch-props\">\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .identifier (触摸点标识符):</text>\r\n <text class=\"prop-value\" id=\"long-press-touch-identifier\">{{ touch.identifier }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageX (相对于页面左边,含滚动):</text>\r\n <text class=\"prop-value\" id=\"long-press-touch-page-x\">{{ touch.pageX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageY (相对于页面顶部,含滚动):</text>\r\n <text class=\"prop-value\" id=\"long-press-touch-page-y\">{{ touch.pageY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientX (相对于可视区域左边):</text>\r\n <text class=\"prop-value\" id=\"long-press-touch-client-x\">{{ touch.clientX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientY (相对于可视区域顶部):</text>\r\n <text class=\"prop-value\" id=\"long-press-touch-client-y\">{{ touch.clientY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenX (相对于屏幕左边,不含滚动):</text>\r\n <text class=\"prop-value\" id=\"long-press-touch-screen-x\">{{ touch.screenX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenY (相对于屏幕顶部,不含滚动):</text>\r\n <text class=\"prop-value\" id=\"long-press-touch-screen-y\">{{ touch.screenY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .force (触摸点的压力大小):</text>\r\n <text class=\"prop-value\" id=\"long-press-touch-force\">{{ touch.force }}</text>\r\n </view>\r\n </view>\r\n </view>\r\n </template>\r\n <!-- #ifndef MP-ALIPAY -->\r\n <text class=\"touches-title\">event.changedTouches (变化的触摸点):</text>\r\n <template v-for=\"(touch, index) in longPressEvent!.changedTouches\" :key=\"index\">\r\n <view class=\"touch-item\">\r\n <text class=\"touch-index\">event.changedTouches[{{ index }}]:</text>\r\n <view class=\"touch-props\">\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .identifier:</text>\r\n <text class=\"prop-value\" id=\"long-press-changed-touch-identifier\">{{\r\n touch.identifier\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageX:</text>\r\n <text class=\"prop-value\" id=\"long-press-changed-touch-page-x\">{{ touch.pageX }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .pageY:</text>\r\n <text class=\"prop-value\" id=\"long-press-changed-touch-page-y\">{{ touch.pageY }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientX:</text>\r\n <text class=\"prop-value\" id=\"long-press-changed-touch-client-x\">{{\r\n touch.clientX\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .clientY:</text>\r\n <text class=\"prop-value\" id=\"long-press-changed-touch-client-y\">{{\r\n touch.clientY\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenX:</text>\r\n <text class=\"prop-value\" id=\"long-press-changed-touch-screen-x\">{{\r\n touch.screenX\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .screenY:</text>\r\n <text class=\"prop-value\" id=\"long-press-changed-touch-screen-y\">{{\r\n touch.screenY\r\n }}</text>\r\n </view>\r\n <view class=\"prop-row\">\r\n <text class=\"prop-label\"> .force:</text>\r\n <text class=\"prop-value\" id=\"long-press-changed-touch-force\">{{\r\n touch.force\r\n }}</text>\r\n </view>\r\n </view>\r\n </view>\r\n </template>\r\n <!-- #endif -->\r\n </view>\r\n <view v-if=\"tapEvent !== null\" class=\"event-detail\">\r\n <text class=\"event-title\">tap Event(点击事件)</text>\r\n <view class=\"event-base-info\">\r\n <text class=\"info-title\">UniEvent 基础属性:</text>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.type (事件类型):</text>\r\n <text class=\"info-value\">{{ tapEvent!.type }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.bubbles (是否冒泡):</text>\r\n <text class=\"info-value\">{{ tapEvent!.bubbles }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.cancelable (是否可取消):</text>\r\n <text class=\"info-value\">{{ tapEvent!.cancelable }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.timeStamp (时间戳):</text>\r\n <text class=\"info-value\">{{ tapEvent!.timeStamp }}</text>\r\n </view>\r\n </view>\r\n <view class=\"event-base-info\">\r\n <text class=\"info-title\">PointerEvent 位置信息:</text>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.x (同clientX):</text>\r\n <text class=\"info-value\" id=\"tap-event-x\">{{ tapEvent!.x }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.y (同clientY):</text>\r\n <text class=\"info-value\" id=\"tap-event-y\">{{ tapEvent!.y }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.clientX (相对于可视区域左边):</text>\r\n <text class=\"info-value\">{{ tapEvent!.clientX }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.clientY (相对于可视区域顶部):</text>\r\n <text class=\"info-value\">{{ tapEvent!.clientY }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.pageX (相对于页面左边,含滚动):</text>\r\n <text class=\"info-value\">{{ tapEvent!.pageX }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.pageY (相对于页面顶部,含滚动):</text>\r\n <text class=\"info-value\">{{ tapEvent!.pageY }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.screenX (相对于屏幕左边,不含滚动):</text>\r\n <text class=\"info-value\">{{ tapEvent!.screenX }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.screenY (相对于屏幕顶部,不含滚动):</text>\r\n <text class=\"info-value\">{{ tapEvent!.screenY }}</text>\r\n </view>\r\n </view>\r\n </view>\r\n <view v-if=\"clickEvent !== null\" class=\"event-detail\">\r\n <text class=\"event-title\">click Event(点击事件)</text>\r\n <view class=\"event-base-info\">\r\n <text class=\"info-title\">UniEvent 基础属性:</text>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.type (事件类型):</text>\r\n <text class=\"info-value\">{{ clickEvent!.type }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.bubbles (是否冒泡):</text>\r\n <text class=\"info-value\">{{ clickEvent!.bubbles }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.cancelable (是否可取消):</text>\r\n <text class=\"info-value\">{{ clickEvent!.cancelable }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.timeStamp (时间戳):</text>\r\n <text class=\"info-value\">{{ clickEvent!.timeStamp }}</text>\r\n </view>\r\n </view>\r\n <view class=\"event-base-info\">\r\n <text class=\"info-title\">PointerEvent 位置信息:</text>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.x (同clientX):</text>\r\n <text class=\"info-value\" id=\"click-event-x\">{{ clickEvent!.x }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.y (同clientY):</text>\r\n <text class=\"info-value\" id=\"click-event-y\">{{ clickEvent!.y }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.clientX (相对于可视区域左边):</text>\r\n <text class=\"info-value\">{{ clickEvent!.clientX }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.clientY (相对于可视区域顶部):</text>\r\n <text class=\"info-value\">{{ clickEvent!.clientY }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.pageX (相对于页面左边,含滚动):</text>\r\n <text class=\"info-value\">{{ clickEvent!.pageX }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.pageY (相对于页面顶部,含滚动):</text>\r\n <text class=\"info-value\">{{ clickEvent!.pageY }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.screenX (相对于屏幕左边,不含滚动):</text>\r\n <text class=\"info-value\">{{ clickEvent!.screenX }}</text>\r\n </view>\r\n <view class=\"info-row\">\r\n <text class=\"info-label\">event.screenY (相对于屏幕顶部,不含滚动):</text>\r\n <text class=\"info-value\">{{ clickEvent!.screenY }}</text>\r\n </view>\r\n </view>\r\n </view>\r\n </view>\r\n <!-- #ifdef APP && !VUE3-VAPOR -->\r\n </scroll-view>\r\n <!-- #endif -->\r\n</template>\r\n<script setup lang=\"uts\">\r\n const title = ref('global-events')\r\n const touchStartEvent = ref<TouchEvent | null>(null)\r\n const touchCancelEvent = ref<TouchEvent | null>(null)\r\n const touchMoveEvent = ref<TouchEvent | null>(null)\r\n const longPressEvent = ref<TouchEvent | null>(null)\r\n const touchEndEvent = ref<TouchEvent | null>(null)\r\n const tapEvent = ref<PointerEvent | null>(null)\r\n const clickEvent = ref<PointerEvent | null>(null)\r\n\r\n type Rect = {\r\n x: number\r\n y: number\r\n width: number\r\n height: number\r\n }\r\n const longPressTargetRect = reactive<Rect>({\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0,\r\n })\r\n // 获取 #longpress-target 位置信息,供自动化测试使用\r\n // #ifndef MP\r\n onReady(() => {\r\n const longpressTarget = uni.getElementById('longpress-target')!\r\n const rect = longpressTarget.getBoundingClientRect()\r\n longPressTargetRect.x = rect.x\r\n longPressTargetRect.y = rect.y\r\n longPressTargetRect.width = rect.width\r\n longPressTargetRect.height = rect.height\r\n })\r\n // #endif\r\n // #ifdef MP\r\n onReady(async () => {\r\n const longpressTarget = uni.getElementById('longpress-target')!\r\n const rect = await longpressTarget.getBoundingClientRectAsync()!\r\n longPressTargetRect.x = rect.x\r\n longPressTargetRect.y = rect.y\r\n longPressTargetRect.width = rect.width\r\n longPressTargetRect.height = rect.height\r\n })\r\n // #endif\r\n\r\n const onTouchStart = (e : TouchEvent) => {\r\n touchStartEvent.value = e\r\n console.log('onTouchStart', e)\r\n }\r\n\r\n const onTouchCancel = (e : TouchEvent) => {\r\n touchCancelEvent.value = e\r\n console.log('onTouchCancel')\r\n }\r\n\r\n const onTouchMove = (e : TouchEvent) => {\r\n touchMoveEvent.value = e\r\n console.log('onTouchMove', e)\r\n }\r\n\r\n const onLongPress = (e : TouchEvent) => {\r\n longPressEvent.value = e\r\n console.log('onLongPress', e)\r\n }\r\n\r\n const onTouchEnd = (e : TouchEvent) => {\r\n touchEndEvent.value = e\r\n console.log('onTouchEnd', e)\r\n }\r\n\r\n const onTap = (e : PointerEvent) => {\r\n tapEvent.value = e\r\n // tap 和 longPress 在同一个元素上,tap 触发时清除 longPress 事件\r\n longPressEvent.value = null\r\n console.log('onTap', e)\r\n }\r\n\r\n const onClick = (e : PointerEvent) => {\r\n clickEvent.value = e\r\n // click 和 longPress 在同一个元素上,click 触发时清除 longPress 事件\r\n longPressEvent.value = null\r\n console.log('onClick', e)\r\n }\r\n\r\n const clearAllEvents = () => {\r\n touchStartEvent.value = null\r\n touchCancelEvent.value = null\r\n touchMoveEvent.value = null\r\n longPressEvent.value = null\r\n touchEndEvent.value = null\r\n tapEvent.value = null\r\n clickEvent.value = null\r\n }\r\n\r\n defineExpose({\r\n clearAllEvents,\r\n longPressTargetRect\r\n })\r\n</script>\r\n\r\n<style>\r\n .container {\r\n --global-section-title-color: #333;\r\n --global-section-desc-color: #666;\r\n --global-detail-background: #f5f7fa;\r\n --global-title-color: #303133;\r\n --global-surface-background: #fff;\r\n --global-body-color: #606266;\r\n --global-muted-color: #909399;\r\n padding-bottom: 10px;\r\n }\r\n\r\n .section {\r\n margin-bottom: 20px;\r\n }\r\n\r\n .section-title {\r\n font-size: 16px;\r\n font-weight: bold;\r\n color: var(--global-section-title-color, #333);\r\n margin-bottom: 8px;\r\n }\r\n\r\n .section-desc {\r\n font-size: 14px;\r\n color: var(--global-section-desc-color, #666);\r\n margin-bottom: 10px;\r\n }\r\n\r\n .target {\r\n width: 100%;\n height: 200px;\r\n border-radius: 10px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n }\r\n\r\n .touch-area {\r\n background-color: #409eff;\r\n }\r\n\r\n .click-area {\r\n background-color: #67c23a;\r\n }\r\n\r\n .target-text {\r\n color: #fff;\r\n font-size: 16px;\r\n font-weight: bold;\r\n }\r\n\r\n .clear-btn-wrapper {\r\n display: flex;\r\n justify-content: center;\r\n margin: 20px 0;\r\n }\r\n\r\n .clear-btn {\n width: 100%;\n background-color: #f56c6c;\n color: #fff;\n /* #ifndef MP-ALIPAY */\n padding: 12px 0;\n /* #endif */\n border-radius: 6px;\n font-size: 14px;\n }\n\r\n .event-detail {\r\n background-color: var(--global-detail-background, #f5f7fa);\r\n padding: 15px;\r\n border-radius: 8px;\r\n margin-bottom: 20px;\r\n }\r\n\r\n .event-title {\r\n font-size: 18px;\r\n font-weight: bold;\r\n color: var(--global-title-color, #303133);\r\n margin-bottom: 12px;\r\n }\r\n\r\n .event-base-info {\r\n background-color: var(--global-surface-background, #fff);\r\n padding: 10px;\r\n border-radius: 6px;\r\n margin-bottom: 12px;\r\n }\r\n\r\n .info-title {\r\n font-size: 15px;\r\n font-weight: bold;\r\n color: var(--global-body-color, #606266);\r\n margin-bottom: 8px;\r\n }\r\n\r\n .info-row {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n margin-bottom: 8px;\r\n }\r\n\r\n .info-label {\r\n font-size: 14px;\r\n color: var(--global-muted-color, #909399);\r\n flex: 0 0 120px;\r\n max-width: 120px;\r\n margin-right: 10px;\r\n white-space: normal;\r\n }\r\n\r\n .info-value {\r\n font-size: 14px;\r\n color: var(--global-title-color, #303133);\r\n font-weight: bold;\r\n text-align: right;\r\n flex: 1;\r\n min-width: 60px;\r\n white-space: normal;\r\n }\r\n\r\n .touches-title {\r\n font-size: 15px;\r\n font-weight: bold;\r\n color: var(--global-body-color, #606266);\r\n margin-top: 12px;\r\n margin-bottom: 8px;\r\n }\r\n\r\n .touch-item {\r\n background-color: var(--global-surface-background, #fff);\r\n padding: 10px;\r\n border-radius: 6px;\r\n margin-bottom: 10px;\r\n }\r\n\r\n .touch-index {\r\n font-size: 14px;\r\n font-weight: bold;\r\n color: #409eff;\r\n margin-bottom: 8px;\r\n }\r\n\r\n .touch-props {\r\n padding-left: 10px;\r\n }\r\n\r\n .prop-row {\r\n display: flex;\r\n flex-direction: row;\r\n margin-bottom: 6px;\r\n align-items: flex-start;\r\n }\r\n\r\n .prop-label {\r\n font-size: 13px;\r\n color: var(--global-muted-color, #909399);\r\n flex: 0 0 120px;\r\n max-width: 120px;\r\n margin-right: 8px;\r\n white-space: normal;\r\n }\r\n\r\n .prop-value {\r\n font-size: 13px;\r\n color: var(--global-title-color, #303133);\r\n font-weight: bold;\r\n flex: 1;\r\n min-width: 60px;\r\n text-align: right;\r\n white-space: normal;\r\n }\r\n\r\n .title1 {\r\n margin-top: 15px;\r\n font-size: 20px;\r\n }\r\n\r\n .title2 {\r\n margin-top: 10px;\r\n font-size: 18px;\r\n }\r\n\r\n .title3 {\r\n margin-top: 5px;\r\n font-size: 16px;\r\n }\r\n\r\n @media (prefers-color-scheme: dark) {\r\n .container {\r\n --global-section-title-color: #ffffff;\r\n --global-section-desc-color: #a0a0a0;\r\n --global-detail-background: #1a1a1a;\r\n --global-title-color: #ffffff;\r\n --global-surface-background: #2d2d2d;\r\n --global-body-color: #d0d0d0;\r\n --global-muted-color: #a0a0a0;\r\n }\r\n }\r\n\r\n .uni-list-cell {\r\n display: flex;\r\n flex-direction: row;\r\n margin-bottom: 5px;\r\n }\r\n</style>\r\n\n```\n\n:::"},"event-longpress":{"example":"### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/component/global-events/event-longpress.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/component/global-events/event-longpress.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/component/global-events/event-longpress\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/component/global-events/event-longpress\n\n>示例\n```vue\n<template>\n <view>\n <view id=\"longPressView\" style=\"width: 100%;height: 400px;background-color: aquamarine;\" @longpress=\"onLongPress\">\n </view>\n </view>\n</template>\n\n<script setup>\n type DataType = {\n isLongPressTrigger : boolean,\n eventDomRect : DOMRect | null\n }\n\n // 使用reactive包装数据,便于自动化测试获取\n const data = reactive({ isLongPressTrigger: false, eventDomRect: null as DOMRect | null } as DataType)\n\n onReady(() => {\n let element = uni.getElementById(\"longPressView\")\n data.eventDomRect = element?.getBoundingClientRect();\n })\n function onLongPress() {\n data.isLongPressTrigger = true\n console.log(\"longPress\")\n }\n defineExpose({\n data\n })\n</script>\n\n<style>\n\n</style>\n\n```\n\n:::"},"global-events-transform":{"example":"### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/component/global-events/global-events-transform.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/component/global-events/global-events-transform.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/component/global-events/global-events-transform\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/component/global-events/global-events-transform\n\n>示例\n```vue\n<template>\r\n <view>\r\n <view @click=\"onclick\"\r\n style=\"transform: rotate(180deg); background-color: brown;width: 100px; height: 100px; margin: 8px auto;\"\r\n @longpress=\"onLongPress\" id=\"event-transform\">\n <text style=\"text-align: center;line-height: 100px;\">旋转180°后</text>\n </view>\r\n </view>\r\n <text style=\"margin:0px auto;\">点击上面view触发点击事件</text>\r\n</template>\r\n\r\n<script setup lang=\"uts\">\r\n\r\ntype DataType = {\r\n clickTriger: boolean,\r\n longClickTriger: boolean,\r\n}\r\n\r\n// 使用reactive包装数据,便于自动化测试获取\r\nconst data = reactive({\r\n clickTriger: false,\r\n longClickTriger: false,\r\n} as DataType)\r\n\r\nfunction onclick(event : UniPointerEvent) {\r\n data.clickTriger = true\r\n uni.showToast({\r\n title: \"触发了点击事件\"\r\n })\r\n}\r\n\r\nfunction onLongPress(event : UniTouchEvent) {\r\n data.longClickTriger = true\r\n uni.showToast({\r\n title: \"触发了长按事件\"\r\n })\r\n}\r\n\r\ndefineExpose({\r\n data\r\n})\r\n</script>\r\n\r\n<style>\r\n\r\n</style>\r\n\n```\n\n:::"},"touch-events":{"example":"##### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/component/global-events/touch-events.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/component/global-events/touch-events.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/component/global-events/touch-events\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/component/global-events/touch-events\n\n>示例\n```vue\n<template>\n <scroll-view style=\"flex: 1\">\n <page-head title=\"拖拽图标测试相关事件\"></page-head>\n <view class=\"uni-padding-wrap uni-common-mt\" style=\"bottom: 20px;\">\n <navigator url=\"/pages/component/global-events/touch-events-case\" hover-class=\"none\">\n <button type=\"default\">\n stopPropagation / preventDefault\n </button>\n </navigator>\n </view>\n <view class=\"container\">\n <view class=\"view-box\" @touchstart=\"onViewTouchStart\">\n <image class=\"icon\" id=\"icon\" src=\"../image/logo.png\" @touchstart=\"onTouchStart\" @touchcancel=\"onTouchCancel\"\n @touchmove=\"onTouchMove\" @touchend=\"onTouchEnd\"></image>\n </view>\n\n </view>\n <view v-if=\"touchEvent !== null\">\n <text class=\"title1\">touches: </text>\n <template v-for=\"(touch, index) in touchEvent!.touches\" :key=\"index\">\n <text class=\"title2\">touch[{{ index }}]:</text>\n <text>identifier: {{touch.identifier}}</text>\n <text>pageX: {{ touch.pageX }}, pageY: {{ touch.pageY }}</text>\n <text>clientX: {{ touch.clientX }}, clientY: {{ touch.clientY }}</text>\n <text>screenX: {{ touch.screenX }}, screenY: {{ touch.screenY }}</text>\n </template>\n </view>\n </scroll-view>\n</template>\n\n<script setup lang=\"uts\">\ntype DataType = {\n touchTargets: string,\n touchTargetsCount: number,\n iconRect: DOMRect | null,\n}\n\nconst move = ref(false)\nconst posX = ref(0)\nconst posY = ref(0)\nconst lastX = ref(0)\nconst lastY = ref(0)\nconst dragTouchId = ref(-1)\nconst touchEvent = ref(null as TouchEvent | null)\nconst icon = ref(null as UniElement | null)\nconst data = reactive({\n touchTargets: \"\",\n touchTargetsCount: 0,\n iconRect: null as DOMRect | null,\n} as DataType)\n\nfunction onViewTouchStart(e : TouchEvent) {\n data.touchTargets += e.target!.tagName + e.currentTarget!.tagName\n data.touchTargetsCount++\n}\n\nfunction findTouchByIdentifier(touches : Touch[], identifier : number) : Touch | null {\n for (let i = 0; i < touches.length; i++) {\n const touch = touches[i]\n if (touch.identifier == identifier) {\n return touch\n }\n }\n return null\n}\n\nfunction onTouchStart(e : TouchEvent) {\n data.touchTargetsCount++\n data.touchTargets += e.target!.tagName + e.currentTarget!.tagName\n\n touchEvent.value = e\n if (!move.value) {\n const startTouch = e.changedTouches.length > 0 ? e.changedTouches[0] : e.touches[0]\n if (startTouch == null) {\n return\n }\n move.value = true\n dragTouchId.value = startTouch.identifier\n posX.value = startTouch.screenX\n posY.value = startTouch.screenY\n lastX.value = startTouch.screenX\n lastY.value = startTouch.screenY\n }\n}\n\nfunction onTouchMove(e : TouchEvent) {\n e.preventDefault()\n touchEvent.value = e\n let p = findTouchByIdentifier(e.changedTouches, dragTouchId.value)\n if (p == null) {\n p = findTouchByIdentifier(e.touches, dragTouchId.value)\n }\n if (p == null) {\n return\n }\n if (p.screenX == lastX.value && p.screenY == lastY.value) {\n return\n }\n let x = p.screenX - posX.value\n let y = p.screenY - posY.value\n lastX.value = p.screenX\n lastY.value = p.screenY\n icon.value?.style?.setProperty('transform', 'translate(' + x + 'px,' + y + 'px)')\n}\n\nfunction resetIcon() {\n move.value = false;\n posX.value = 0;\n posY.value = 0;\n lastX.value = 0;\n lastY.value = 0;\n dragTouchId.value = -1;\n icon.value?.style?.setProperty('transform', 'translate(0px,0px)')\n}\n\nfunction onTouchEnd(e : TouchEvent) {\n if (findTouchByIdentifier(e.changedTouches, dragTouchId.value) != null) {\n resetIcon()\n touchEvent.value = null\n }\n}\n\nfunction onTouchCancel(event : TouchEvent) {\n resetIcon()\n touchEvent.value = null\n}\n\nonReady(() => {\n icon.value = uni.getElementById(\"icon\")\n // #ifdef APP-IOS || APP-HARMONY\n data.iconRect = icon.value?.getBoundingClientRect() ?? null\n // 加上导航栏及状态栏高度\n if (data.iconRect != null) {\n data.iconRect.y += uni.getSystemInfoSync().safeArea.top + 44\n }\n // #endif\n})\n\ndefineExpose({\n data\n})\n</script>\n\n<style>\n .container {\n width: 100%;\n flex-direction: column;\n align-items: center;\n }\n\n .view-box {\n width: 300px;\n height: 300px;\n align-items: center;\n justify-content: center;\n border-style: solid;\n }\n\n .icon {\n width: 100px;\n height: 100px;\n }\n\n .title1 {\n margin-top: 10px;\n font-size: 18px;\n }\n\n .title2 {\n margin-top: 5px;\n font-size: 16px;\n }\n</style>\n\n```\n\n:::"},"touch-events-bubbles":{"example":"##### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/component/global-events/touch-events-bubbles.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/component/global-events/touch-events-bubbles.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/component/global-events/touch-events-bubbles\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/component/global-events/touch-events-bubbles\n\n>示例\n```vue\n<template>\r\n <scroll-view style=\"flex: 1\">\r\n <page-head title=\"事件冒泡测试\"></page-head>\r\n <view class=\"container\">\r\n <view class=\"view-box\" id=\"view1\" @touchstart=\"onTouchStart\" @touchmove=\"onTouchMove\" @touchend=\"onTouchEnd\">\r\n <view class=\"mid-view\" id=\"view1-2\" @touchstart=\"onTouchStart\" @touchmove=\"onTouchMove\" @touchend=\"onTouchEnd\">\r\n <image class=\"icon\" id=\"view1-3\" src=\"../image/logo.png\" @touchstart=\"onTouchStart\" @touchmove=\"onTouchMove\"\r\n @touchend=\"onTouchEnd\"></image>\r\n </view>\r\n </view>\r\n <view class=\"view-box\" id=\"view2\" @touchstart=\"onTouchStart\" @touchmove=\"onTouchMove\" @touchend=\"onTouchEnd\">\r\n <view class=\"mid-view\" id=\"view2-2\" @touchend=\"onTouchEnd\">\r\n <view style=\"background-color: beige;\" class=\"icon\" id=\"view2-3\" @touchstart=\"onTouchStart\" @touchend=\"onTouchEnd\"></view>\r\n </view>\r\n </view>\r\n\r\n </view>\r\n </scroll-view>\r\n</template>\r\n\r\n<script setup lang=\"uts\">\r\n\r\n\r\ntype DataType = {\r\n iconRect: DOMRect | null,\r\n viewEleRect: DOMRect | null,\r\n ret1: boolean,\r\n ret2: boolean,\r\n}\r\n\r\nconst touchstartValue = ref([] as string[])\r\nconst touchmoveValue = ref([] as string[])\r\nconst touchendValue = ref([] as string[])\r\nconst data = reactive({\r\n iconRect: null as DOMRect | null,\r\n viewEleRect: null as DOMRect | null,\r\n ret1: false,\r\n ret2: false,\r\n} as DataType)\r\n\r\nfunction clearValue() {\r\n touchstartValue.value = []\r\n touchmoveValue.value = []\r\n touchendValue.value = []\r\n}\r\n\r\nfunction isPassTest1() {\r\n let touchStart = touchstartValue.value.join(\"\")\r\n let touchMove = touchmoveValue.value.join(\"\")\r\n let touchEnd = touchendValue.value.join(\"\")\r\n console.log(\"touchStart: \", touchStart)\r\n console.log(\"touchMove: \", touchMove)\r\n console.log(\"touchEnd: \", touchEnd)\r\n\r\n let result = touchStart == \"view1-3view1-2view1\" &&\r\n touchMove == \"view1-3view1-2view1\" &&\r\n touchEnd == \"view1-3view1-2view1\"\r\n console.log('isPassTest1', result)\r\n data.ret1 = result\r\n clearValue()\r\n}\r\n\r\nfunction isPassTest2() {\r\n let touchStart = touchstartValue.value.join(\"\")\r\n let touchMove = touchmoveValue.value.join(\"\")\r\n let touchEnd = touchendValue.value.join(\"\")\r\n console.log(\"touchStart: \", touchStart)\r\n console.log(\"touchMove: \", touchMove)\r\n console.log(\"touchEnd: \", touchEnd)\r\n\r\n let result = touchStart == \"view2-3view2\" &&\r\n touchMove == \"view2\" &&\r\n touchEnd == \"view2-3view2-2view2\"\r\n console.log('isPassTest2', result)\r\n data.ret2 = result\r\n clearValue()\r\n}\r\n\r\nfunction onTouchStart(e : TouchEvent) {\r\n let _id = e.currentTarget!.getAttribute(\"id\") as string\r\n if (!touchstartValue.value.includes(_id)) {\r\n touchstartValue.value.push(_id)\r\n }\r\n console.log('onTouchStart', e.currentTarget!.getAttribute(\"id\"))\r\n}\r\n\r\nfunction onTouchMove(e : TouchEvent) {\r\n let _id = e.currentTarget!.getAttribute(\"id\") as string\r\n if (!touchmoveValue.value.includes(_id)) {\r\n touchmoveValue.value.push(_id)\r\n }\r\n console.log('onTouchMove', e.currentTarget!.getAttribute(\"id\"))\r\n}\r\n\r\nfunction onTouchEnd(e : TouchEvent) {\r\n let _id = e.currentTarget!.getAttribute(\"id\") as string\r\n if (!touchendValue.value.includes(_id)) {\r\n touchendValue.value.push(_id)\r\n }\r\n}\r\n\r\nonReady(() => {\r\n // #ifdef APP-IOS || APP-HARMONY\r\n let iconEle = uni.getElementById(\"view1-3\")\r\n data.iconRect = iconEle?.getBoundingClientRect() ?? null\r\n // 加上导航栏及状态栏高度\r\n if (data.iconRect != null) {\r\n data.iconRect.y += uni.getSystemInfoSync().safeArea.top + 44\r\n }\r\n\r\n let viewEle = uni.getElementById(\"view2-3\")\r\n data.viewEleRect = viewEle?.getBoundingClientRect() ?? null\r\n // 加上导航栏及状态栏高度\r\n if (data.viewEleRect != null) {\r\n data.viewEleRect.y += uni.getSystemInfoSync().safeArea.top + 44\r\n }\r\n\r\n // #endif\r\n})\r\n\r\ndefineExpose({\r\n data,\r\n isPassTest1,\r\n isPassTest2\r\n})\r\n</script>\r\n\r\n<style>\r\n .container {\r\n width: 100%;\r\n height: 80%;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: space-between;\r\n }\r\n\r\n .view-box {\r\n width: 200px;\r\n height: 200px;\r\n align-items: center;\r\n justify-content: center;\r\n border-style: solid;\r\n }\r\n\r\n .mid-view {\r\n width: 150px;\r\n height: 150px;\r\n align-items: center;\r\n justify-content: center;\r\n background-color: aqua;\r\n }\r\n\r\n .icon {\r\n width: 100px;\r\n height: 100px;\r\n }\r\n</style>\r\n\n```\n\n:::"},"touch-events-case":{"example":"##### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/component/global-events/touch-events-case.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/component/global-events/touch-events-case.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/component/global-events/touch-events-case\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/component/global-events/touch-events-case\n\n>示例\n```vue\n<template>\n\t<view>\n\t\t<swiper ref=\"header\" class=\"h-300\" indicator-dots=\"true\" circular=\"true\" @change=\"swiperChange\" @touchstart=\"swiperTouchStart\" @touchmove=\"swiperTouchMove\" @touchend=\"swiperTouchEnd\">\n\t\t\t<swiper-item v-for=\"i in 3\" :item-id=\"i + ''\" @touchstart=\"swiperItemTouchStart\" @touchmove=\"swiperItemTouchMove\" @touchend=\"swiperItemTouchEnd\">\n\t\t\t\t<view class=\"h-300 header-tiem\" @touchstart=\"viewTouchStart\" @touchmove=\"viewTouchMove\" @touchend=\"viewTouchEnd\">\n\t\t\t\t\t<text>{{ i }}</text>\n\t\t\t\t</view>\n\t\t\t</swiper-item>\n\t\t</swiper>\n <view class=\"content\">\n <boolean-data :defaultValue=\"false\" title=\"stopPropagation\" @change=\"changeStopPropagation\"></boolean-data>\n <boolean-data :defaultValue=\"false\" title=\"preventDefault\" @change=\"changePreventDefault\"></boolean-data>\n <text style=\"padding: 10px;\">{{ touchResult }}</text>\n <view class=\"uni-padding-wrap uni-common-mt\" style=\"bottom: 20px;\">\n <navigator url=\"/pages/component/global-events/touch-events-preventDefault\" hover-class=\"none\">\n <button type=\"default\" class=\"button\">\n 测试 preventDefault\n </button>\n </navigator>\n </view>\n </view>\n\t</view>\n</template>\n\n<script setup lang=\"uts\">\n\n\ntype DataType = {\n swiperChangeEvent: boolean,\n viewTouchEvent: boolean,\n swiperItemTouchEvent: boolean,\n swiperTouchEvent: boolean,\n}\n\nconst stopPropagation = ref(false)\nconst preventDefault = ref(false)\nconst touchResult = ref(\"\")\nconst data = reactive({\n swiperChangeEvent: false,\n viewTouchEvent: false,\n swiperItemTouchEvent: false,\n swiperTouchEvent: false,\n} as DataType)\n\nfunction changeStopPropagation(value: boolean) {\n stopPropagation.value = value\n}\n\nfunction changePreventDefault(value: boolean) {\n preventDefault.value = value\n}\n\nfunction swiperChange(e: UniSwiperChangeEvent) {\n console.log(\"swiperChange\", e.detail.current)\n data.swiperChangeEvent = true\n}\n\nfunction viewTouchStart(e: UniTouchEvent) {\n console.log(\"viewTouchStart\")\n touchResult.value = \"viewTouchStart\"\n data.viewTouchEvent = true\n if (stopPropagation.value) e.stopPropagation()\n if (preventDefault.value) e.preventDefault()\n}\n\nfunction viewTouchMove(e: UniTouchEvent) {\n console.log(\"viewTouchMove\")\n touchResult.value = \"viewTouchMove\"\n data.viewTouchEvent = true\n if (stopPropagation.value) e.stopPropagation()\n if (preventDefault.value) e.preventDefault()\n}\n\nfunction viewTouchEnd(e: UniTouchEvent) {\n console.log(\"viewTouchEnd\")\n touchResult.value = \"viewTouchEnd\"\n if (stopPropagation.value) e.stopPropagation()\n}\n\nfunction swiperItemTouchStart(e: UniTouchEvent) {\n console.log(\"swiperItemTouchStart\")\n touchResult.value += \" -> swiperItemTouchStart\"\n data.swiperItemTouchEvent = true\n}\n\nfunction swiperItemTouchMove(e: UniTouchEvent) {\n console.log(\"swiperItemTouchMove\")\n touchResult.value += \" -> swiperItemTouchMove\"\n}\n\nfunction swiperItemTouchEnd(e: UniTouchEvent) {\n console.log(\"swiperItemTouchEnd\")\n touchResult.value += \" -> swiperItemTouchEnd\"\n}\n\nfunction swiperTouchStart(e: UniTouchEvent) {\n console.log(\"swiperTouchStart\")\n touchResult.value += \" -> swiperTouchStart\"\n data.swiperTouchEvent = true\n}\n\nfunction swiperTouchMove(e: UniTouchEvent) {\n console.log(\"swiperTouchMove\")\n touchResult.value += \" -> swiperTouchMove\"\n}\n\nfunction swiperTouchEnd(e: UniTouchEvent) {\n console.log(\"swiperTouchEnd\")\n touchResult.value += \" -> swiperTouchEnd\"\n}\n\nfunction resetEvent() {\n data.swiperChangeEvent = false\n data.viewTouchEvent = false\n data.swiperItemTouchEvent = false\n data.swiperTouchEvent = false\n stopPropagation.value = true\n preventDefault.value = true\n}\n\nfunction isPassTest1() {\n console.log(\"swiperChangeEvent:\", data.swiperChangeEvent)\n return data.swiperChangeEvent == false\n}\n\nfunction isPassTest2() {\n console.log(\"viewTouchEvent:\", data.viewTouchEvent)\n console.log(\"swiperItemTouchEvent:\", data.swiperItemTouchEvent)\n console.log(\"swiperTouchEvent:\", data.swiperTouchEvent)\n return data.viewTouchEvent == true && data.swiperItemTouchEvent == true && data.swiperTouchEvent == true\n}\n\ndefineExpose({\n data,\n resetEvent\n})\n</script>\n\n<style>\n .h-300{\n height: 300px;\n }\n\n\t.header-tiem {\n\t\tbackground-color: #89ff8d;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t}\n</style>\n\n```\n\n:::"},"touch-events-preventDefault-click":{"example":"###### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/component/global-events/touch-events-preventDefault-click.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/component/global-events/touch-events-preventDefault-click.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/component/global-events/touch-events-preventDefault-click\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/component/global-events/touch-events-preventDefault-click\n\n>示例\n```vue\n<template>\n <view>\n <view @touchend=\"onParentTouchEnd\" @click=\"onParentClick\"\n style=\"padding-bottom: 100px; background-color: darkgrey;\">\n <view id=\"eventClick\" @touchend=\"onTouchEnd\" style=\"width:100%;height: 300px; background-color: yellow;\"\n @click=\"onClick\">\n </view>\n </view>\n </view>\n</template>\n\n<script setup>\n type DataType = {\n isParentPreventDefault : boolean,\n isPreventDefault : boolean,\n isParentClickTrigger : boolean,\n isClickTrigger : boolean,\n eventDomRect : DOMRect | null\n }\n\n const data = reactive({\n isParentPreventDefault: false,\n isPreventDefault: false,\n isParentClickTrigger: false,\n isClickTrigger: false,\n eventDomRect: null as DOMRect | null,\n } as DataType)\n defineExpose({\n data\n })\n\n onReady(() => {\n var element = uni.getElementById(\"eventClick\")\n data.eventDomRect = element?.getBoundingClientRect()\n })\n const onTouchEnd = (e : UniTouchEvent) => {\n if (data.isPreventDefault) {\n console.log(\"执行了preventDefault,不再触发点击事件\")\n e.preventDefault()\n }\n }\n\n const onParentTouchEnd = (e : UniTouchEvent) => {\n if (data.isParentPreventDefault) {\n console.log(\"执行了父的preventDefault,不再触发点击事件\")\n e.preventDefault()\n }\n }\n\n const onClick = () => {\n console.log(\"触发了点击事件\")\n data.isClickTrigger = true\n }\n\n const onParentClick = () => {\n console.log(\"触发了父的点击事件\")\n data.isParentClickTrigger = true\n }\n</script>\n\n<style>\n\n</style>\n\n```\n\n:::"},"touch-events-preventDefault":{"example":"###### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/component/global-events/touch-events-preventDefault.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/component/global-events/touch-events-preventDefault.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/component/global-events/touch-events-preventDefault\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/component/global-events/touch-events-preventDefault\n\n>示例\n```vue\n<template>\n <view style=\"flex: 1;\">\n <page-head title=\"横向滑动时阻止默认事件,即阻止页面滚动\"></page-head>\n <view class=\"uni-padding-wrap uni-common-mt\" style=\"height: 40px; align-items: center;\">\n <text>手势方向:{{direction}}</text>\n </view>\n <scroll-view style=\"flex: 1;\" @scroll=\"onScroll\">\n \t<view v-for=\"item in 120\" :key=\"item\" class=\"box\" @touchstart=\"touchstart\" @touchmove=\"touchmove\" @touchend=\"touchend\">\n \t\t{{item}}\n \t</view>\n </scroll-view>\n </view>\n</template>\n\n<script setup>\n const scrollTop = reactive({\n value: 0\n })\n\n defineExpose({\n scrollTop\n })\n\n\tfunction getDirection(x : number, y : number) {\n\t\tif (x > y && x > 10) {\n\t\t\treturn 'horizontal';\n\t\t}\n\t\tif (y > x && y > 10) {\n\t\t\treturn 'vertical';\n\t\t}\n\t\treturn '';\n\t}\n\tconst startX = ref(0)\n\tconst startY = ref(0)\n\tconst direction = ref(\"\")\n\n\tfunction touchstart(e : UniTouchEvent) {\n\t\tdirection.value = \"\"\n\t\tstartX.value = e.touches[0].clientX\n\t\tstartY.value = e.touches[0].clientY\n\t}\n\n\tfunction touchend(e : UniTouchEvent) {\n\t\tconsole.log('>>>>> touchend')\n\t\tdirection.value = \"\"\n\t}\n\n\tfunction touchmove(e : UniTouchEvent) {\n\n\t\tconst deltaX = e.touches[0].clientX - startX.value\n\t\tconst deltaY = e.touches[0].clientY - startY.value\n\t\tif (direction.value == \"\") {\n\t\t\tdirection.value = getDirection(Math.abs(deltaX), Math.abs(deltaY))\n\t\t}\n\n\t\t//只有横向滑动时才阻止默认事件,即阻止页面滚动\n\t\tif (direction.value != 'horizontal') {\n\t\t\treturn\n\t\t}\n\n\n\t\tif (e.cancelable) {\n\t\t\te.preventDefault()\n\t\t}\n\t}\n\n\tfunction onScroll(e: UniScrollEvent) {\n\t\tconsole.log('>>>>> onScroll', e.detail.scrollTop)\n\t\tscrollTop[\"value\"] = e.detail.scrollTop\n\t}\n</script>\n\n<style scoped>\n\t.box {\n\t\tborder-bottom: 1px solid #c6d1c3;\n\t\tpadding: 16px 10px;\n\t}\n</style>\n\n```\n\n:::"},"transition-events":{"example":"##### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/component/global-events/transition-events.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/component/global-events/transition-events.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/component/global-events/transition-events\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/component/global-events/transition-events\n\n>示例\n```vue\n<template>\r\n <!-- #ifdef APP -->\r\n <scroll-view style=\"flex:1;\" v-if=\"isShow\">\r\n <!-- #endif -->\r\n <image class=\"transition-transform\" id=\"transition-transform\" @transitionend=\"onEnd\" src=\"/static/test-image/logo.png\"></image>\r\n <text class=\"adjust\">对图片设置transform进行旋转,在旋转完成的transitionend事件后,继续旋转</text>\r\n <button class=\"adjust\" @click=\"switchBtn\">{{buttonValue}}</button>\r\n <!-- #ifdef APP -->\r\n </scroll-view>\r\n <!-- #endif -->\r\n</template>\r\n\r\n<script setup lang=\"uts\">\r\n\r\ntype DataType = {\r\n onTransitionEndTriggr: boolean,\r\n}\r\n\r\nlet times = 0\r\nlet element: UniElement | null = null\r\nlet isStart = false\r\nconst buttonValue = ref(\"开启图片旋转\")\r\nconst data = reactive({\r\n onTransitionEndTriggr: false,\r\n} as DataType)\r\nconst isShow = ref(false)\r\n\r\nfunction switchBtn() {\r\n if (!isStart) {\r\n if (element == null) {\r\n element = uni.getElementById('transition-transform')\r\n }\r\n buttonValue.value = \"关闭图片旋转\"\r\n times = times + 1\r\n element!.style.setProperty('transition-duration', '2000ms')\r\n element!.style.setProperty('transform', 'rotate(' + times * 360 + 'deg)')\r\n isStart = true\r\n } else {\r\n isStart = false\r\n times = 0\r\n data.onTransitionEndTriggr = false\r\n buttonValue.value = \"开启图片旋转\"\r\n element!.style.setProperty('transition-duration', '0ms')\r\n element!.style.setProperty('transform', 'rotate(0deg)')\r\n }\r\n}\r\n\r\nfunction onEnd() {\r\n console.log('transform transitionend')\r\n if (isStart) {\r\n times = times + 1\r\n element!.style.setProperty('transform', 'rotate(' + times * 360 + 'deg)')\r\n data.onTransitionEndTriggr = true\r\n }\r\n}\r\n\r\nonReady(() => {\r\n // onReady中动态修改isShow是为了验证非蒸气模式下在安卓手机上子线程中创建节点可能会崩溃的问题,不具备代码参考性。\r\n // #ifdef APP-ANDROID && !VUE3-VAPOR\n class ThreadRunnable extends Runnable {\n override run() {\n isShow.value = true\n }\n }\n new Thread(new ThreadRunnable()).start()\n // #endif\n // #ifndef APP-ANDROID && !VUE3-VAPOR\n isShow.value = true\n // #endif\n})\n\r\ndefineExpose({\r\n data,\r\n switchBtn\r\n})\r\n</script>\r\n\r\n<style>\r\n .adjust {\r\n margin: 10px;\r\n }\r\n\r\n .transition-transform {\r\n width: 192px;\r\n height: 192px;\r\n margin: 16px auto;\r\n /* border-radius: 50%; */\r\n transition-property: transform;\r\n transition-timing-function: linear;\r\n transform: rotate(0deg);\r\n }\r\n</style>\r\n\n```\n\n:::"},"animation-frame":{"example":"### 示例 \n 示例为[hello uni-app x alpha分支](https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/API/animation-frame/animation-frame.uvue),与最新HBuilderX Alpha版同步。与最新正式版同步的master分支示例[另见](https://gitcode.com/dcloud/hello-uni-app-x/blob/master//pages/API/animation-frame/animation-frame.uvue) \n::: preview https://hellouniappx.dcloud.net.cn/web/#/pages/API/animation-frame/animation-frame\n\n> appRedirect https://hellouniappx.dcloud.net.cn/appredirect.html?path=pages/API/animation-frame/animation-frame\n\n>示例\n```vue\n<template>\r\n <view class=\"page\">\n <page-head :title=\"data.title\"></page-head>\n <button @click=\"startRequestAnimationFrame\">requestAnimationFrame</button>\n <button @click=\"stopRequestAnimationFrame\">cancelAnimationFrame</button>\n <text class=\"frame-count\">FPS: {{data.FPSString}}</text>\n <text class=\"frame-count\">FrameCount: {{data.testFrameCount}}</text>\n <text class=\"tips\">提示: 重复点击会忽略重复启动,避免创建多个并行的 requestAnimationFrame 循环</text>\n </view>\n</template>\n\r\n<script setup lang=\"uts\">\r\n type DataType = {\n title: string;\n taskId: number;\n isRunning: boolean;\n FPSString: string;\n lastTime: number;\n frameCount: number;\n testFrameCount: number;\n }\r\n\r\n const initialData: DataType = {\n title: 'AnimationFrame',\n taskId: 0,\n isRunning: false,\n FPSString: '- / -ms',\n lastTime: 0,\n frameCount: 0,\n testFrameCount: 0\n }\n\n const data = reactive<DataType>(initialData)\n\r\n const updateFPS = (timestamp : number) => {\r\n data.frameCount++\r\n if (timestamp - data.lastTime >= 1000) {\r\n const timeOfFrame = (1000 / data.frameCount)\r\n data.FPSString = `${data.frameCount} / ${timeOfFrame.toFixed(3)}ms`\r\n data.frameCount = 0\r\n data.lastTime = timestamp\r\n }\r\n }\r\n\n type RunAnimationFrameType = (timestamp : number) => void\n let runAnimationFrame: RunAnimationFrameType = (timestamp : number) => {}\r\n runAnimationFrame = (timestamp : number) => {\n if (!data.isRunning) {\n return\n }\n updateFPS(timestamp)\n data.testFrameCount++\n data.taskId = requestAnimationFrame(runAnimationFrame)\n }\n\n type StartRequestAnimationFrameType = () => void\n let startRequestAnimationFrame: StartRequestAnimationFrameType = () => {}\n startRequestAnimationFrame = () => {\n if (data.isRunning) {\n return\n }\n data.isRunning = true\n data.taskId = requestAnimationFrame(runAnimationFrame)\n }\n\n const stopRequestAnimationFrame = () => {\n if (data.taskId > 0) {\n cancelAnimationFrame(data.taskId)\n }\n data.taskId = 0\n data.isRunning = false\n data.lastTime = 0\n data.frameCount = 0\n data.testFrameCount = 0\n data.FPSString = '- / -ms'\n }\n\r\n onUnload(() => {\r\n if (data.taskId > 0) {\r\n stopRequestAnimationFrame()\r\n }\r\n })\r\n\r\n defineExpose({\r\n data,\r\n startRequestAnimationFrame,\r\n stopRequestAnimationFrame\r\n })\r\n</script>\r\n\r\n<style>\r\n .page {\r\n padding: 15px;\r\n }\r\n\r\n .frame-count {\r\n margin-top: 15px;\r\n }\r\n\r\n .tips {\r\n font-size: 12px;\r\n margin-top: 30px;\r\n opacity: 0.7;\r\n }\r\n</style>\r\n\n```\n\n:::"}}