feat(REQ-3004) - 根据与前端协商,统一将所有表单字段的 value 都包装为数组,方便多值组件的使用
This commit is contained in:
parent
e0a82705c5
commit
d1839acb99
@ -80,7 +80,8 @@ public interface FormInstanceConverter extends EntityConverter<FormInstanceVO, F
|
||||
|
||||
default List<String> castList(FormField field) {
|
||||
List<String> values = new ArrayList<>();
|
||||
if(Objects.isNull(field.getValue())) {
|
||||
Object value = field.getValue();
|
||||
if (Objects.isNull(value)) {
|
||||
return values;
|
||||
}
|
||||
if (Objects.equals(field.getType(), FormFieldTypes.UPLOAD)) {
|
||||
@ -89,8 +90,7 @@ public interface FormInstanceConverter extends EntityConverter<FormInstanceVO, F
|
||||
.map(i -> UploadFieldDTO.toObject(i).toString())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
Object value = field.getValue();
|
||||
if (Objects.isNull(value) || value instanceof Collection) {
|
||||
if (value instanceof Collection) {
|
||||
return (List<String>) value;
|
||||
}
|
||||
if (value instanceof String) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user