1. 程式人生 > 其它 >改變vxe-table或element-ui 表格第一行或某一行樣式

改變vxe-table或element-ui 表格第一行或某一行樣式

技術標籤:vuetablevue

在這裡插入圖片描述
關鍵點:給表格新增屬性 :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`; } },