From 0ac8a7d13678c22ad9533428e9c0997a9e306b12 Mon Sep 17 00:00:00 2001 From: qiang Date: Fri, 17 Jun 2022 16:18:29 +0800 Subject: [PATCH] fix: image event onLoad --- src/core/view/components/image/index.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/view/components/image/index.vue b/src/core/view/components/image/index.vue index f08c6b047..4d63ecc51 100644 --- a/src/core/view/components/image/index.vue +++ b/src/core/view/components/image/index.vue @@ -172,8 +172,8 @@ export default { const img = this._img = this._img || new Image() img.onload = $event => { this._img = null - this.originalWidth = img.width - this.originalHeight = img.height + const width = this.originalWidth = img.width + const height = this.originalHeight = img.height this._fixSize() @@ -186,8 +186,8 @@ export default { this.$el.appendChild(img) this.$trigger('load', $event, { - width: img.width, - height: img.height + width, + height }) } img.onerror = $event => { -- GitLab