feat: 标签栏右键菜单 — 关闭其他/右侧/全部标签
新增功能: - 右键点击标签弹出上下文菜单 - 关闭:关闭当前标签(带未保存确认) - 关闭其他标签:保留当前,关闭其余(带未保存确认) - 关闭右侧标签:关闭当前标签右边的所有标签 - 关闭全部标签:关闭所有标签(带未保存确认) - 点击空白处自动关闭菜单 技术实现: - tabStore 新增 closeOtherTabs/closeAllTabs/closeTabsToRight 方法 - TabBar 组件新增 ContextMenu 状态管理和右键事件处理 - CSS 新增 .tab-context-menu 样式(暗色主题兼容)
This commit is contained in:
@@ -300,6 +300,39 @@ html, body {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
/* Tab Context Menu */
|
||||
.tab-context-menu {
|
||||
position: fixed;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow-lg);
|
||||
padding: 4px 0;
|
||||
min-width: 160px;
|
||||
z-index: 9999;
|
||||
font-size: 13px;
|
||||
font-family: var(--font-ui);
|
||||
}
|
||||
|
||||
.tab-context-item {
|
||||
padding: 6px 16px;
|
||||
cursor: pointer;
|
||||
color: var(--text);
|
||||
white-space: nowrap;
|
||||
transition: background 0.1s ease;
|
||||
}
|
||||
|
||||
.tab-context-item:hover {
|
||||
background: var(--primary-light);
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.tab-context-divider {
|
||||
height: 1px;
|
||||
background: var(--border);
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
/* Modified Banner */
|
||||
#modified-banner {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user