fix: linkage rules cause abnormal field display (#2913)

This commit is contained in:
katherinehhh 2023-10-25 21:45:52 +08:00 committed by GitHub
parent 101e1f8f97
commit bbe7eed314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,12 +146,16 @@ const WithForm = (props: WithFormProps) => {
variables, variables,
localVariables, localVariables,
}); });
// 如果是 linkageRules 数组的最后一个元素
if (index === linkageRules.length - 1) { if (index === linkageRules.length - 1) {
setTimeout(() => // 等待异步操作完成
linkagefields.map((v) => { await new Promise((resolve) => setTimeout(resolve, 0));
v.linkageProperty = {}; // 清空 linkagefields 数组中对象的属性
}), linkagefields.forEach((v) => {
); v.linkageProperty = {};
});
// 清空 linkagefields 数组
linkagefields.length = 0;
} }
}), }),
); );