feat: 处理只读状态

This commit is contained in:
wangyu 2021-09-07 22:43:42 +08:00
parent ab73090d8b
commit 3ee6de5bcd
1 changed files with 7 additions and 3 deletions

View File

@ -273,16 +273,20 @@ public class BeanProperty {
if (StringUtils.isNotBlank(prop.group())) { if (StringUtils.isNotBlank(prop.group())) {
property.group = prop.group(); property.group = prop.group();
} }
property.readonly = prop.readonly(); // 只读状态不显示
if (prop.readonly()) {
origin.remove(property);
}
} else { } else {
BeanProperty property = new BeanProperty(); BeanProperty property = new BeanProperty();
property.setType(BeanPropertyType.STRING); property.setType(BeanPropertyType.STRING);
property.setName(key); property.setName(key);
property.setTitle(prop.title()); property.setTitle(prop.title());
property.setReadonly(prop.readonly()); if (!prop.readonly()) {
result.add(property); result.add(property);
} }
} }
}
return result; return result;
} }
return Collections.emptyList(); return Collections.emptyList();