mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 04:48:32 +08:00
修复上传关闭自动上传后,表单提交数据丢失问题
This commit is contained in:
parent
4c5d0fccf5
commit
cdf5a77f7d
@ -457,7 +457,7 @@ export default class FileControl extends React.Component<FileProps, FileState> {
|
||||
uploading: false
|
||||
},
|
||||
() => {
|
||||
this.onChange();
|
||||
this.onChange(!!this.resolve);
|
||||
|
||||
if (this.resolve) {
|
||||
this.resolve(
|
||||
@ -587,7 +587,7 @@ export default class FileControl extends React.Component<FileProps, FileState> {
|
||||
});
|
||||
}
|
||||
|
||||
onChange() {
|
||||
onChange(changeImmediately?: boolean) {
|
||||
const {
|
||||
multiple,
|
||||
onChange,
|
||||
@ -620,7 +620,7 @@ export default class FileControl extends React.Component<FileProps, FileState> {
|
||||
value = typeof resetValue === 'undefined' ? '' : resetValue;
|
||||
}
|
||||
|
||||
onChange((this.emitValue = value));
|
||||
onChange((this.emitValue = value), undefined, changeImmediately);
|
||||
}
|
||||
|
||||
uploadFile(
|
||||
|
@ -438,7 +438,7 @@ export default class ImageControl extends React.Component<
|
||||
locked: false
|
||||
},
|
||||
() => {
|
||||
this.onChange();
|
||||
this.onChange(!!this.resolve);
|
||||
|
||||
if (this.resolve) {
|
||||
this.resolve(
|
||||
@ -499,7 +499,7 @@ export default class ImageControl extends React.Component<
|
||||
});
|
||||
}
|
||||
|
||||
onChange() {
|
||||
onChange(changeImmediately?: boolean) {
|
||||
const {
|
||||
multiple,
|
||||
onChange,
|
||||
@ -533,7 +533,7 @@ export default class ImageControl extends React.Component<
|
||||
: newValue;
|
||||
}
|
||||
|
||||
onChange((this.emitValue = newValue));
|
||||
onChange((this.emitValue = newValue), undefined, changeImmediately);
|
||||
}
|
||||
|
||||
handleSelect() {
|
||||
|
Loading…
Reference in New Issue
Block a user