-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: Switching data sources during debugging of multiple Feishu data sources in the knowledge base workflow may result in the inability to obtain the document list #4417
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
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 |
|---|---|---|
|
|
@@ -10,12 +10,7 @@ | |
| label-width="auto" | ||
| > | ||
| <el-form-item | ||
| :label=" | ||
| $t( | ||
| 'views.workflow.nodes.dataSourceLocalNode.fileFormat.label', | ||
| '支持的文件格式', | ||
| ) | ||
| " | ||
| :label="$t('views.workflow.nodes.dataSourceLocalNode.fileFormat.label', '支持的文件格式')" | ||
| :rules="{ | ||
| type: 'array', | ||
| required: true, | ||
|
|
@@ -37,6 +32,8 @@ | |
| style="width: 240px" | ||
| clearable | ||
| multiple | ||
| filterable | ||
| allow-create | ||
| > | ||
| <template #label="{ label, value }"> | ||
| <span>{{ label }} </span> | ||
|
|
@@ -51,10 +48,7 @@ | |
| </el-form-item> | ||
| <el-form-item | ||
| :label=" | ||
| $t( | ||
| 'views.workflow.nodes.dataSourceLocalNode.maxFileNumber.label', | ||
| '每次上传最大文件数', | ||
| ) | ||
| $t('views.workflow.nodes.dataSourceLocalNode.maxFileNumber.label', '每次上传最大文件数') | ||
| " | ||
| :rules="{ | ||
| type: 'array', | ||
|
Contributor
Author
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. The provided code snippet seems to be from a UI component that sets up form elements using Element Plus (el-form) and i18n (for translations). The code is mostly syntactically correct but can be optimized for readability and maintainability. Here are some potential issues and optimization suggestions: // Potential issue: Multiple lines of repeated text in labelsSuggestion:
/* No obvious CSS related changes needed */Suggestion:
// Additional JavaScript functions if applicableOverall:
|
||
|
|
||
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.
The code appears to be generally correct, but there are a few improvements and optimizations that can be made:
Remove Unnecessary
getAPI Call: The lineform_value.value = _.cloneDeep(value)is redundant after callingnextTick, as you're already cloning the default values.Early Return for Directly Set Data: If
render_datais an array of field definitions directly, you don't need to check for it separately; setformFieldList.valuedirectly.Simplify Conditionals with Logical Operators: Using logical operators (
&&) can improve readability and performance by reducing redundant checks.Ensure Code Format Consistency: Ensure consistent indentation and spacing for better legibility.
Here's the optimized version of the code:
In this revised code:
switchstatement using boolean logic to reduce redundancy.nextTick.