harmony 鸿蒙Universal Attributes

2023-06-24 浏览 (801)

Universal Attributes

Common Attributes

Common attributes are used to set component identities and appearance.

NameTypeMandatoryDescription
idstringNoUnique ID of the component.
stylestringNoStyle declaration of the component.
classstringNoStyle class of the component, which is used to refer to a style table.
refstringNoReference information of child elements, which is registered with the parent component on $refs.

Rendering Attributes

Rendering attributes are used to set whether a component is rendered.

NameTypeDescription
forArrayExpands the current element based on the configured data list.
ifbooleanWhether the element is added or removed.
showbooleanWhether the element is displayed or hidden.

NOTE

Do not set styles in attribute fields.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙JavaScript-compatible Web-like Development Paradigm (ArkUI.Lite)

harmony 鸿蒙Universal Events

harmony 鸿蒙Universal Styles

harmony 鸿蒙chart

harmony 鸿蒙image-animator

harmony 鸿蒙image

harmony 鸿蒙input

harmony 鸿蒙marquee

harmony 鸿蒙picker-view

harmony 鸿蒙progress

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/9fcaf9b2d2d348f1aa103ca98db3ebb7