fix(outline): hover 高亮残留——内联 onMouseEnter/onMouseLeave 用 if(i!==activeIdx) 条件, 点击后 activeIdx 变化导致 onMouseLeave 条件为 false 不清除背景. 改用纯 CSS :hover 替代内联 JS, 浏览器自动管理 hover 状态无竞态

This commit is contained in:
hunter-dev
2026-08-26 22:05:33 +08:00
parent a18982659b
commit 7f48cef344
2 changed files with 4 additions and 5 deletions
+2 -1
View File
@@ -74,7 +74,8 @@ html, body, #root { margin: 0; height: 100%; }
border-radius: 4px;
}
/* FR-O3:大纲当前项高亮——主题变量适配 */
/* FR-O3:大纲项 hover + 当前项高亮——用 CSS :hover 避免内联 style 竞态 */
.outline-item:hover { background: var(--control-border); }
.outline-item-active {
background: var(--control-border) !important;
border-left: 2px solid var(--accent) !important;