|
|
@ -1,4 +1,4 @@
|
|
|
|
import { computed, inject } from 'vue';
|
|
|
|
import { inject } from 'vue';
|
|
|
|
import PropTypes from '../../_util/vue-types';
|
|
|
|
import PropTypes from '../../_util/vue-types';
|
|
|
|
import TableHeaderRow from './TableHeaderRow';
|
|
|
|
import TableHeaderRow from './TableHeaderRow';
|
|
|
|
|
|
|
|
|
|
|
@ -75,21 +75,20 @@ export default {
|
|
|
|
columns: PropTypes.array.isRequired,
|
|
|
|
columns: PropTypes.array.isRequired,
|
|
|
|
expander: PropTypes.object.isRequired,
|
|
|
|
expander: PropTypes.object.isRequired,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setup(props) {
|
|
|
|
setup() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
table: inject('table', {}),
|
|
|
|
table: inject('table', {}),
|
|
|
|
rows: computed(() => parseHeaderRows(props.columns)),
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const { sComponents: components, prefixCls, showHeader, customHeaderRow } = this.table;
|
|
|
|
const { sComponents: components, prefixCls, showHeader, customHeaderRow } = this.table;
|
|
|
|
const { expander, columns, fixed, rows } = this;
|
|
|
|
const { expander, columns, fixed } = this;
|
|
|
|
|
|
|
|
|
|
|
|
if (!showHeader) {
|
|
|
|
if (!showHeader) {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const rows = parseHeaderRows(this.columns);
|
|
|
|
expander.renderExpandIndentCell(rows, fixed);
|
|
|
|
expander.renderExpandIndentCell(rows, fixed);
|
|
|
|
|
|
|
|
|
|
|
|
const HeaderWrapper = components.header.wrapper;
|
|
|
|
const HeaderWrapper = components.header.wrapper;
|
|
|
|