简体中文
md.tile.before
约 247 字小于 1 分钟
2025-12-15
该钩子发生在从对象平铺页面展开之前。 对展开的从对象进行一些定制
指定页面显示列数
指定页面图片字段显示尺寸
是否隐藏关闭按钮
隐藏某些字段
参数
| 参数 | 说明 | 类型 |
|---|---|---|
| 通用参数 | 详见 | -- |
| objApiName | 从对象apiName | String |
| recordType | 从对象业务类型 | String |
返回结果
| 参数 | 说明 | 类型 | 默认值 | |
|---|---|---|---|---|
| viewColumns | 指定展开的页面默认显示列数 | Number | 自适应 | -- |
| imageSize | 指定展开页面图片字段图片显示尺寸 | Object | -- | |
| hideColse | 隐藏关闭按钮 | Boolean | -- | |
| hideFields | 隐藏某些字段 | Array | -- |
基础示例
隐藏指定字段/指定显示列
export default class Plugin {
apply() {
return [{
event: 'md.tile.before',
functional: this.mdTileBefore.bind(this)
}]
}
//如果是vcrm项目的中台插件需要交互参数位置
//mdTileBefore(plugin, context)
mdTileBefore(context, plugin) {
//const { dataGetter, dataUpdater, newDataIndexs, objApiName } = context;
return Promise.resolve({
hideFields: ['name'],
viewColumns: 1//以单列显示,可传 1 2 3 4
})
}
}