如何正确加载此图像?
import image_1 from "../../static_media/1.png"
handleClick = async (e) => {
this.loadImage({
"0": {
name: "1.png",
image: image_1,
backend_address: await fetch(image_1).then(res => res.blob())
}})
}
当我这样做的时候
console.log(this.state.files[0])
我明白了
“/static/media/1.46b58831.png”名称:“1.png”[[Prototype]]:对象
当我做以下事情时
<Image src={this.state.files[0].image} />
TypeError:无法读取未定义的属性(读取“图像”)