简体中文
list.render.after
约 194 字小于 1 分钟
2025-12-16
该钩子在渲染对象表格之后调用。 列表渲染后执行额外的动作
参数
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
| 列表通用参数 | 详见 | object | — | — |
插件钩子(Hook)执行结果
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
| batchtermSlot | 列表筛选筛选器slot(示例) | ({wrapper: HTMLDivElement}) => ({destroy: () => void}) | — | — |
基础示例
自定义筛选条件
export default class Plugin {
apply() {
return [{
event: "list.render.after",
functional: this.renderAfter.bind(this)
}]
}
async renderAfter(context, plugin) {
return {
// 1.如何在列表增加一个自定义筛选条件
batchtermSlot: this.renderBatchtermSlot
}
}
renderBatchtermSlot({wrapper}) {
const content = document.createElement('div');
const filterList = () => {
commonParams.filter({
conditions: [{
Comparison: 7,
FieldName: 'name',
FilterValue: 'content'
}]
});
};
content.innerHTML = '自定义筛选按钮';
content.addEventListener('click', filterList);
wrapper.appendChild(content);
return {
destroy() {
content.removeEventListener('click', filterList);
content.remove();
}
};
}
}效果示意

