fix: 修复创建模型,不显示参数的缺陷
--bug=1045668 --user=王孝刚 【系统管理】模型设置,添加模型时先输入基础模型再选择模型类型,不限时apikey等输入框 https://www.tapd.cn/57709429/s/1569266
This commit is contained in:
parent
b4bcb4299e
commit
4f58081f6c
@ -160,7 +160,7 @@ import ModelApi from '@/api/model'
|
|||||||
import type { FormField } from '@/components/dynamics-form/type'
|
import type { FormField } from '@/components/dynamics-form/type'
|
||||||
import DynamicsForm from '@/components/dynamics-form/index.vue'
|
import DynamicsForm from '@/components/dynamics-form/index.vue'
|
||||||
import type { FormRules } from 'element-plus'
|
import type { FormRules } from 'element-plus'
|
||||||
import { MsgSuccess } from '@/utils/message'
|
import { MsgSuccess, MsgWarning } from '@/utils/message'
|
||||||
import { PermissionType, PermissionDesc } from '@/enums/model'
|
import { PermissionType, PermissionDesc } from '@/enums/model'
|
||||||
|
|
||||||
const providerValue = ref<Provider>()
|
const providerValue = ref<Provider>()
|
||||||
@ -207,6 +207,11 @@ const form_data = computed({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const getModelForm = (model_name: string) => {
|
const getModelForm = (model_name: string) => {
|
||||||
|
if (!form_data.value.model_type) {
|
||||||
|
MsgWarning('请先选择模型类型')
|
||||||
|
base_form_data.value.model_name = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
if (providerValue.value) {
|
if (providerValue.value) {
|
||||||
ModelApi.getModelCreateForm(
|
ModelApi.getModelCreateForm(
|
||||||
providerValue.value.provider,
|
providerValue.value.provider,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user