Change the style of the first row or a certain row of vxe-table or element-ui

Insert picture description here
Key point: add attributes to the table: 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`;
		}
},

Guess you like

Origin blog.csdn.net/GongWei_/article/details/110947331