Skip to content

ReportTable 报表表格

用于多级表头、动态指标列和合并单元格。列树不限制层级。

多级表头

reportType: 'title' 配合递归 children 定义多级表头。

运行结果报表列已渲染

动态列

showType: 'dynamic' 的列由 dynamicFieldsdataFieldlabel 控制。

运行结果报表列已渲染

合并单元格

Element Plus 的 spanMethod 通过 elementProps 透传。

运行结果报表列已渲染

Attributes

参数默认值说明
dataSource[]报表数据
columns[]报表列树
dynamicFields[]当前显示的动态列
pagination{}会被直接修改的分页配置
customCommands[]批量命令
elementProps{}透传 ElTable
getList-分页与排序回调

Column Options

继承 CommonTable 列配置,增加 reportType: 'title' | 'data'showType: 'static' | 'dynamic' 和递归 childrenindex 列沿用 64px 默认宽度,并允许 elementProps.width 覆盖。

Table Events

支持选择、行点击、page-index-changepage-size-changesort-change 以及所有命令字符串对应的同名事件。