import PropTypes from '../../_util/vue-types'; export default { name: 'ColGroup', props: { fixed: PropTypes.string, columns: PropTypes.array, }, inject: { table: { default: () => ({}) }, }, render() { const { fixed, table } = this; const { prefixCls, expandIconAsCell, columnManager } = table; let cols = []; if (expandIconAsCell && fixed !== 'right') { cols.push(); } let leafColumns; if (fixed === 'left') { leafColumns = columnManager.leftLeafColumns(); } else if (fixed === 'right') { leafColumns = columnManager.rightLeafColumns(); } else { leafColumns = columnManager.leafColumns(); } cols = cols.concat( leafColumns.map(c => { const width = typeof c.width === 'number' ? `${c.width}px` : c.width; return ; }), ); return {cols}; }, };