2016-11-14 759 views

回答

11

您需要組件來包裝你的輸入,並添加containerElement屬性與值 '標籤' ...

<RaisedButton 
    containerElement='label' // <-- Just add me! 
    label='My Label'> 
    <input type="file" /> 
</RaisedButton> 

你可以閱讀更多關於它在這個GitHub上issue

+0

如何使用這個文件對象? HTML FileReader似乎不起作用:/ 考慮到,我使用了'' 'handleFile = file => { ..} – Paulo