fix: 固定列在主表渲染引起的渲染多次问题

This commit is contained in:
izbz wh 2021-01-14 09:48:51 +08:00
parent 95637d9eac
commit 390a8a4e5f
6 changed files with 2930 additions and 3588 deletions

File diff suppressed because one or more lines are too long

2
dist/demo.css.map vendored

File diff suppressed because one or more lines are too long

4770
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -199,7 +199,11 @@ class TableCell extends Component{
let tdProps;
let colSpan;
let rowSpan,title;
let colMenu = this.renderColumnMenu(column.cellMenu, text, record, index);
// 如果是固定列在主表格上就渲染null
if(column.fixed && !fixed){
text = null
}else {
if (render && !showSum) {
text = render(text, record, index,{
dataIndex, render, fieldType, linkConfig, fontColor, bgColor,...other
@ -212,7 +216,7 @@ class TableCell extends Component{
}
}
let colMenu = this.renderColumnMenu(column.cellMenu, text, record, index);
// 根据 fieldType 来渲染数据
if(!render){
switch(column.fieldType){
@ -259,6 +263,8 @@ class TableCell extends Component{
}
}
}
}
if (this.isInvalidRenderCellText(text)) {
text = null;