Adding a Container To assemble the basic elements of a page, you need a container component. The <div>, <list>, and <tabs> components are commonly used for laying out page elements.
阅读全文
openharmony 鸿蒙 ui-js-building-ui-layout-comment
Adding a Comment Area The comment component allows users to input messages and submit them by clicking the confirm button. Submitted comments are displayed in the comment area, where users can delete
阅读全文
openharmony 鸿蒙 ui-js-building-ui-interactions
Adding Interactions You can make the UI interactive by binding events to components. This topic describes how to associate a click event with <div>, <text>, and <image> components to
阅读全文
openharmony 鸿蒙 ui-js-building-ui-event
Defining Gesture Events A gesture represents a semantic action (for example, touch, click, or long press) recognized from one or more input events. A gesture lifecycle may consist of multiple sequenti
阅读全文
openharmony 鸿蒙 ui-js-building-ui-component
Component Overview A component is the core of a page. Each component is an independent visual and interactive functional unit through simple encapsulation of data and methods. They are independent of
阅读全文
openharmony 鸿蒙 ui-js-building-ui-animation
Developing Animations Animations are classified into static animation and continuous animation. Static Animation The transform attributes are the core of the static animation. A static animation can t
阅读全文
openharmony 鸿蒙 ui-js-animate-transform
Animation with the transform Attribute Set the transform attribute for component rotation, scaling, translation, and skewing. Designing Static Animation Create a square and rotate it by 90 degrees to
阅读全文
openharmony 鸿蒙 ui-js-animate-svg
Animation for SVG Components You can use child components in the <svg> component to animate attributes over time. Attribute Style Animation In the animate child component of the <svg> comp
阅读全文
openharmony 鸿蒙 ui-js-animate-frame
Animation Frame Requesting an Animation Frame Use the requestAnimationFrame method to request frames on a per-frame basis. This method accepts a callback function as its argument. When runframe calls
阅读全文
openharmony 鸿蒙 ui-js-animate-dynamic-effects
Animation Effect You can set the interpolator to implement the animation effect. Creating an Animation Object Use createAnimator to create an animation object and set the animation attributes by using
阅读全文