使用mui加载网络图片时404,怎么换备用地址
图片有onerror事件,加载失败时触发,在onerror中切换图片路径
<img src="https://img-home.csdnimg.cn/images/不存在的图片路径或者容易加载失败的路径" onerror="this.src='https://img-home.csdnimg.cn/images/20201124032511.png'"/>
加载网络图片要用绝对路径,404就是路径错误了。
图片有加载失败事件的, 失败事件里换备用地址就行了