column新增required属性控制标题红色星号的展示
This commit is contained in:
parent
b7b4e2f8a3
commit
a84313109a
|
@ -482,6 +482,7 @@ class Table extends Component {
|
|||
dataindex:column.dataIndex,
|
||||
textAlign:column.textAlign,
|
||||
titleAlign: column.titleAlign, // 标题水平对齐方式
|
||||
required: column.required, // 标题是否展示必填标志
|
||||
};
|
||||
if (column.onHeadCellClick) {
|
||||
cell.onClick = column.onHeadCellClick;
|
||||
|
|
|
@ -466,6 +466,9 @@ $icon-color:#505F79;
|
|||
// overflow: hidden;
|
||||
// white-space: nowrap;
|
||||
// text-overflow: ellipsis;
|
||||
.required {
|
||||
color: #F22C1D;
|
||||
}
|
||||
.bee-table-column-sorter {
|
||||
position: relative;
|
||||
margin-left: 4px;
|
||||
|
@ -487,6 +490,7 @@ $icon-color:#505F79;
|
|||
width: 34px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -784,6 +784,7 @@ class TableHeader extends Component {
|
|||
if(!da.fixed ){
|
||||
return (<th {...da} {...keyTemp} className={thClassName} data-th-fixed={da.fixed} data-line-key={da.key}
|
||||
data-line-index={columIndex} data-th-width={da.width} data-type="draggable">
|
||||
{da.required ? <span className='required'>*</span>:''}
|
||||
{da.children}
|
||||
{
|
||||
dragborder && columIndex != _rowLeng? <div ref={el => (this.gap = el)} data-line-key={da.key}
|
||||
|
|
Loading…
Reference in New Issue