diff --git a/src/components/TextareaAutosize.vue b/src/components/TextareaAutosize.vue index 8eaab7d..74e1faa 100644 --- a/src/components/TextareaAutosize.vue +++ b/src/components/TextareaAutosize.vue @@ -1,7 +1,8 @@ @@ -35,8 +36,6 @@ export default { }, data () { return { - // data property for v-model binding with real textarea tag - val: null, // works when content height becomes more then value of the maxHeight property maxHeightScroll: false, height: 'auto' @@ -65,12 +64,8 @@ export default { } }, watch: { - value (val) { - this.val = val - }, - val (val) { + value () { this.$nextTick(this.resize) - this.$emit('input', val) }, minHeight () { this.$nextTick(this.resize) @@ -109,9 +104,6 @@ export default { return this } }, - created () { - this.val = this.value - }, mounted () { this.resize() }