feat:实现动态响应处理

This commit is contained in:
wangyu 2022-01-15 22:29:13 +08:00
parent 691d3ce121
commit b18a8c4de8
1 changed files with 17 additions and 1 deletions

View File

@ -421,7 +421,7 @@ public class BeanProperty {
} }
if (ArrayUtils.isNotEmpty(item.props())) { if (ArrayUtils.isNotEmpty(item.props())) {
for (FormItem.Prop prop : item.props()) { for (FormItem.Prop prop : item.props()) {
property.prop(prop.key(), prop.value()); property.prop(prop.key(), propValue(prop.value()));
} }
} }
} }
@ -502,6 +502,22 @@ public class BeanProperty {
} }
} }
/**
* 细化解析属性值
*
* @param value
* @return 结果
*/
private static Object propValue(String value) {
if ("true".equals(value)) {
return true;
}
if ("false".equals(value)) {
return false;
}
return value;
}
/** /**
* 设置当前对象的键值属性 * 设置当前对象的键值属性
* *