fix: 统一上传响应与表单校验处理
- 上传组件统一解析后端响应并暴露错误事件 - AI 资源、模型提供商和工作流表单补齐程序化字段校验同步 - 修正 MinIO 对外访问域名配置
This commit is contained in:
@@ -9,6 +9,7 @@ import {ElForm, ElFormItem, ElIcon, ElInput, ElMessage, ElOption, ElSelect,} fro
|
||||
import {api} from '#/api/request';
|
||||
import UploadAvatar from '#/components/upload/UploadAvatar.vue';
|
||||
import {$t} from '#/locales';
|
||||
import {syncProgrammaticFieldValidation} from '#/utils/form-validation';
|
||||
import ModelProviderBadge from '#/views/ai/model/ModelProviderBadge.vue';
|
||||
import {getProviderPresetByValue, providerPresets,} from '#/views/ai/model/modelUtils/defaultIcon';
|
||||
|
||||
@@ -132,6 +133,14 @@ const applyPreset = (value: string) => {
|
||||
formData.chatPath = preset.options.chatPath || '';
|
||||
formData.embedPath = preset.options.embedPath || '';
|
||||
formData.rerankPath = preset.options.rerankPath || '';
|
||||
syncProgrammaticFieldValidation(formDataRef, [
|
||||
'providerType',
|
||||
'providerName',
|
||||
'endpoint',
|
||||
'chatPath',
|
||||
'embedPath',
|
||||
'rerankPath',
|
||||
]);
|
||||
};
|
||||
|
||||
const save = async () => {
|
||||
|
||||
Reference in New Issue
Block a user