mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-09-26 05:46:18 +00:00
- 路径过长时仅保留首项 + ... + 末两项,避免横向溢出工作区 - 单项设置 max-width 并通过内部 span 显示省略号,悬浮 tooltip 展示完整名称 - 通过 ResizeObserver 监听父容器宽度变化实时重测 Co-authored-by: Cursor <cursoragent@cursor.com>
31 lines
552 B
SCSS
31 lines
552 B
SCSS
.m-editor-breadcrumb {
|
|
position: absolute;
|
|
left: 5px;
|
|
top: 5px;
|
|
z-index: 10;
|
|
display: flex;
|
|
align-items: center;
|
|
white-space: nowrap;
|
|
|
|
.m-editor-breadcrumb-item {
|
|
max-width: 100px;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
|
|
// Element Plus button 内部文本节点
|
|
> span {
|
|
display: block;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
.m-editor-breadcrumb-separator,
|
|
.m-editor-breadcrumb-ellipsis {
|
|
margin: 0 4px;
|
|
flex-shrink: 0;
|
|
}
|
|
}
|