提交 0ac8a7d1 编写于 作者: Q qiang

fix: image event onLoad

上级 4bbb1e19
...@@ -172,8 +172,8 @@ export default { ...@@ -172,8 +172,8 @@ export default {
const img = this._img = this._img || new Image() const img = this._img = this._img || new Image()
img.onload = $event => { img.onload = $event => {
this._img = null this._img = null
this.originalWidth = img.width const width = this.originalWidth = img.width
this.originalHeight = img.height const height = this.originalHeight = img.height
this._fixSize() this._fixSize()
...@@ -186,8 +186,8 @@ export default { ...@@ -186,8 +186,8 @@ export default {
this.$el.appendChild(img) this.$el.appendChild(img)
this.$trigger('load', $event, { this.$trigger('load', $event, {
width: img.width, width,
height: img.height height
}) })
} }
img.onerror = $event => { img.onerror = $event => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册