diff --git a/src/styles/index.scss b/src/styles/index.scss index 7607941c..2db5e6fe 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -35,3 +35,19 @@ border-left-color: var(--el-color-primary); } } + +/* 全局生效,所有表格的悬停色都会改变 */ +.el-table--enable-row-hover .el-table__body tr:hover > td { + background-color: #f0f9eb !important; +} + +/* 2. 关键补全:针对展开行内的 hover 状态 */ +/* 展开行(tr.expanded)内部的 td 需要单独设置 */ +.el-table__body .el-table__expanded-cell:hover > td { + background-color: #f0f9eb !important; +} + +/* 3. 针对展开后触发的 hover-row 类(某些版本生效) */ +.el-table__body tr.hover-row > td { + background-color: #f0f9eb !important; +} \ No newline at end of file