[Vuejs]-Vue 2, how to data bind to an element that is "data bound"

0👍

You could use watch properties to catch any change in first value and assign it to the second and so on :

new Vue({
  el: '#app',
  data: {
    first: '',
    second: '',
    third:''
  },
  watch:{
     first(val){
     this.second=val;
     },
        second(val){
     this.third=val;
     }
  }
})
<script src="https://unpkg.com/vue"></script>

<div id="app">
<textarea v-model="first"></textarea>


<textarea v-model="second" ></textarea>
  <p>2 >> {{ second }}</p>
  <textarea v-model="third" ></textarea>
   <p>3 >> {{ third }}</p>
</div>

Leave a comment