mirror of https://github.com/ElemeFE/element
Table: column header can be costumed (#17291)
parent
10592d12ea
commit
3807b54ab2
|
@ -144,11 +144,10 @@ export default {
|
|||
},
|
||||
|
||||
setColumnRenders(column) {
|
||||
const specialTypes = Object.keys(cellForced);
|
||||
// renderHeader 属性不推荐使用。
|
||||
if (this.renderHeader) {
|
||||
console.warn('[Element Warn][TableColumn]Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.');
|
||||
} else if (specialTypes.indexOf(column.type) === -1) {
|
||||
} else if (column.type !== 'selection') {
|
||||
column.renderHeader = (h, scope) => {
|
||||
const renderHeader = this.$scopedSlots.header;
|
||||
return renderHeader ? renderHeader(scope) : column.label;
|
||||
|
|
Loading…
Reference in New Issue