fix: 固定列在主表渲染引起的渲染多次问题
This commit is contained in:
parent
95637d9eac
commit
390a8a4e5f
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
File diff suppressed because one or more lines are too long
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue