Merge pull request #4714 from igrowp/fix-upload

fix: 上传文件不能回显问题
This commit is contained in:
hsm-lv 2022-06-27 21:21:06 +08:00 committed by GitHub
commit 832a6ec500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -440,11 +440,7 @@ export default class FileControl extends React.Component<FileProps, FileState> {
componentDidUpdate(prevProps: FileProps) {
const props = this.props;
if (
prevProps.value !== props.value &&
this.emitValue !== props.value &&
props.formInited !== false
) {
if (prevProps.value !== props.value && this.emitValue !== props.value) {
const value: string | Array<string | FileValue> | FileValue = props.value;
const joinValues = props.joinValues;
const delimiter = props.delimiter as string;
@ -489,7 +485,7 @@ export default class FileControl extends React.Component<FileProps, FileState> {
{
files: files
},
this.syncAutoFill
props.formInited !== false ? this.syncAutoFill : undefined
);
}
}