openharmony 鸿蒙 ts-custom-component-parameter

2026-08-25 浏览 (1)

自定义组件参数

说明:

本模块首批接口从API version 11开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。

ComponentOptions

自定义组件参数,用于配置是否支持组件冻结。

卡片能力: 从API version 11开始,该接口支持在ArkTS卡片中使用。

原子化服务API: 从API version 12开始,该接口支持在原子化服务中使用。

系统能力: SystemCapability.ArkUI.ArkUI.Full

说明:

从API version 11开始,支持通过此参数配置@Component组件冻结。例子可见自定义组件冻结

从API version 12开始,支持通过此参数配置@ComponentV2组件冻结。例子可见自定义组件冻结

名称类型只读可选说明
freezeWhenInactiveboolean配置自定义组件支持组件冻结。true:开启组件冻结,false:不开启组件冻结。当开发者未指定ComponentOptions时,freezeWhenInactive将使用false作为默认值。

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 ts-drawing-components-shape

openharmony 鸿蒙 ts-universal-attributes-sharp-clipping

openharmony 鸿蒙 ts-universal-attributes-toolbar

openharmony 鸿蒙 ts-container-lazyvgridlayout

openharmony 鸿蒙 ohos-arkui-advanced-FoldSplitContainer

openharmony 鸿蒙 ts-methods-calendarpicker-dialog

openharmony 鸿蒙 ts-uicommonevent

openharmony 鸿蒙 ts-basic-gestures-tapgesture

openharmony 鸿蒙 ohos-arkui-advanced-DialogV2

openharmony 鸿蒙 ts-components-canvas-canvas

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