iview---table自定义列头
官方API提到renderHeader函数 自定义列头显示内容,使用 Vue 的 Render 函数。传入两个参数,第一个是 h,第二个为对象,包含 column 和 index,分别为当前列数据和当前列索引。
{ "title": "累计销售", "align": "center",
renderHeader: (h, param) => {
return h('div', {
domProps: {
innerHTML: param.column.title
},
style:{
cursor:'pointer'
},
on: {
click: () => { //自定义列头的点击事件
this.allChangeAgainst(param);
}
}
});
},
"children": [ { "title": "合计", "key": "age", "align":"center","width":"50","tooltip":"true" } ]
},
208

被折叠的 条评论
为什么被折叠?



