From 77e5439b9e221063ad86cf9b90a7b87e2418065f Mon Sep 17 00:00:00 2001 From: liutao <790864623@qq.com> Date: Thu, 30 Apr 2026 14:46:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=85=A8=E5=B1=80table?= =?UTF-8?q?=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/styles/index.scss | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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