Open qappleh opened 4 years ago
之前react里面这么用过
let reader = new FileReader(); reader.onload = (e: any) => { this.set({img1: e.target.result}) } this.setState({img1File: input.files[0]}) reader.readAsDataURL(input.files[0]);
之前react里面这么用过