简体中文
getDescribe
约 107 字小于 1 分钟
2025-12-16
dataGetter.getDescribe() 用于获取当前对象的对象描述。
参数
无
返回值
Object res
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| api_name | 对象apiName | String | -- |
| display_name | 对象显示名称 | String | -- |
| fields | 对象字段描述数据 | Object | -- |
基础示例
export default class Plugin {
apply() {
return [{
event: 'detail.render.before',
functional: this.renderBefore.bind(this)
}]
}
renderBefore(context, plugin) {
const objDescribe = context.dataGetter.getDescribe();
console.log(objDescribe);
console.log(objDescribe.fields);
}
}