问题:需要对el-table中的某一行进行样式修改
方法:<el-table> 中添加属性 :row-class-name="tableRowClassName"
methods 中添加函数 tableRowClassName({ row, rowIndex }) { }
<style>(全局样式,不可加scoped!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!) 中添加<style>
.warning-row {
background: rgb(204, 204, 204) !important;
}
.success-row {
background: #f0f2ff !important;
}
另:!important不一定需要