项目基础确认搭建完成
此提交包含在:
@@ -1,7 +1,7 @@
|
||||
import { Component } from 'react';
|
||||
import './upload.css';
|
||||
|
||||
// copilot抄来的模板
|
||||
// copilot抄来的模板,可恶怎么有这么明显的bug啊
|
||||
export class UploadContainer extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@@ -18,10 +18,9 @@ export class UploadContainer extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="upload-container">
|
||||
<input type="file" onChange={this.handleChange} />
|
||||
{this.state.files.map((file, i) => (
|
||||
<input type="file" onChange={this.handleChange} multiple />
|
||||
{Array.prototype.map.call(this.state.files, (file, i) => (
|
||||
<div key={i} className="upload-item">
|
||||
<img className="upload-item-img" src={file.preview} />
|
||||
<p className="upload-item-name">{file.name}</p>
|
||||
</div>
|
||||
))}
|
||||
|
新增問題並參考
封鎖使用者