mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 开启文件上传开关时设置默认值
--bug=1049087 --user=刘瑞斌 【应用编排】开启文件上传后,全局变量列表没有自动生成文件变量 https://www.tapd.cn/57709429/s/1612303
This commit is contained in:
parent
a28b55b6ad
commit
547b2bdbaf
|
|
@ -70,7 +70,7 @@
|
|||
<Setting />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
<el-switch size="small" v-model="form_data.file_upload_enable"/>
|
||||
<el-switch size="small" v-model="form_data.file_upload_enable" @change="switchFileUpload"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -382,6 +382,22 @@ const refreshTTSForm = (data: any) => {
|
|||
form_data.value.tts_model_params_setting = data
|
||||
}
|
||||
|
||||
|
||||
const switchFileUpload = () => {
|
||||
const default_upload_setting = {
|
||||
maxFiles: 3,
|
||||
fileLimit: 50,
|
||||
document: true,
|
||||
image: false,
|
||||
audio: false,
|
||||
video: false
|
||||
}
|
||||
|
||||
if (form_data.value.file_upload_enable) {
|
||||
form_data.value.file_upload_setting = form_data.value.file_upload_setting || default_upload_setting
|
||||
props.nodeModel.graphModel.eventCenter.emit('refreshFileUploadConfig')
|
||||
}
|
||||
}
|
||||
const openFileUploadSettingDialog = () => {
|
||||
FileUploadSettingDialogRef.value?.open(form_data.value.file_upload_setting)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue