zent
Version:
一套前端设计语言和基于React的实现
22 lines (21 loc) • 930 B
JavaScript
import { __assign, __extends } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import { PureComponent } from 'react';
import { getLeafColumns } from './utils';
var ColGroup = (function (_super) {
__extends(ColGroup, _super);
function ColGroup() {
return _super !== null && _super.apply(this, arguments) || this;
}
ColGroup.prototype.render = function () {
var columns = this.props.columns;
var leafColumns = getLeafColumns(columns);
var cols = (leafColumns || []).map(function (c, index) {
var width = typeof c.width === 'number' ? c.width + "px" : c.width;
return _jsx("col", { style: { width: width, minWidth: width }, "data-zv": '10.0.17' }, c.key || index);
});
return _jsx("colgroup", __assign({ "data-zv": '10.0.17' }, { children: cols }), void 0);
};
return ColGroup;
}(PureComponent));
export default ColGroup;