Browse Source

fix: Upload should work without children

pull/4002/head
Benjy Cui 8 years ago
committed by Benjy Cui
parent
commit
f5cc937c8f
  1. 6
      components/upload/index.tsx

6
components/upload/index.tsx

@ -294,11 +294,11 @@ export default class Upload extends React.Component<UploadProps, any> {
[`${prefixCls}-disabled`]: disabled,
});
const uploadButton = children
? <div className={uploadButtonCls}>
const uploadButton = (
<div className={uploadButtonCls} style={{ display: children ? '' : 'none'}}>
<RcUpload {...rcUploadProps} ref="upload" />
</div>
: null;
);
if (listType === 'picture-card') {
return (

Loading…
Cancel
Save