diff --git a/docs/zh-CN/components/form/input-file.md b/docs/zh-CN/components/form/input-file.md index adb52da87..2e046f2f6 100755 --- a/docs/zh-CN/components/form/input-file.md +++ b/docs/zh-CN/components/form/input-file.md @@ -93,7 +93,7 @@ order: 21 ## 自动填充 -上传成功后,可以通过配置 `autoFill` 将上传接口返回的值填充到某个表单项中: +上传成功后,可以通过配置 `autoFill` 将上传接口返回的值填充到某个表单项中(在非表单下暂不支持): ```schema: scope="body" { @@ -111,7 +111,7 @@ order: 21 } }, { - "type": "text", + "type": "input-text", "name": "myUrl", "label": "url" } diff --git a/src/renderers/Form/InputFile.tsx b/src/renderers/Form/InputFile.tsx index 003cdc2d9..e776889c0 100644 --- a/src/renderers/Form/InputFile.tsx +++ b/src/renderers/Form/InputFile.tsx @@ -866,7 +866,7 @@ export default class FileControl extends React.Component { } : files[0] ); - onBulkChange(toSync); + onBulkChange && onBulkChange(toSync); } }