vxe-table更改单元格样式cell-style

 <vxe-table ref="vxeTable" 
            :print-config="{}" :loading="loading" :cell-style="cellStyle" :data="data">



定义方法

//单元格样式
cellStyle(row) {


let days = this.getDiffDay(new Date(), row.row.limitedDate)+1;
console.log("******"+days,row);
if (row.columnIndex==10&&days <= 0) {
return {
color: "#F24646"
};
} else if (row.columnIndex==10&&days <= 7) {
return {
color: "#FF6F18"
};
}
},

 

posted @ 2022-06-15 15:30  逝年的我们  阅读(3499)  评论(0编辑  收藏  举报