去掉一些warning
This commit is contained in:
parent
cba52a4e11
commit
01b4ee4303
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -310,6 +310,8 @@ class Table extends Component {
|
||||||
'or set `rowKey` to an unique primary key.'
|
'or set `rowKey` to an unique primary key.'
|
||||||
);
|
);
|
||||||
return key;
|
return key;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getExpandedRows() {
|
getExpandedRows() {
|
||||||
|
|
|
@ -538,7 +538,7 @@ class TableHeader extends Component {
|
||||||
return (
|
return (
|
||||||
<thead className={`${clsPrefix}-thead`} {...attr} data-theader-fixed='scroll' ref={_thead=>this._thead = _thead} >
|
<thead className={`${clsPrefix}-thead`} {...attr} data-theader-fixed='scroll' ref={_thead=>this._thead = _thead} >
|
||||||
{rows.map((row, index) => (
|
{rows.map((row, index) => (
|
||||||
<tr style={rowStyle} className={(filterable && index == rows.length - 1)?'filterable':''}>
|
<tr key={index} style={rowStyle} className={(filterable && index == rows.length - 1)?'filterable':''}>
|
||||||
{row.map((da, columIndex, arr) => {
|
{row.map((da, columIndex, arr) => {
|
||||||
let thHover = da.drgHover
|
let thHover = da.drgHover
|
||||||
? ` ${clsPrefix}-thead th-drag-hover`
|
? ` ${clsPrefix}-thead th-drag-hover`
|
||||||
|
@ -558,6 +558,7 @@ class TableHeader extends Component {
|
||||||
//避免key为undefined
|
//避免key为undefined
|
||||||
// if(da.dataindex && da.key ===undefined ){
|
// if(da.dataindex && da.key ===undefined ){
|
||||||
keyTemp.key = da.key || da.dataindex || index+'-'+columIndex
|
keyTemp.key = da.key || da.dataindex || index+'-'+columIndex
|
||||||
|
|
||||||
// }
|
// }
|
||||||
if (filterable && index == rows.length - 1) {
|
if (filterable && index == rows.length - 1) {
|
||||||
da.children = this.filterRenderType(
|
da.children = this.filterRenderType(
|
||||||
|
@ -582,7 +583,6 @@ class TableHeader extends Component {
|
||||||
thClassName += ` ${fixedStyle}`;
|
thClassName += ` ${fixedStyle}`;
|
||||||
if(!da.fixed){
|
if(!da.fixed){
|
||||||
|
|
||||||
// console.log(keyTemp.key);
|
|
||||||
return (<th {...da} {...keyTemp} className={thClassName} data-th-fixed={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-line-key={da.key} data-line-index={columIndex} data-th-width={da.width} >
|
||||||
{da.children}
|
{da.children}
|
||||||
|
|
|
@ -162,7 +162,7 @@ class TableRow extends Component{
|
||||||
const {
|
const {
|
||||||
clsPrefix, columns, record, height, visible, index,
|
clsPrefix, columns, record, height, visible, index,
|
||||||
expandIconColumnIndex, expandIconAsCell, expanded, expandRowByClick,
|
expandIconColumnIndex, expandIconAsCell, expanded, expandRowByClick,
|
||||||
expandable, onExpand, needIndentSpaced, indent, indentSize,isHiddenExpandIcon,fixed,
|
expandable, onExpand, needIndentSpaced, indent, indentSize,isHiddenExpandIcon,fixed,hoverKey
|
||||||
} = this.props;
|
} = this.props;
|
||||||
let showSum = false;
|
let showSum = false;
|
||||||
let { className } = this.props;
|
let { className } = this.props;
|
||||||
|
@ -221,8 +221,7 @@ class TableRow extends Component{
|
||||||
if (!visible) {
|
if (!visible) {
|
||||||
style.display = 'none';
|
style.display = 'none';
|
||||||
}
|
}
|
||||||
|
return (
|
||||||
return (
|
|
||||||
<tr
|
<tr
|
||||||
onClick={this.onRowClick}
|
onClick={this.onRowClick}
|
||||||
onDoubleClick={this.onRowDoubleClick}
|
onDoubleClick={this.onRowDoubleClick}
|
||||||
|
@ -230,6 +229,7 @@ class TableRow extends Component{
|
||||||
onMouseLeave={this.onMouseLeave}
|
onMouseLeave={this.onMouseLeave}
|
||||||
className={`${clsPrefix} ${className} ${clsPrefix}-level-${indent}`}
|
className={`${clsPrefix} ${className} ${clsPrefix}-level-${indent}`}
|
||||||
style={style}
|
style={style}
|
||||||
|
// key={hoverKey}
|
||||||
ref={this.bindElement}
|
ref={this.bindElement}
|
||||||
>
|
>
|
||||||
{cells.length>0?cells:<td></td>}
|
{cells.length>0?cells:<td></td>}
|
||||||
|
|
Loading…
Reference in New Issue