diff --git a/apps/desktop/src/renderer/features/outline/OutlinePanel.tsx b/apps/desktop/src/renderer/features/outline/OutlinePanel.tsx index 183976c..685892f 100644 --- a/apps/desktop/src/renderer/features/outline/OutlinePanel.tsx +++ b/apps/desktop/src/renderer/features/outline/OutlinePanel.tsx @@ -109,10 +109,8 @@ export function OutlinePanel() { {headings.map((h, i) => (
scrollTo(h)} className={i === activeIdx ? 'outline-item outline-item-active' : 'outline-item'} - style={{ paddingLeft: 8 + (h.level - 1) * 12, cursor: 'pointer', padding: '4px 4px 4px ' + (8 + (h.level-1)*12) + 'px', - fontSize: 13, borderRadius: 4 }} - onMouseEnter={e => { if (i !== activeIdx) e.currentTarget.style.background = 'var(--control-border)'; }} - onMouseLeave={e => { if (i !== activeIdx) e.currentTarget.style.background = 'transparent'; }}> + style={{ cursor: 'pointer', padding: '4px 4px 4px ' + (8 + (h.level-1)*12) + 'px', + fontSize: 13, borderRadius: 4 }}> {h.text || '(空标题)'}
))} diff --git a/apps/desktop/src/renderer/styles.css b/apps/desktop/src/renderer/styles.css index 4aee2ee..09042d4 100644 --- a/apps/desktop/src/renderer/styles.css +++ b/apps/desktop/src/renderer/styles.css @@ -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;