后端返回图片或者json错误 ,前端加载和隐藏错误图片利用 img 的 onLoad 和 onError 方法:import React from 'react'; class ImgLoad extends React.Component { constructor(props) { super(props); this.state = { imageStatus: null,isError:true }; } handleImageLoaded() {
JavaScript
2024-01-10
131 点赞
1 评论
198 浏览