mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-19 03:55:50 +08:00
style(editor): 页面列表长度超过可视窗口时出现滚动条
This commit is contained in:
parent
e400175ffe
commit
f5cb19dfa4
@ -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">
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user