el-table中奇偶行背景色显示不同的颜色
生活随笔
收集整理的這篇文章主要介紹了
el-table中奇偶行背景色显示不同的颜色
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
默認(rèn)樣式
深色主題
事件方法
//奇偶行背景色不同setCurrent(row) {this.$refs.singleTable.setCurrentRow(row);},handleCurrentChange(val) {this.currentRow = val;},tableRowClassName({row, rowIndex}) {if ((rowIndex + 1) % 2 === 0) {return 'success-row';}return '';},樣式
<style> .el-table .success-row {background: #DFEAF5; } </style>總結(jié)
以上是生活随笔為你收集整理的el-table中奇偶行背景色显示不同的颜色的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SringBoot/Cloud/Aali
- 下一篇: Docker JFrog Artifac