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

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