fix: backend change

This commit is contained in:
jialin
2025-11-03 10:14:30 +08:00
parent 57d41e79c7
commit 86c2f8eda1
3 changed files with 42 additions and 34 deletions
+8 -4
View File
@@ -37,7 +37,7 @@ const Performance: React.FC = () => {
const intl = useIntl();
const form = Form.useFormInstance();
const { formKey } = useFormContext();
const { modeList, onModeChange } = useCatalogFormContext();
const { modeList = [], onModeChange } = useCatalogFormContext();
return (
<>
@@ -49,15 +49,19 @@ const Performance: React.FC = () => {
description={<TooltipList list={modeTipsList}></TooltipList>}
label={intl.formatMessage({ id: 'models.form.mode' })}
>
{modeList.map((item: any) => (
{modeList?.map((item: any) => (
<Select.Option key={item.value} value={item.value}>
<AutoTooltip
showTitle={item.isBuiltIn}
ghost
title={intl.formatMessage({ id: item.tips })}
title={
item?.tips
? intl.formatMessage({ id: item?.tips || '' })
: false
}
>
{item.isBuiltIn
? intl.formatMessage({ id: item.label })
? intl.formatMessage({ id: item?.label || '' })
: item.label}
</AutoTooltip>
</Select.Option>