From 4e14656ef1adf1b56ab39f22b8aa43c86540b5c6 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Thu, 12 Aug 2021 15:11:40 +0800 Subject: [PATCH] fix: table expanded icon render error #4507 --- components/vc-table/src/TableHeader.jsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/components/vc-table/src/TableHeader.jsx b/components/vc-table/src/TableHeader.jsx index aee123792..154356cc2 100644 --- a/components/vc-table/src/TableHeader.jsx +++ b/components/vc-table/src/TableHeader.jsx @@ -1,4 +1,4 @@ -import { computed, inject } from 'vue'; +import { inject } from 'vue'; import PropTypes from '../../_util/vue-types'; import TableHeaderRow from './TableHeaderRow'; @@ -75,21 +75,20 @@ export default { columns: PropTypes.array.isRequired, expander: PropTypes.object.isRequired, }, - setup(props) { + setup() { return { table: inject('table', {}), - rows: computed(() => parseHeaderRows(props.columns)), }; }, render() { const { sComponents: components, prefixCls, showHeader, customHeaderRow } = this.table; - const { expander, columns, fixed, rows } = this; + const { expander, columns, fixed } = this; if (!showHeader) { return null; } - + const rows = parseHeaderRows(this.columns); expander.renderExpandIndentCell(rows, fixed); const HeaderWrapper = components.header.wrapper;