resizeTextarea
给 el-input
加上 ref="xxx"
改变 autosize
后 调用 this.$refs.xxx.resizeTextarea();
也可以再 nextTick
中调用
this.$nextTick(() => {
this.$refs.xxx.resizeTextarea();
});
v-if
el-input
里面内容过多的时候上述方法也无效了
可以使用 v-if
给 el-input
加上 v-if="xxx"
改变 autosize
后
this.xxx = false;
this.$nextTick(() => {
this.xxx = true;
});