English
flow.approval.detail.approval.content.render.before
About 491 wordsAbout 2 min
2025-11-24
flow.approval.detail.approval.content.render.before
Note: This hook is triggered before the approval detail content is rendered.
1. customComponten
Feature Description
This method can be used to customize the approval content area and its sub-area components.
Parameters
| Parameter | Description | Type |
|---|---|---|
| options | This parameter contains the approval content area data inside controlArg | Object |

Return Value
| Parameter | Description | Type | Allowed Values | Default |
|---|---|---|---|---|
| objectDetailCardEnable | Whether the custom component configured in customComponten should also take effect in the approval card of the object detail page | Boolean | true/false | false |
| customComponten | Configured custom approval content component | Object | - |

Parameter Code Example
See the full code example below.
Code Example
event: "flow.approval.detail.approval.content.render.before",
functional: async function (context, options) {
console.error("flow.approval.detail.approval.content.render.before start")
console.error(context)
console.error(options)
console.error("flow.approval.detail.approval.content.render.before end")
return Promise.resolve({
// Whether the custom components below should also take effect in the approval card on the object detail page
objectDetailCardEnable: true,
customComponten: {
'approval-content-operation-com': {
resource: "custom_plugin", // required, fixed value
prop: { // custom properties of the plugin field component
test: 1,
pluginInfo: pluginParam.describe, // fixed parameter
comInfo: { // required, plugin component information
name: "operation-com", // required, the custom component name, pointing to the key under the components node in the root config.json file
prop: options, // custom component properties, passed through to the custom component's customProp property, no format restriction
},
}
},
'approval-content-instance-title-com': {
resource: "custom_plugin", // required, fixed value
prop: { // custom properties of the plugin field component
test: 1,
pluginInfo: pluginParam.describe, // fixed parameter
comInfo: { // required, plugin component information
name: "instance-title", // required, the custom component name, pointing to the key under the components node in the root config.json file
prop: options, // custom component properties, passed through to the custom component's customProp property, no format restriction
},
}
}
},
});
}
Notes
Area description:

return Promise.resolve({
// Whether the custom components below should also take effect in the approval card on the object detail page
objectDetailCardEnable: true,
customComponten: {
// change-detail: change information, this component replaces the entire change area including the content and the row for viewing change information
// change-detail-changeinfo: the row for viewing child-object change information
// change-detail-content: change information form
// button-param: button parameter form
// approval-form: approval form
// approval-related-form: child object information (child object name) (only takes effect in approval detail)
// approval-content-instance-title-com: instance name
// approval-content-operation-com: trigger operation (only takes effect in approval detail)
}
})