简体中文
getDescribe
约 184 字小于 1 分钟
2025-09-22
该方法同步返回当前详情对象的描述数据,取自详情页接口返回的 describe 字段值。

参数
无
返回结果
仅列举部分字段数据
| 字段 | 说明 | 类型 |
|---|---|---|
| api_name | 对象apiName | String |
| display_name | 对象的名称 | String |
| fields | 对象的所有字段 | Object |
| 其他字段 | — | — |
代码示例
插件内:
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')
// 获取当前详情对象的描述数据
console.log(context.getDescribe())
}
}
]
}
}
}注意
禁止修改对象描述数据中的任何属性,可能导致不可预期的结果。
context.getDescribe().testkey = '' // 禁止 let describe = context.getDescribe() describe.testkey = '' // 禁止 describe.fields.testkey = '' // 禁止
