English
appFramework.render.before
About 157 wordsLess than 1 minute
2026-08-10
Fired before re-rendering triggered by in-app route changes.
Usage
Perform additional business actions before rendering, including but not limited to:
- Preload necessary data or resources before rendering a page
- Initialize page settings and configuration before rendering
- Display user guidance or prompt messages before rendering
Parameters
| Parameter | Description | Type |
|---|---|---|
| Common Parameters | See details | -- |
| options | Parameters required for application rendering | Object |
options
| Parameter | Description | Type |
|---|---|---|
| appId | Application appId | String |
| parameters | Parameters required to render the first menu page | Array |
| component | Component name to render | String |
| route | Page path for special business (e.g. bi) | String |
Basic Example
export default class Plugin {
apply() {
return [{
event: 'appFramework.render.before',
functional: this.renderBefore.bind(this)
}]
}
renderBefore(plugin, { options }) {
console.log(options.appId);
console.log(options.component);
return Promise.resolve();
}
}Notes
1. This hook fires on every route change
Switching between different pages within the same application will trigger this hook multiple times, with the parameters changing accordingly.
