📜  多张图片上传反应 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:10.931000             🧑  作者: Mango

代码示例1
class ImageUpload extends React.Component {
  state = {
    files: []
  }

  fileSelectedHandler = (e) => {
    this.setState({ files: [...this.state.files, ...e.target.files] })
  }

  render() {
    return (
      

Upload images

Images

) } } ReactDOM.render(, document.getElementById('app'))