English
detail.parse.before
About 196 wordsLess than 1 minute
2025-12-16
This hook is triggered before the detail page processes data. Process or modify detail page data before rendering the object detail page.
Parameters
| Parameter | Description | Type | Allowed Values | Default |
|---|---|---|---|---|
| Common parameters | See details | -- | -- | -- |
| data | Object detail data returned by the interface, including detail layout, detail data, etc. | Object | -- | -- |
Return Value
| Parameter | Description | Type | Allowed Values | Default |
|---|---|---|---|---|
| data | Data required for rendering the object detail page, following the data structure returned by the interface | Object | -- | -- |
Basic Example
Basic Usage:
export default class Plugin {
apply() {
return [{
event: 'detail.parse.before',
functional: this.renderBefore.bind(this)
}]
}
renderBefore(plugin, context) {
// Modify interface data
return Promise.resolve(context.data);
}
}Whether Tabs Support Memory
export default class Plugin {
apply() {
return [{
event: 'detail.parse.before',
functional: this.renderBefore.bind(this)
}]
}
renderBefore(plugin, context) {
return Promise.resolve({
tabsMemoryTab: false // true = remember, false = do not remember, default is do not remember
});
}
}Whether the Right-Side Area Supports Default Collapse
export default class Plugin {
apply() {
return [{
event: 'detail.parse.before',
functional: this.renderBefore.bind(this)
}]
}
renderBefore(plugin, context) {
return Promise.resolve({
miniSide: false // true = collapse, false = expand, by default uses local cached data
});
}
}Notes
1. Refreshing the detail page will also trigger this hook
