From c49a05e427e5b82200fa96aca5ad1ce3109ed6c7 Mon Sep 17 00:00:00 2001 From: sunfei Date: Tue, 29 Jun 2021 19:48:57 +0800 Subject: [PATCH] Update width and height for Image onload Signed-off-by: sunfei --- runtime/main/page/Image.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/main/page/Image.ts b/runtime/main/page/Image.ts index 5efe28b4..e88348e5 100644 --- a/runtime/main/page/Image.ts +++ b/runtime/main/page/Image.ts @@ -51,8 +51,10 @@ export class Image { width: this._width, height: this._height, success: data => { + this._width = data.width; + this._height = data.height; if (this.onload && typeof this.onload === 'function') { - this.onload(data); + this.onload(); } }, fail: data => {