From 4f58081f6c7dc37e8336352d58cf5c170a8b02ff Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 26 Aug 2024 15:22:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=EF=BC=8C=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1045668 --user=王孝刚 【系统管理】模型设置,添加模型时先输入基础模型再选择模型类型,不限时apikey等输入框 https://www.tapd.cn/57709429/s/1569266 --- ui/src/views/template/component/CreateModelDialog.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/src/views/template/component/CreateModelDialog.vue b/ui/src/views/template/component/CreateModelDialog.vue index 1e6bf919e..f8d3d11f9 100644 --- a/ui/src/views/template/component/CreateModelDialog.vue +++ b/ui/src/views/template/component/CreateModelDialog.vue @@ -160,7 +160,7 @@ import ModelApi from '@/api/model' import type { FormField } from '@/components/dynamics-form/type' import DynamicsForm from '@/components/dynamics-form/index.vue' import type { FormRules } from 'element-plus' -import { MsgSuccess } from '@/utils/message' +import { MsgSuccess, MsgWarning } from '@/utils/message' import { PermissionType, PermissionDesc } from '@/enums/model' const providerValue = ref() @@ -207,6 +207,11 @@ const form_data = computed({ }) const getModelForm = (model_name: string) => { + if (!form_data.value.model_type) { + MsgWarning('请先选择模型类型') + base_form_data.value.model_name = '' + return + } if (providerValue.value) { ModelApi.getModelCreateForm( providerValue.value.provider,