fix: 修复 inputFile inputImage 首次表单提交数据没有携带的问题 (#4730)

This commit is contained in:
liaoxuezhi 2022-06-28 22:03:44 +08:00 committed by GitHub
parent 573980c887
commit 679a606424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -742,8 +742,8 @@ export default class FileControl extends React.Component<FileProps, FileState> {
{
uploading: false
},
() => {
this.onChange(!!this.resolve);
async () => {
await this.onChange(!!this.resolve);
if (this.resolve) {
this.resolve(
@ -932,6 +932,7 @@ export default class FileControl extends React.Component<FileProps, FileState> {
}
onChange((this.emitValue = value), undefined, changeImmediately);
console.log('onChange', changeImmediately);
this.syncAutoFill();
}

View File

@ -702,8 +702,8 @@ export default class ImageControl extends React.Component<
uploading: false,
locked: false
},
() => {
this.onChange(!!this.resolve, false);
async () => {
await this.onChange(!!this.resolve, false);
if (this.resolve) {
this.resolve(