Skip to content

Commit

Permalink
fix(client): handle sidebar overflow items properly, fix #708
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Jun 10, 2022
1 parent f8577db commit fb553c8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
box-shadow: var(--card-shadow);
transition: background-color 0.3s ease;
--aside-width: 16rem;
> aside {
overflow-x: hidden;
overflow-y: auto;
width: var(--aside-width);
min-width: 16rem;
max-width: 18rem;
flex-shrink: 0;
border-right: 1px solid var(--border);
transition: border-color 0.3s ease;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ defineProps<{
line-height: 2.25rem;
padding: 0 2rem 0 4rem;
white-space: nowrap;
overflow: auto;
overflow: hidden;
text-overflow: ellipsis;
&.active {
Expand Down
19 changes: 17 additions & 2 deletions plugins/frontend/manager/client/settings/tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
@node-expand="handleExpand"
@node-collapse="handleCollapse"
#="{ node }">
{{ node.label || '待添加' }}
<div class="item">
<div class="label">{{ node.label || '待添加' }}</div>
</div>
</el-tree>
</el-scrollbar>
</template>
Expand Down Expand Up @@ -122,7 +124,7 @@ onActivated(async () => {
<style lang="scss">
.plugin-select {
width: 16rem;
width: 100%;
height: 100%;
border-right: 1px solid var(--border);
overflow: auto;
Expand Down Expand Up @@ -197,6 +199,19 @@ onActivated(async () => {
.el-tree-node__content {
line-height: 2.25rem;
height: 2.25rem;
.item {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
overflow: hidden;
}
.label {
overflow: hidden;
text-overflow: ellipsis;
}
}
.el-tree-node__label {
Expand Down

0 comments on commit fb553c8

Please sign in to comment.