Skip to content

Commit

Permalink
fix textarea autosize bug
Browse files Browse the repository at this point in the history
  • Loading branch information
baiyaaaaa committed Oct 19, 2016
1 parent 0e8873b commit 3f935a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- Table 增加属性 rowClassName
- TableColumn 增加 fixed 属性,可选值:true, false, left, right
- TableColumn[type="selection"] 增加 selectable 属性
- 修复 Input textarea 在动态赋值时 autosize 没有触发的问题

#### 非兼容性更新

Expand Down
4 changes: 3 additions & 1 deletion packages/input/src/input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 3f935a2

Please sign in to comment.