Table: column header can be costumed (#17291)

pull/17302/head
hetech 2019-09-03 16:45:51 +08:00 committed by GitHub
parent 10592d12ea
commit 3807b54ab2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -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;