Skip to content

Commit

Permalink
fix: 开启文件上传开关时设置默认值
Browse files Browse the repository at this point in the history
--bug=1049087 --user=刘瑞斌 【应用编排】开启文件上传后,全局变量列表没有自动生成文件变量 https://www.tapd.cn/57709429/s/1612303
  • Loading branch information
liuruibin committed Nov 19, 2024
1 parent a28b55b commit 547b2bd
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion ui/src/workflow/nodes/base-node/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 547b2bd

Please sign in to comment.