From 2b41880d0d2a0f0b286c845d300f78d4aa4f9312 Mon Sep 17 00:00:00 2001 From: hetech Date: Tue, 3 Sep 2019 16:45:51 +0800 Subject: [PATCH] Table: column header can be costumed (#17291) --- packages/table/src/table-column.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/table/src/table-column.js b/packages/table/src/table-column.js index 853c26c8dc7..528eff1ab11 100644 --- a/packages/table/src/table-column.js +++ b/packages/table/src/table-column.js @@ -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;