【发布时间】:2021-01-01 13:21:44
【问题描述】:
我正在尝试通过单击按钮进行文件上传,但是存在一些问题。
<label>
<input
style={{ display: 'none' }}
type="file"
/>
<Button variant="contained" color="default">Upload</Button>
</label>
这是我的代码,但单击按钮时文件上传不起作用,因此未检测到输入。我该如何解决?
我正在使用 React 和 Material-UI。
【问题讨论】:
标签: reactjs material-ui