openharmony 鸿蒙 js-apis-inner-commonEvent-commonEventData

2025-06-12 浏览 (1)

CommonEventData

Common event data.

NOTE

The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.

Attributes

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.Notification.CommonEvent

NameTypeRead OnlyOptionalDescription
eventstringNoNoName of the common event that is being received.
bundleNamestringNoYesBundle name. This parameter is left empty by default.
codenumberNoYesCommon event data received by the subscriber. The value of this field is the same as that of the code field in CommonEventPublishData when the publisher uses commonEventManager.publish to publish a common event. The default value is 0.
datastringNoYesCommon event data received by the subscriber. The value of this field is the same as that of the data field in CommonEventPublishData when the publisher uses commonEventManager.publish to publish a common event.
parameters{[key: string]: any}NoYesAdditional information about the common event received by the subscriber. The value of this field is the same as that of the parameters field in CommonEventPublishData when the publisher uses commonEventManager.publish to publish a common event.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Basic Services Kit

harmony 鸿蒙DeviceInfo

harmony 鸿蒙InitSync

harmony 鸿蒙OH_Print

harmony 鸿蒙OsAccount

harmony 鸿蒙Pasteboard

harmony 鸿蒙Print_Margin

harmony 鸿蒙Print_PageSize

harmony 鸿蒙Print_PrintAttributes

harmony 鸿蒙Print_PrintDocCallback

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