feat:form刷新支持inited事件&增加asyncApiFinished事件

This commit is contained in:
lvxiaojiao 2023-05-22 10:28:57 +08:00
parent 94c709614f
commit 3ed5f4da1a

View File

@ -1154,17 +1154,12 @@ export default class Form extends React.Component<FormProps, object> {
}
const cbResult = until(
() => store.checkRemote(finnalAsyncApi as Api, store.data),
(ret: any) => {
return ret && ret[finishedField || 'finished'];
},
(ret: any) => ret && ret[finishedField || 'finished'],
cancel => (this.asyncCancel = cancel),
checkInterval
).then((value: any) => {
// 派发asyncApiFinished事件
dispatchEvent(
'asyncApiFinished',
createObject(data, store.data)
);
dispatchEvent('asyncApiFinished', store.data);
});
return {
cbResult,