feat(ui): cap tool toggle menu to five items with hidden scrollbar
This commit is contained in:
parent
3cd8bdabef
commit
2c75bb01a0
@ -64,7 +64,7 @@
|
|||||||
<div class="quick-submenu tool-submenu" v-if="toolMenuOpen">
|
<div class="quick-submenu tool-submenu" v-if="toolMenuOpen">
|
||||||
<div class="submenu-status" v-if="toolSettingsLoading">正在同步工具状态...</div>
|
<div class="submenu-status" v-if="toolSettingsLoading">正在同步工具状态...</div>
|
||||||
<div v-else-if="!toolSettings.length" class="submenu-empty">暂无可控工具</div>
|
<div v-else-if="!toolSettings.length" class="submenu-empty">暂无可控工具</div>
|
||||||
<div v-else class="submenu-list">
|
<div v-else class="submenu-list tool-submenu-list">
|
||||||
<button
|
<button
|
||||||
v-for="category in toolSettings"
|
v-for="category in toolSettings"
|
||||||
:key="category.id"
|
:key="category.id"
|
||||||
|
|||||||
@ -583,6 +583,22 @@
|
|||||||
color: var(--claude-text-secondary);
|
color: var(--claude-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tool-submenu-list {
|
||||||
|
// 显示约 5 条工具项,其余通过滚动查看
|
||||||
|
max-height: calc(44px * 5 + 6px * 4);
|
||||||
|
overflow-y: auto;
|
||||||
|
overscroll-behavior: contain;
|
||||||
|
padding-right: 2px;
|
||||||
|
scrollbar-width: none;
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-submenu-list::-webkit-scrollbar {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.menu-entry.disabled {
|
.menu-entry.disabled {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user