style: framework options

This commit is contained in:
jialin
2025-11-18 20:01:54 +08:00
parent e85d59dfb0
commit 18f861f771
13 changed files with 70 additions and 25 deletions
+4 -1
View File
@@ -62,7 +62,10 @@ const BasicForm: React.FC<AddModalProps> = ({ action, currentData }) => {
})}
placeholder={intl.formatMessage(
{ id: 'common.help.eg' },
{ content: 'vllm serve {{model_path}} --port {{port}}' }
{
content:
'vllm serve {{model_path}} --port {{port}} --served-model-name {{model_name}}'
}
)}
autoSize={{ minRows: 2, maxRows: 4 }}
label={intl.formatMessage({
@@ -157,6 +157,22 @@ const VersionsForm: React.FC<AddModalProps> = ({
console.log('Version changed:', e.target.value);
};
const optionRender = (option: any) => {
const { data } = option;
return (
<span>
{option.label}
{data.tips ? (
data.locale ? (
<span className="text-tertiary m-l-4">{` [${intl.formatMessage({ id: data.tips })}]`}</span>
) : (
<span className="text-tertiary m-l-4">{` [${data.tips}]`}</span>
)
) : null}
</span>
);
};
return (
<>
<Title>
@@ -315,8 +331,10 @@ const VersionsForm: React.FC<AddModalProps> = ({
]}
>
<SealSelect
listHeight={288}
label={intl.formatMessage({ id: 'backend.framework' })}
options={frameworks}
optionRender={optionRender}
required
/>
</Form.Item>