style: framework options
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user