import React, { PureComponent } from 'react'; import { config } from './config'; import s from './Column.less'; import { ColumnProps } from './interface'; import IconFont from './base/extra/iconFont'; export default class TableColumn extends PureComponent { render() { let { type, title, width = 200, columnAttrObj = {} } = this.props; if(!config[String(type)]){ type='1'; } let icon = config[String(type)] && config[String(type)].icon; if (String(type) === '13' && !columnAttrObj.isMultiple) { icon = 'iconziduan-lianxiangdanxuan'; } return (
{icon && (typeof icon === 'string' ? : icon)} {title}
); } }