- {item.icon && (
- {item.icon}
- )}
- {item.label}
- {item.tagCount !== undefined && (
-
- {item.tagCount}
-
- )}
+
+ {item.icon && ({item.icon})}
+
+ {item.label}
+
+ {item.tagCount !== undefined && (
+ {item.tagCount}
+ )}
+
);
@@ -192,20 +187,19 @@ const SelectableButtonGroup = ({
onClick={() => onChange(item.value)}
theme={isActive ? 'light' : 'outline'}
type={isActive ? 'primary' : 'tertiary'}
- icon={item.icon}
disabled={isDisabled}
+ className="sbg-button"
style={{ width: '100%' }}
>
- {item.label}
- {item.tagCount !== undefined && (
-
- {item.tagCount}
-
- )}
+
+ {item.icon && ({item.icon})}
+
+ {item.label}
+
+ {item.tagCount !== undefined && (
+ {item.tagCount}
+ )}
+
);
diff --git a/web/src/index.css b/web/src/index.css
index f0249303..ab6673b9 100644
--- a/web/src/index.css
+++ b/web/src/index.css
@@ -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;