fix: miss default name in deploy

This commit is contained in:
jialin
2026-01-31 14:39:44 +08:00
parent 1e298bbbc0
commit 8d660b20aa
3 changed files with 8 additions and 8 deletions
@@ -295,7 +295,9 @@ const AddModal: FC<AddModalProps> = (props) => {
manual?: boolean manual?: boolean
) => { ) => {
if (item.name === currentSelectedModel.current.name) { if (item.name === currentSelectedModel.current.name) {
return manual ? modelName : form.current?.getFieldValue?.('name'); return manual
? modelName
: form.current?.getFieldValue?.('name') || modelName;
} }
return modelName; return modelName;
}; };
@@ -343,8 +345,6 @@ const AddModal: FC<AddModalProps> = (props) => {
categories: getCategory(item) categories: getCategory(item)
}); });
console.log('modelInfo:', modelInfo);
let warningStatus: MessageStatus = { let warningStatus: MessageStatus = {
show: true, show: true,
title: '', title: '',
+4 -4
View File
@@ -23,7 +23,7 @@ export const RefAudioFormItem: React.FC = () => {
const { meta, onValuesChange } = useFormContext(); const { meta, onValuesChange } = useFormContext();
const form = Form.useFormInstance(); const form = Form.useFormInstance();
const intl = useIntl(); const intl = useIntl();
const [filleName, setFileName] = React.useState<string>(''); const [fileName, setFileName] = React.useState<string>('');
// handle upload audio file, transfer to a base64 url // handle upload audio file, transfer to a base64 url
const handleUploadChange = async (data: { file: any; fileList: any }) => { const handleUploadChange = async (data: { file: any; fileList: any }) => {
@@ -55,14 +55,14 @@ export const RefAudioFormItem: React.FC = () => {
return ( return (
<Form.Item <Form.Item
name="ref_audio" name="ref_audio"
getValueProps={(value) => ({ value: filleName ? filleName : value })} getValueProps={(value) => ({ value: fileName ? fileName : value })}
> >
<SealInput.Input <SealInput.Input
allowClear allowClear
readOnly={!!filleName} readOnly={!!fileName}
suffix={ suffix={
<SuffixWrapper> <SuffixWrapper>
{filleName ? ( {fileName ? (
<span onClick={handleClear}> <span onClick={handleClear}>
<CloseCircleFilled className="icon" /> <CloseCircleFilled className="icon" />
</span> </span>
+1 -1
View File
@@ -45,7 +45,7 @@ export const TTSAdvancedParamsConfig: ParamsSchema[] = [
] ]
}, },
{ {
type: 'Select', type: 'AutoComplete',
name: 'instructions', name: 'instructions',
label: { label: {
text: 'playground.params.voiceStyle', text: 'playground.params.voiceStyle',