提交 68580f1b 编写于 作者: Q qiang

fix: 修复 image 组件 widthFix 模式组件大小动态变化不生效的问题

上级 8b36a507
......@@ -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 () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册