From 42791d4c6364a3ac0ab8d7a4007d2f6a8d14bdbc Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Mon, 28 Oct 2024 10:00:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E7=B1=BB=E5=9E=8B=EF=BC=8C=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E6=B2=A1=E6=B8=85=E7=A9=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/template/component/CreateModelDialog.vue | 8 +++++--- ui/src/views/template/component/EditModel.vue | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ui/src/views/template/component/CreateModelDialog.vue b/ui/src/views/template/component/CreateModelDialog.vue index a0872cd3e..8f4bf727d 100644 --- a/ui/src/views/template/component/CreateModelDialog.vue +++ b/ui/src/views/template/component/CreateModelDialog.vue @@ -100,7 +100,7 @@ { dialogVisible.value = true } -const list_base_model = (model_type: any) => { - form_data.value.model_name = '' +const list_base_model = (model_type: any, change?: boolean) => { + if (change) { + base_form_data.value.model_name = '' + } if (providerValue.value) { ModelApi.listBaseModel(providerValue.value.provider, model_type, base_model_loading).then( (ok) => { diff --git a/ui/src/views/template/component/EditModel.vue b/ui/src/views/template/component/EditModel.vue index 422eff720..333f8011f 100644 --- a/ui/src/views/template/component/EditModel.vue +++ b/ui/src/views/template/component/EditModel.vue @@ -80,7 +80,7 @@ { }) } } -const list_base_model = (model_type: any) => { +const list_base_model = (model_type: any, change?: boolean) => { + if (change) { + base_form_data.value.model_name = '' + } if (providerValue.value) { ModelApi.listBaseModel(providerValue.value.provider, model_type, base_model_loading).then( (ok) => {