English
appFramework.destroy.before
About 74 wordsLess than 1 minute
2026-08-10
Fired before the application is destroyed.
Usage
Perform additional business actions before the application is destroyed, including but not limited to:
- Unbind events
- Destroy components
- Clear variables
Parameters
| Parameter | Description | Type |
|---|---|---|
| options | Parameters required for application rendering | Object |
options
| Parameter | Description | Type |
|---|---|---|
| appId | Application appId | String |
Basic Example
export default class Plugin {
apply() {
return [{
event: 'appFramework.destroy.before',
functional: this.destroyBefore.bind(this)
}]
}
destroyBefore(plugin, { options }) {
this.vm.destroy();
this.vm = null;
return Promise.resolve();
}
}