From 68580f1bce2fb42d77a1604fba4923dcb59cf32e Mon Sep 17 00:00:00 2001 From: qiang Date: Fri, 17 Apr 2020 15:11:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20image=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=20widthFix=20=E6=A8=A1=E5=BC=8F=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=8A=A8=E6=80=81=E5=8F=98=E5=8C=96=E4=B8=8D?= =?UTF-8?q?=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/view/components/image/index.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/core/view/components/image/index.vue b/src/core/view/components/image/index.vue index e1547447a..beb8f6dd1 100644 --- a/src/core/view/components/image/index.vue +++ b/src/core/view/components/image/index.vue @@ -34,8 +34,7 @@ export default { return { originalWidth: 0, originalHeight: 0, - availHeight: '', - sizeFixed: false + availHeight: '' } }, computed: { @@ -106,7 +105,6 @@ export default { mode (newValue, oldValue) { if (oldValue === 'widthFix') { this.$el.style.height = this.availHeight - this.sizeFixed = false } if (newValue === 'widthFix' && this.ratio) { this._fixSize() @@ -123,7 +121,7 @@ export default { }, methods: { _resize () { - if (this.mode === 'widthFix' && !this.sizeFixed) { + if (this.mode === 'widthFix') { this._fixSize() } }, @@ -136,7 +134,6 @@ export default { height = Math.round(height / 2) * 2 } this.$el.style.height = height + 'px' - this.sizeFixed = true } }, _setContentImage () { -- GitLab