-
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
Conversation
--bug=1049088 --user=刘瑞斌 【应用编排】图片理解模型应该可以作为结束节点 https://www.tapd.cn/57709429/s/1612298
--bug=1049087 --user=刘瑞斌 【应用编排】开启文件上传后,全局变量列表没有自动生成文件变量 https://www.tapd.cn/57709429/s/1612303
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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 comment
The reason will be displayed to describe this comment to others. Learn more.
代码中的问题是:在更新文件上传设置对话框时,原始数据和默认值被覆盖。
解决方案:
需要将form_data.value.file_upload_setting变量重命名,并使用默认值初始化它。这应为:
const defaultUploadSettings = {
maximumFileSize: new BigInteger(50*1024),
};
...
此外,在FileUploadSettingDialogRef.value.open()函数中传递参数时,请确保正确引用正确的对象(即上标)。例如:
如果要打开一个名为upload_dialog_settings的表单,应当这样写:
FileUploadSettingDialogRef.value?.open(upload_dialog);
这是更安全的方式,特别是在处理用户输入或配置项的地方。
其他地方可能需要注意的是,fileLimit
应该是新的数字而不是字符串'50'
。
@@ -52,7 +52,7 @@ def __init__(self, _id: str, _type: str, x: int, y: int, properties: dict, **kwa | |||
self.__setattr__(keyword, kwargs.get(keyword)) | |||
|
|||
|
|||
end_nodes = ['ai-chat-node', 'reply-node', 'function-node', 'function-lib-node', 'application-node'] | |||
end_nodes = ['ai-chat-node', 'reply-node', 'function-node', 'function-lib-node', 'application-node', 'image-understand-node'] | |||
|
|||
|
|||
class Flow: |
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:
class Flow:
...
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
代码中缺少一个分号来结束一行,在 export
块中,需要确保每行都有适当的缩进,并正确使用单引号。
以下是修正后的代码:
const end_nodes: Array<string> = [ // 将这里的 {} 改为 [[]]
WorkflowType.Reply,
WorkflowType.FunctionLib,
WorkflowType_functionLibCustom,
WorkflowType_ImageUnderstandNode,
WorkflowType.Application
];
这段修改应该没有不合规或潜在问题;如果还存在问题,请告知。
fix: 图片理解节点可以作为结束节点 --bug=1049088 --user=刘瑞斌 【应用编排】图片理解模型应该可以作为结束节点 https://www.tapd.cn/57709429/s/1612298
fix: 开启文件上传开关时设置默认值 --bug=1049087 --user=刘瑞斌 【应用编排】开启文件上传后,全局变量列表没有自动生成文件变量 https://www.tapd.cn/57709429/s/1612303