使用element-ui中的table修改鼠标经过或悬停行时颜色修改
·
修改单个页面表格样式
给tbale表格加个class abc 在style样式中加入一下代码
.abc ::v-deep .el-table__body tr:hover > td {
background-color: pink !important;
}
修改所有页面table表格样式
第一种:
.el-table--enable-row-hover .el-table__body tr:hover>td{
background-color: pink !important;
}
第二种:
// 鼠标经过颜色改为粉红色
.el-table__body tr:hover>td{
background-color: pink !important;
}
// 点击之后颜色改为粉红色 如果没有效果 需要给el-table 加上 highlight-current-row 这个属性
.el-table__body tr.current-row>td{
color: rgb(28, 235, 211);
background: rgb(123, 155, 233) !important;
}
更多推荐
已为社区贡献1条内容
所有评论(0)