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:
@@ -326,7 +326,12 @@ const Playground = () => {
|
|||||||
}}
|
}}
|
||||||
value={inputs.group}
|
value={inputs.group}
|
||||||
autoComplete='new-password'
|
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 }}>
|
<div style={{ marginTop: 10 }}>
|
||||||
<Typography.Text strong>模型:</Typography.Text>
|
<Typography.Text strong>模型:</Typography.Text>
|
||||||
|
|||||||
Reference in New Issue
Block a user