改变el-table 的背景色可以通过多种方式实现,以下是详细的步骤和代码示例: 1. 使用内联样式直接修改 你可以在 el-table 标签内使用 style 属性来直接设置背景颜色。 html <el-table :data="tableData" style="background-color: #f5f5f5;"> <!-- 表格列定义 --> <el-table-column pr...
::v-deep .el-table .rowColor{background:#f3c298; } 2、置好背景色后发现,每次鼠标移入到变色的行上面,背景色就会变成灰色,要求是移入后也应该是变过色的背景色 tableCellstyle(row, rowIndex) {if(row.row.name == 'test') {return'background: #f3c298'}return''},...
el-table点击行,改变行的背景色 为了防止污染自组件的table,row,可以在::v-deep{}外层再加一个class ::v-deep {.current-row{td{background-color:rgba(0,191,255, .35)!important; } } } https://blog.csdn.net/LH2HA3/article/details/127888560...
handleRowClick(row, column, event) {//点击行触发,选中或不选中复选框 this.$refs.refTable.toggleRowSelection(row); }, tableRowClassName({ row, rowIndex }) {//改变某行的背景色 if (row.date == "2016-05-04" ) { return "freeze"; } }, cellStyle({row, column, rowIndex, columnIndex...
</el-table> 样式: .el-table tr:hover>td{ background-color: #a3c9e4 !important; } 备注:鼠标移动上去别的单元格背景色都会改变,只有操作栏目背景色没有变化,原因是<el-table-column fixed="right" label="操作" min-width="100px">中的fixed="right"除掉就可以了...
这是el-table表格的合计项,需要在有合计的地方改变背景色 用的是jquery来获取元素 // let addFontColor = setTimeout(()=>{// console.log($(".w-table__footer-wrapper div").length-1)// for( var i = 0;i<$(".w-table__footer-wrapper div").length-1; i++){// console.log($(".w-...
</el-table> 样式: .el-table tr:hover>td{ background-color: #a3c9e4 !important; } 备注:鼠标移动上去别的单元格背景色都会改变,只有操作栏目背景色没有变化,原因是<el-table-column fixed="right" label="操作" min-width="100px">中的fixed="right"除掉就可以了...
</el-table> 样式: .el-table tr:hover>td{ background-color: #a3c9e4 !important; } 备注:鼠标移动上去别的单元格背景色都会改变,只有操作栏目背景色没有变化,原因是<el-table-column fixed="right" label="操作" min-width="100px">中的fixed="right"除掉就可以了...