Merge pull request #6961 from 2betop/fix-form0523

fix: 修复 form 请求回来后验证获取数据任为旧数据的问题 Close: #6949
This commit is contained in:
hsm-lv 2023-05-23 21:00:24 +08:00 committed by GitHub
commit c984b9ecbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -187,7 +187,13 @@ export const FormStore = ServiceStore.named('FormStore')
self.updateData(values, tag, replace);
// 如果数据域中有数据变化就都reset一下去掉之前残留的验证消息
self.items.forEach(item => item.reset());
self.items.forEach(item => {
const value = item.value;
if (value !== item.tmpValue) {
item.changeTmpValue(value);
}
item.reset();
});
// 同步 options
syncOptions();