style(editor): 页面列表长度超过可视窗口时出现滚动条

This commit is contained in:
roymondchen 2025-09-12 15:32:03 +08:00
parent e400175ffe
commit f5cb19dfa4
2 changed files with 20 additions and 13 deletions

View File

@ -11,19 +11,21 @@
:width="160"
:destroy-on-close="true"
>
<div>
<slot name="page-list-popover" :list="list">
<ToolButton
v-for="(item, index) in list"
:data="{
type: 'button',
text: item.devconfig?.tabName || item.name || item.id,
className: item.id === page?.id ? 'active' : '',
handler: () => switchPage(item.id),
}"
:key="index"
></ToolButton>
</slot>
<div class="page-bar-popover-wrapper">
<div class="page-bar-popover-inner">
<slot name="page-list-popover" :list="list">
<ToolButton
v-for="(item, index) in list"
:data="{
type: 'button',
text: item.devconfig?.tabName || item.name || item.id,
className: item.id === page?.id ? 'active' : '',
handler: () => switchPage(item.id),
}"
:key="index"
></ToolButton>
</slot>
</div>
</div>
<template #reference>
<TMagicIcon class="m-editor-page-list-menu-icon">

View File

@ -92,6 +92,11 @@
padding: 4px 0;
}
.page-bar-popover-wrapper {
max-height: calc(100vh - $page-bar-height - 20px);
overflow: auto;
}
.menu-item {
cursor: pointer;
transition: all 0.2s ease 0s;