Skip to content
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

refactor: 优化批量操作字段 #14169 #14641

Merged
merged 1 commit into from
Jan 10, 2025
Merged

Conversation

XiaJunjie2020
Copy link
Member

What this PR does / why we need it?

Summary of your change

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

<el-cascader
:disabled="!showCascaderBatch"
:class="!!deTypeArr.length && 'select-type'"
v-model="deTypeArr"
@change="cascaderChangeArr"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码中存在以下问题:

  1. else 语句块中没有添加对输入框的处理逻辑(可能是为了提高性能,避免重复计算)。
  2. 没有显示输入框的状态变化情况(如是否为空或其他特定条件)。

此外,对于新功能 showCascaderBatch === false 的情况缺少具体的处理逻辑,可能会影响整体体验或数据更新。

@@ -228,7 +228,7 @@ export default {
convert_to_indicator: '轉換為指標',
convert_to_dimension: '轉換為維度',
selected: '已選擇',
bar: '',
bar: '',
format_edit: '格式編輯',
custom_time_format: '自訂時間格式',
cannot_be_empty_: '過濾欄位不能為空',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该代码中bar字段从'條'被修改为'項',这可能存在一些混淆或误导的情况。"条"通常用于表示数量的实体单位(如木材、电线等),而"项"则更多地指代单个可计数对象(如菜单项、产品列表等)。如果这些对象具有相同的定义和用途,那么这个改变是合理的;然而如果不是,则可能需要重新考虑是否应该保持一致。

此外,在某些情况下,代码中的注释// cannot_be_empty_可能是多余的,因为它的位置与后面的语句在同一行上,并且没有任何实际功能依赖它。如果有其他注释也是这种情况,可以进一步审查。

总的来说,这是一个小的设计变更,不需要过多关注但值得仔细检查一下以确保逻辑的一致性和正确性。

@@ -229,7 +229,7 @@ export default {
convert_to_indicator: '转换为指标',
convert_to_dimension: '转换为维度',
selected: '已选择',
bar: '',
bar: '',
format_edit: '格式编辑',
custom_time_format: '自定义时间格式',
cannot_be_empty_: '过滤字段不能为空',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码差异没有发现不规范或潜在的问题。不过,bar 的翻译可以调整为 '图表' 或具体描述该图标类型(如 ‘柱状图’)。

@dataeaseShu
Copy link
Contributor

LGTM

@dataeaseShu dataeaseShu merged commit b848a50 into dev-v2 Jan 10, 2025
4 checks passed
@dataeaseShu dataeaseShu deleted the pr@dev-v2@refactor_field branch January 10, 2025 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants