feat:实现动态响应处理
This commit is contained in:
parent
691d3ce121
commit
b18a8c4de8
@ -421,7 +421,7 @@ public class BeanProperty {
|
||||
}
|
||||
if (ArrayUtils.isNotEmpty(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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置当前对象的键值属性
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user