feat: Enhance group label display in Playground component

- Updated the group selection input to truncate long labels on mobile devices, ensuring better readability and a cleaner interface.
- Implemented a conditional label adjustment that shortens group names exceeding 18 characters, appending '...' for clarity.
This commit is contained in:
CalciumIon
2024-12-12 16:35:13 +08:00
parent 430d5fcd6a
commit 44512d3c28

View File

@@ -326,7 +326,12 @@ const Playground = () => {
}}
value={inputs.group}
autoComplete='new-password'
optionList={groups}
optionList={groups.map((group) => ({
...group,
label: styleState.isMobile && group.label.length > 18
? group.label.substring(0, 18) + '...'
: group.label,
}))}
/>
<div style={{ marginTop: 10 }}>
<Typography.Text strong>模型</Typography.Text>