mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复应用设置页面清空 AI 模型报错
This commit is contained in:
parent
b40b4e5305
commit
9febff2200
|
|
@ -451,8 +451,12 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||
}
|
||||
})
|
||||
}
|
||||
const model_change = (model_id: string) => {
|
||||
AIModeParamSettingDialogRef.value?.reset_default(model_id)
|
||||
const model_change = (model_id?: string) => {
|
||||
if (model_id) {
|
||||
AIModeParamSettingDialogRef.value?.reset_default(model_id)
|
||||
} else {
|
||||
refreshForm({})
|
||||
}
|
||||
}
|
||||
const openAIParamSettingDialog = () => {
|
||||
const model_id = applicationForm.value.model_id
|
||||
|
|
|
|||
|
|
@ -239,8 +239,12 @@ function submitDialog() {
|
|||
set(props.nodeModel.properties.node_data, 'prompt', cloneContent.value)
|
||||
dialogVisible.value = false
|
||||
}
|
||||
const model_change = (model_id: string) => {
|
||||
AIModeParamSettingDialogRef.value?.reset_default(model_id)
|
||||
const model_change = (model_id?: string) => {
|
||||
if (model_id) {
|
||||
AIModeParamSettingDialogRef.value?.reset_default(model_id)
|
||||
} else {
|
||||
refreshParam({})
|
||||
}
|
||||
}
|
||||
const {
|
||||
params: { id }
|
||||
|
|
|
|||
|
|
@ -232,8 +232,12 @@ function openDialog() {
|
|||
cloneContent.value = form_data.value.prompt
|
||||
dialogVisible.value = true
|
||||
}
|
||||
const model_change = (model_id: string) => {
|
||||
AIModeParamSettingDialogRef.value?.reset_default(model_id)
|
||||
const model_change = (model_id?: string) => {
|
||||
if (model_id) {
|
||||
AIModeParamSettingDialogRef.value?.reset_default(model_id)
|
||||
} else {
|
||||
refreshParam({})
|
||||
}
|
||||
}
|
||||
function submitDialog() {
|
||||
set(props.nodeModel.properties.node_data, 'prompt', cloneContent.value)
|
||||
|
|
|
|||
Loading…
Reference in New Issue