✨ ui: Add CSS ellipsis + Tooltip for SelectableButtonGroup; keep Tag intact
- Truncate long labels via pure CSS and always show full text in a Tooltip - Ensure the right-side Tag is never truncated and remains fully visible - Simplify implementation: remove overflow detection and ResizeObserver - Use minimal markup with sbg-button/sbg-inner/sbg-label to enable shrinking - Add global rules to allow `.semi-button-content` to shrink and ellipsize Files: - web/src/components/common/ui/SelectableButtonGroup.jsx - web/src/index.css No API changes; visuals improved and code complexity reduced.
This commit is contained in:
@@ -289,6 +289,27 @@ code {
|
||||
}
|
||||
|
||||
/* ==================== 组件特定样式 ==================== */
|
||||
/* SelectableButtonGroup */
|
||||
.sbg-button .semi-button-content {
|
||||
min-width: 0 !important;
|
||||
}
|
||||
|
||||
.sbg-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sbg-ellipsis {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* Tabs组件样式 */
|
||||
.semi-tabs-content {
|
||||
padding: 0 !important;
|
||||
|
||||
Reference in New Issue
Block a user