diff --git a/packages/table/src/table-column.js b/packages/table/src/table-column.js index 528eff1ab..a8cad5340 100644 --- a/packages/table/src/table-column.js +++ b/packages/table/src/table-column.js @@ -306,6 +306,15 @@ export default { owner.store.commit('insertColumn', this.columnConfig, columnIndex, this.isSubColumn ? parent.columnConfig : null); }, + beforeUpdate() { + if (this.$slots.header && this.$scopedSlots.header) { + this.columnConfig.renderHeader = (h, scope) => { + const renderHeader = this.$scopedSlots.header; + return renderHeader ? renderHeader(scope) : this.columnConfig.label; + }; + } + }, + destroyed() { if (!this.$parent) return; const parent = this.$parent;