fix: 修复切换模型类型,基础模型没清空。
This commit is contained in:
parent
71cc563d08
commit
42791d4c63
@ -100,7 +100,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<el-select
|
<el-select
|
||||||
v-loading="model_type_loading"
|
v-loading="model_type_loading"
|
||||||
@change="list_base_model($event)"
|
@change="list_base_model($event, true)"
|
||||||
v-model="base_form_data.model_type"
|
v-model="base_form_data.model_type"
|
||||||
class="w-full m-2"
|
class="w-full m-2"
|
||||||
placeholder="请选择模型类型"
|
placeholder="请选择模型类型"
|
||||||
@ -241,8 +241,10 @@ const open = (provider: Provider) => {
|
|||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
const list_base_model = (model_type: any) => {
|
const list_base_model = (model_type: any, change?: boolean) => {
|
||||||
form_data.value.model_name = ''
|
if (change) {
|
||||||
|
base_form_data.value.model_name = ''
|
||||||
|
}
|
||||||
if (providerValue.value) {
|
if (providerValue.value) {
|
||||||
ModelApi.listBaseModel(providerValue.value.provider, model_type, base_model_loading).then(
|
ModelApi.listBaseModel(providerValue.value.provider, model_type, base_model_loading).then(
|
||||||
(ok) => {
|
(ok) => {
|
||||||
|
|||||||
@ -80,7 +80,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<el-select
|
<el-select
|
||||||
v-loading="model_type_loading"
|
v-loading="model_type_loading"
|
||||||
@change="list_base_model($event)"
|
@change="list_base_model($event, true)"
|
||||||
v-model="base_form_data.model_type"
|
v-model="base_form_data.model_type"
|
||||||
class="w-full m-2"
|
class="w-full m-2"
|
||||||
placeholder="请选择模型类型"
|
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) {
|
if (providerValue.value) {
|
||||||
ModelApi.listBaseModel(providerValue.value.provider, model_type, base_model_loading).then(
|
ModelApi.listBaseModel(providerValue.value.provider, model_type, base_model_loading).then(
|
||||||
(ok) => {
|
(ok) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user