-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: 开启文件上传开关时设置默认值 #1655
fix: 开启文件上传开关时设置默认值 #1655
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ const end_nodes: Array<string> = [ | |
WorkflowType.Reply, | ||
WorkflowType.FunctionLib, | ||
WorkflowType.FunctionLibCustom, | ||
WorkflowType.ImageUnderstandNode, | ||
WorkflowType.Application | ||
] | ||
export class WorkFlowInstance { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 代码中缺少一个分号来结束一行,在 以下是修正后的代码: const end_nodes: Array<string> = [ // 将这里的 {} 改为 [[]]
WorkflowType.Reply,
WorkflowType.FunctionLib,
WorkflowType_functionLibCustom,
WorkflowType_ImageUnderstandNode,
WorkflowType.Application
]; 这段修改应该没有不合规或潜在问题;如果还存在问题,请告知。 |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -382,8 +382,17 @@ const refreshTTSForm = (data: any) => { | |
form_data.value.tts_model_params_setting = data | ||
} | ||
|
||
const default_upload_setting = { | ||
maxFiles: 3, | ||
fileLimit: 50, | ||
document: true, | ||
image: false, | ||
audio: false, | ||
video: false | ||
} | ||
|
||
const openFileUploadSettingDialog = () => { | ||
FileUploadSettingDialogRef.value?.open(form_data.value.file_upload_setting) | ||
FileUploadSettingDialogRef.value?.open(form_data.value.file_upload_setting || default_upload_setting) | ||
} | ||
|
||
const refreshFileUploadForm = (data: any) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 代码中的问题是:在更新文件上传设置对话框时,原始数据和默认值被覆盖。 解决方案: const defaultUploadSettings = {
maximumFileSize: new BigInteger(50*1024),
};
... 此外,在FileUploadSettingDialogRef.value.open()函数中传递参数时,请确保正确引用正确的对象(即上标)。例如: 如果要打开一个名为upload_dialog_settings的表单,应当这样写: FileUploadSettingDialogRef.value?.open(upload_dialog); 这是更安全的方式,特别是在处理用户输入或配置项的地方。 |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code difference from the given information: