改变vxe-table或element-ui 表格第一行或某一行样式

在这里插入图片描述
关键点:给表格添加属性 :cell-style=“cellStyle”

cellStyle(row, column, rowIndex, columnIndex) {
    
    
		// console.log(row, column, rowIndex, columnIndex);
		if (row.seq == '1') {
    
    //判断条件,如果想要改变其他行样式,就写那一行的下标
			return `background-color: #ffe5bb !important;fontSize: 16px; color: #777777`;
		} else {
    
    
			return `fontSize: 16px; color: #777777`;
		}
},

猜你喜欢

转载自blog.csdn.net/GongWei_/article/details/110947331