fix: 日志等级选择器不再误触发折叠展开

- 折叠onClick从整个标题栏div移到标题文字span上
- 移除不再需要的stopPropagation
This commit is contained in:
yml2213
2026-06-23 09:50:08 +08:00
parent 65683350ea
commit 74251c48c7
@@ -130,10 +130,14 @@ export default function RealtimeLogPanel({
return (
<div style={{ flexShrink: 0, borderTop: `1px solid ${token.colorBorderSecondary}`, ...style }}>
<div
style={{ display: 'flex', alignItems: 'center', cursor: collapsible ? 'pointer' : 'default', padding: '4px 0', userSelect: 'none' }}
onClick={() => collapsible && setVisible((value) => !value)}
style={{ display: 'flex', alignItems: 'center', padding: '4px 0', userSelect: 'none' }}
>
<span style={{ fontWeight: 500, fontSize: 13 }}>{title}</span>
<span
style={{ fontWeight: 500, fontSize: 13, cursor: collapsible ? 'pointer' : 'default' }}
onClick={() => collapsible && setVisible((value) => !value)}
>
{title}
</span>
<Select
size="small"
value={levelFilter}
@@ -141,7 +145,6 @@ export default function RealtimeLogPanel({
options={LOG_LEVELS.map((l) => ({ value: l.value, label: l.label }))}
style={{ marginLeft: 8, width: 80 }}
popupMatchSelectWidth={false}
onClick={(e) => e.stopPropagation()}
/>
{collapsible && (
visible ? <UpOutlined style={{ marginLeft: 6, fontSize: 10 }} /> : <DownOutlined style={{ marginLeft: 6, fontSize: 10 }} />