优化trim代码结构

This commit is contained in:
catchonme 2019-08-22 10:25:26 +08:00
parent 1a85d5fc33
commit b99eda9a93

View File

@ -182,12 +182,7 @@ export const FormStore = ServiceStore
}
function trimValues() {
let data = iterateChildren(self.data, (item:any) => {
if (typeof item === 'string') {
return item.trim();
}
return item;
});
let data = iterateChildren(self.data, (item:any) => typeof item === 'string' ? item.trim() : item);
self.updateData(data);
}