diff --git a/src/components/textarea/Textarea.vue b/src/components/textarea/Textarea.vue index aafe0601e..fe6245569 100755 --- a/src/components/textarea/Textarea.vue +++ b/src/components/textarea/Textarea.vue @@ -21,8 +21,9 @@ export default { }, methods: { resize() { + const style = window.getComputedStyle(this.$el); this.$el.style.height = 'auto'; - this.$el.style.height = this.$el.scrollHeight + 'px'; + this.$el.style.height = `calc(${style.borderTopWidth} + ${style.borderBottomWidth} + ${this.$el.scrollHeight}px)`; if (parseFloat(this.$el.style.height) >= parseFloat(this.$el.style.maxHeight)) { this.$el.style.overflowY = "scroll";