English
getLayout
About 111 wordsLess than 1 minute
2025-09-22
This method synchronously returns the layout data of the current detail object, taken from the layout field returned by the detail page interface.

Parameters
None
Return Value
Only some fields are listed below.
| Field | Description | Type |
|---|---|---|
| api_name | Object apiName | String |
| button_style | Action button layout style | Object |
| buttons | Action button array | Array |
| components | Related component array | Array |
| Other fields | — | — |
Code Example
Inside the plugin:
module.exports = function (context, pluginService, pluginParam) {
return {
apply() {
return [
{
event: 'detail.render.before',
functional: function (pluginExecResult, options) {
console.log('custom plugin: detail.render.before exec')
// Get the layout data of the current detail object
console.log(context.getLayout())
}
}
]
}
}
}