慕少森
这样不就好了,外边的样式你自己搞吧multiple={true}是说你点上传框之后,一次性可以选一张还是多张图,false就只能一张张的上传class ImagePickerExample extends React.Component { state = { files: [], } onChange = (files, type, index) => { console.log(files, type, index); this.setState({ files, }); } render() { const { files } = this.state; return ( <div> <ImagePicker files={files} onChange={this.onChange} onImageClick={(index, fs) => console.log(index, fs)} selectable={files.length < 1} accept="image/gif,image/jpeg,image/jpg,image/png" /> </div> ); }}ReactDOM.render(<ImagePickerExample />, mountNode);