diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c09cf49bde..bee763d2317 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - 修复 Loading 关闭后有几率滚动失效的问题 - 修复 远程搜索的 Select 不能正确渲染默认初始值的问题 - 修复 Switch 的 width 属性无效的问题 +- 修复 Input textarea 在动态赋值时 autosize 没有触发的问题 #### 非兼容性更新 diff --git a/packages/input/src/input.vue b/packages/input/src/input.vue index 6e7fa6321a1..99473ff84ae 100644 --- a/packages/input/src/input.vue +++ b/packages/input/src/input.vue @@ -168,10 +168,12 @@ watch: { 'value'(val, oldValue) { this.currentValue = val; - this.resizeTextarea(); }, 'currentValue'(val) { + this.$nextTick(_ => { + this.resizeTextarea(); + }); this.$emit('input', val); this.$emit('change', val); this.dispatch('form-item', 'el.form.change', [val]);