hiprint 这个插件如何让表格分组并且每个组都会分页,不知道json如何配置?或是数据源要做什么相应的配置?
查看官方文档,添加了"groupFields": ["mID"],这个配置项,但不起作用啊,不知是哪里的问题,不吝赐教
"options": {
"left": 49.5,
"top": 82.5,
"height": 44,
"width": 511.5,
"field": "table1",
"columns": [
[{
"title": "序号",
"field": "mID",
"width": 170.5,
"colspan": 1,
"rowspan": 1,
"checked": true
}, {
"title": "性别",
"field": "fDiZhi",
"width": 170.5,
"colspan": 1,
"rowspan": 1,
"checked": true,
"columnId": "fBiaoTi"
}, {
"title": "姓名",
"field": "fBZ2",
"width": 170.5,
"align": "center",
"colspan": 1,
"rowspan": 1,
"checked": true,
"columnId": "val2"
}]
]
},
"printElementType": {
"title": "表格",
"type": "tableCustom",
"groupFields": ["mID"],
"groupFooterFormatter": function (a, b) {
console.log(a);
console.log(b);
return '这里自定义统计脚信息';
}
}