fix: use alibaba cloud icon for qwen provider

This commit is contained in:
jialin
2026-06-17 15:30:43 +08:00
committed by jialin
parent ac64bb98ad
commit b634a03ef9
9 changed files with 36 additions and 7 deletions
+18 -1
View File
@@ -12,7 +12,9 @@ import ProviderLogo from '../components/provider-logo';
import { useFormContext } from '../config/form-context';
import { maasProviderOptions } from '../config/providers';
import { FormData } from '../config/types';
import providerTypeStyles from '../styles/provider-type.less';
import ProviderConfigs from './provider-configs';
const Basic: React.FC<{
onAPIKeyBlur?: (e: any) => void;
}> = ({ onAPIKeyBlur }) => {
@@ -38,6 +40,20 @@ const Basic: React.FC<{
);
};
const renderLogoPrefix = () => {
const hasProvider = maasProviderOptions.some(
(option) => option.value === providerType
);
if (hasProvider) {
return (
<div style={{ display: 'flex', alignItems: 'end', height: '100%' }}>
<ProviderLogo provider={providerType as string} />
</div>
);
}
return null;
};
return (
<>
<Form.Item<FormData>
@@ -73,9 +89,10 @@ const Basic: React.FC<{
filterOption: filterOption
}}
required
className={providerTypeStyles.providerType}
prefix={renderLogoPrefix()}
options={maasProviderOptions}
optionRender={optionRender}
labelRender={optionRender}
label={intl.formatMessage({
id: 'common.table.type'
})}