mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 19:17:54 +08:00
优化trim代码结构
This commit is contained in:
parent
1a85d5fc33
commit
b99eda9a93
@ -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
Block a user