1、设置行变色 <el-table :data="dataList":row-class-name="tableRowClassName":cell-style="tableCellstyle"> methods中写方法: tableRowClassName(row, rowIndex ) {if(row.row.name == 'test') {return'rowColor'}return''}, style中设置class属性: ::v-deep .el-table .rowColor{background:#f3...
Vue中自定义实现el-table的表格效果,并实现行颜色展示突出,主要使用div布局实现,加背景渐变实现背景效果页面布局<divclass="table-wrap"><divclass="table-title"><divclass="prop1">平台</div><divclass="prop2">币种</div>
::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell{ background: #212936; /*隔行变色*/ } table组件设置背景颜色透明 ::v-deep .el-table--fit{ padding: 20px; } ::v-deep .el-table, .el-table__expanded-cell { background-color: transparent;...