feat: 处理只读状态
This commit is contained in:
parent
3ee6de5bcd
commit
45abcfab4d
@ -22,6 +22,13 @@ public @interface PropertyGroup {
|
||||
*/
|
||||
String code();
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
String icon() default "info-circle";
|
||||
|
||||
/**
|
||||
* 是否默认
|
||||
* 指定为true,默认将未指定分组的项归到该类
|
||||
|
@ -96,7 +96,7 @@ public class BeanController {
|
||||
// 设置分组信息
|
||||
if (clazz.isAnnotationPresent(PropertyGroups.class)) {
|
||||
PropertyGroups groups = clazz.getAnnotation(PropertyGroups.class);
|
||||
info.setGroups(Arrays.stream(groups.value()).map(group -> new BeanPropertyGroup(group.name(), group.code()))
|
||||
info.setGroups(Arrays.stream(groups.value()).map(group -> new BeanPropertyGroup(group.name(), group.code(), group.icon()))
|
||||
.collect(Collectors.toList()));
|
||||
// 尝试补全分组
|
||||
Arrays.stream(groups.value()).filter(PropertyGroup::initial).findFirst()
|
||||
|
@ -17,4 +17,6 @@ public class BeanPropertyGroup {
|
||||
private String name;
|
||||
|
||||
private String code;
|
||||
|
||||
private String icon;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user