fix: 添加自定义的模型的分组总是成为大写字母 #257

This commit is contained in:
kangfenmao 2024-11-07 22:51:04 +08:00
parent ba0e2c5848
commit a6b4e48640
3 changed files with 3 additions and 3 deletions

View File

@ -267,7 +267,7 @@ const PaintingsPage: FC = () => {
<Select
value={siliconProvider.id}
disabled={true}
options={[{ label: siliconProvider.name, value: siliconProvider.id }]}
options={[{ label: t(`provider.${siliconProvider.id}`), value: siliconProvider.id }]}
/>
<SettingTitle style={{ marginBottom: 5, marginTop: 15 }}>{t('common.model')}</SettingTitle>
<Select value={painting.model} options={modelOptions} onChange={onSelectModel} />

View File

@ -86,7 +86,7 @@ const PopupContainer: React.FC<Props> = ({ title, provider, resolve }) => {
spellCheck={false}
maxLength={50}
onChange={(e) => {
form.setFieldValue('name', e.target.value.toUpperCase())
form.setFieldValue('name', e.target.value)
form.setFieldValue('group', getDefaultGroupName(e.target.value))
}}
/>

View File

@ -84,7 +84,7 @@ export const getDefaultGroupName = (id: string) => {
return parts[0].toUpperCase() + '-' + parts[1].toUpperCase()
}
return id.toUpperCase()
return id
}
export function droppableReorder<T>(list: T[], startIndex: number, endIndex: number, len = 1) {