Commit a312367f authored by zhangwenshuai's avatar zhangwenshuai

update table column

parent cc8ae7d1
...@@ -82,10 +82,17 @@ export default class TableColumn extends PureComponent<ColumnProps> { ...@@ -82,10 +82,17 @@ export default class TableColumn extends PureComponent<ColumnProps> {
return item.colName === columnName; return item.colName === columnName;
}); });
const { sortType }: { sortType: string } = sort || {}; const { sortType }: { sortType: string } = sort || {};
let marginLeft:any = 0;
if (columnIndex === 0 && (rowSelection || showIndex)) {
marginLeft = '56px';
if (!rowSelection) {
marginLeft = '82px';
}
}
return ( return (
<div className={s.colContainer}> <div className={s.colContainer}>
{rowSelection && columnIndex === 0 && <div className={s.checkbox}>{this.getCheckbox()}</div>} {rowSelection && columnIndex === 0 && <div className={s.checkbox}>{this.getCheckbox()}</div>}
<div className={s.colBrief} style={{ marginLeft: showIndex && columnIndex === 0 ? '56px' : 0 }}> <div className={s.colBrief} style={{ marginLeft }}>
{icon && <div className={s.colIcon}>{icon()}</div>} {icon && <div className={s.colIcon}>{icon()}</div>}
<span className={required ? classNames(s.colTitle, s.required) : s.colTitle}> <span className={required ? classNames(s.colTitle, s.required) : s.colTitle}>
{columnChsName} {columnChsName}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment