소스 검색

图片加载失败时刷新item绘制边框

zhangyu 5 년 전
부모
커밋
da582e6896
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      saga-web-graph/src/items/SImageItem.ts

+ 2 - 1
saga-web-graph/src/items/SImageItem.ts

@@ -38,8 +38,9 @@ export class SImageItem extends SObjectItem {
             this.isLoadOver = true;
             this.update();
         };
-        this.img.onerror = (e) => {
+        this.img.onerror = (e): void => {
             this.isLoadOver = false;
+            this.update();
             console.log("加载图片错误!");
             console.log(e);
         }