diff --git a/src/Table.js b/src/Table.js index de9b807..5fa33f0 100644 --- a/src/Table.js +++ b/src/Table.js @@ -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; diff --git a/src/Table.scss b/src/Table.scss index 9180677..4b8465e 100644 --- a/src/Table.scss +++ b/src/Table.scss @@ -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; } + } diff --git a/src/TableHeader.js b/src/TableHeader.js index 2fa66f7..e774874 100644 --- a/src/TableHeader.js +++ b/src/TableHeader.js @@ -784,6 +784,7 @@ class TableHeader extends Component { if(!da.fixed ){ return ( + {da.required ? *:''} {da.children} { dragborder && columIndex != _rowLeng?
(this.gap = el)} data-line-key={da.key}