Skip to main content
Version: v3

emitCustomSystemEvent

Start from API_LEVEL 3.0 . Please refer to API_LEVEL.

The Mini Program can customize the system events and can actively dispatch the custom system events.

Type

function emitCustomSystemEvent(option: Option): void

Parameters

Option

PropertyTypeRequiredDefaultValueDescriptionAPI_LEVEL
eventNamestringY-Customize event names that meet the naming convention of event:customize.${event}3.0
eventParamstringY-Custom event parameters, this parameter is passed to the onInit lifecycle function of the AppService constructor3.0

Example

import { emitCustomSystemEvent } from '@zos/app'

emitCustomSystemEvent({
eventName: 'event:customize.test',
eventParam: 'eventName=event:customize.test&type=0',
})