Skip to content

Commit

Permalink
feat: Enhance group label display in Playground component
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
Calcium-Ion committed Dec 12, 2024
1 parent 430d5fc commit 44512d3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/src/pages/Playground/Playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 44512d3

Please sign in to comment.