Skip to content

Conversation

@PengyuDeng
Copy link
Contributor

  • 在TermColumn中新增groupName字段
  • 更新with方法以支持从PropertyMetadata获取分组名称

- 在TermColumn中新增groupName字段
- 更新with方法以支持从PropertyMetadata获取分组名称
public TermColumn with(PropertyMetadata metadata) {
setColumn(metadata.getId());
setName(metadata.getName());
setGroupName(metadata.getExpand("groupName").orElse("").toString());
Copy link
Member

Choose a reason for hiding this comment

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

  1. 魔法值,使用常量定义groupName,推荐在PropertyMetadataConstants中定义
interface Group{
 String name = "groupName";
}
  1. 那为啥不直接放到others里呢?

- 使用 ConfigKey 动态处理分组名称配置
setFullNameCode(I18nSpec.of(null, localeName));
setFullName(fullNameCode.resolveI18nMessage());
}
ConfigKey<String> groupName = ConfigKey.of("groupName", "分组名称", String.class);
Copy link
Member

Choose a reason for hiding this comment

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

使用常量定义撒!

Copy link
Member

Choose a reason for hiding this comment

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

在PropertyMetadataConstants 中定义

@zhou-hao zhou-hao changed the base branch from 2.10 to 2.11 October 30, 2025 04:01
@zhou-hao zhou-hao merged commit ccd7f8b into jetlinks:2.11 Oct 30, 2025
2 of 3 checks passed
@PengyuDeng PengyuDeng deleted the termAddGroupName branch October 31, 2025 00:43
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.

2 participants