English
flow.approval.reject.mode.list.render.before
About 205 wordsLess than 1 minute
2025-11-24
This hook is used before the reject mode list is rendered during approval rejection. It can be used to hide or show reject modes.
Note: This hook is used before the reject mode list is rendered during approval rejection and can be used to hide or show reject modes.
rejectWayList.splice
This method can be used to display or hide reject modes.
Parameters
| Parameter | Description | Type |
|---|---|---|
| pageData | Parameters passed through by the button | Object |
| rejectWayList | Reject modes | Array |
Note: The passed-through id must not be changed, otherwise it will be invalid.

Parameter Code Example
// Hide the first reject mode
rejectWayList.splice(0, 1);Code Example
module.exports = function (context, pluginService, pluginParam) {
return {
apply() {
let self = this;
return [
{
/**
* Reject mode
*/
event: "flow.approval.reject.mode.list.render.before",
functional: async function (context, options) {
let rejectWayList = options && options.rejectWayList;
rejectWayList.push({
id: "haha",
label: "Plugin-added reject mode"
});
rejectWayList.splice(0, 1); // Hide the first reject mode
return Promise.resolve({
rejectWayList: rejectWayList
});
}
}
];
}
};
};
