roymondchen 7b870e5908 feat(editor): 面包屑超出父容器 80% 时折叠中间项并对单项打点
- 路径过长时仅保留首项 + ... + 末两项,避免横向溢出工作区
- 单项设置 max-width 并通过内部 span 显示省略号,悬浮 tooltip 展示完整名称
- 通过 ResizeObserver 监听父容器宽度变化实时重测

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-07 19:20:46 +08:00

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;
}
}