mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-28 14:52:58 +00:00
fix: 修复切换模型类型,基础模型没清空。
This commit is contained in:
parent
71cc563d08
commit
42791d4c63
|
|
@ -100,7 +100,7 @@
|
|||
</template>
|
||||
<el-select
|
||||
v-loading="model_type_loading"
|
||||
@change="list_base_model($event)"
|
||||
@change="list_base_model($event, true)"
|
||||
v-model="base_form_data.model_type"
|
||||
class="w-full m-2"
|
||||
placeholder="请选择模型类型"
|
||||
|
|
@ -241,8 +241,10 @@ const open = (provider: Provider) => {
|
|||
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) => {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
</template>
|
||||
<el-select
|
||||
v-loading="model_type_loading"
|
||||
@change="list_base_model($event)"
|
||||
@change="list_base_model($event, true)"
|
||||
v-model="base_form_data.model_type"
|
||||
class="w-full m-2"
|
||||
placeholder="请选择模型类型"
|
||||
|
|
@ -203,7 +203,10 @@ const getModelForm = (model_name: string) => {
|
|||
})
|
||||
}
|
||||
}
|
||||
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) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue