fix(editor): 修复pagebar文字超长换行问题

This commit is contained in:
roymondchen 2022-03-31 15:32:25 +08:00 committed by khuntoriia
parent 759b26481d
commit 5350c9050c
2 changed files with 15 additions and 3 deletions

View File

@ -11,9 +11,13 @@
:class="{ active: page?.id === item.id }"
@click="switchPage(item)"
>
<slot name="page-bar-title" :page="item">
<span>{{ item.name }}</span>
</slot>
<div class="m-editor-page-bar-title">
<slot name="page-bar-title" :page="item">
<el-tooltip effect="dark" placement="top-start" :content="item.name">
<span>{{ item.name }}</span>
</el-tooltip>
</slot>
</div>
<el-popover placement="top" :width="160" trigger="hover">
<div>

View File

@ -10,6 +10,7 @@
color: $--font-color;
border-top: 1px solid $--border-color;
z-index: 2;
overflow: hidden;
.m-editor-page-bar-item {
padding: 0 10px;
@ -27,5 +28,12 @@
cursor: pointer;
}
}
.m-editor-page-bar-title {
max-width: 150px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
}