diff --git a/src/core/view/components/image/index.vue b/src/core/view/components/image/index.vue index e1547447a1f690786407449a74ad5f229ff81594..beb8f6dd1bcc1c46405af33350f218b44d9fb942 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 () {