Skip to content

Commit

Permalink
fix: change label to span and add overflow styles
Browse files Browse the repository at this point in the history
  • Loading branch information
gene9831 committed Jan 20, 2025
1 parent 5843af5 commit 4869e9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/plugins/tree/src/DraggableTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ const handleDragLeaveContainer = (event) => {
.content {
flex: 1;
height: 100%;
overflow: hidden;
}
.rotate {
Expand All @@ -349,6 +350,7 @@ const handleDragLeaveContainer = (event) => {
flex: 1;
height: 100%;
padding: 0 4px;
overflow: hidden;
}
.border-top {
Expand Down
9 changes: 7 additions & 2 deletions packages/plugins/tree/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
<template #content="row">
<div class="row-content">
<svg-icon v-if="getIconName(row)" :name="getIconName(row)"></svg-icon>
<label :class="{ 'node-isblock': row.rawData.componentType === 'Block' }">{{ row.label }}</label>
<span :class="['row-label', { 'node-isblock': row.rawData.componentType === 'Block' }]">{{
row.label
}}</span>
<template v-if="row.id !== 'body'">
<svg-icon v-if="eyeOpen(row.id)" name="eye" @mouseup="showNode(row.rawData)"></svg-icon>
<svg-icon v-if="!eyeOpen(row.id)" name="eye-invisible" @mouseup="showNode(row.rawData)"></svg-icon>
Expand Down Expand Up @@ -231,10 +233,12 @@ export default {
.outline-tree {
flex: 1;
overflow-y: scroll;
label {
.row-label {
flex: 1;
font-size: 12px;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
}
svg {
color: var(--te-common-icon-secondary);
Expand All @@ -254,6 +258,7 @@ export default {
display: flex;
align-items: center;
gap: 4px;
overflow: hidden;
}
.node-isblock {
color: var(--te-common-color-prompt-secondary);
Expand Down

0 comments on commit 4869e9a

Please sign in to comment.