优化trim代码结构
This commit is contained in:
parent
cc8fa6c5a4
commit
13831522b1
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue