How to change a Vue.js data value within a method called by a DOM event? How to change a Vue.js data value within a method called by a DOM event? vue.js vue.js

How to change a Vue.js data value within a method called by a DOM event?


I'm not seeing what your problem is; your example works perfectly:

new Vue({  el: '#app',  data: {    info: '',  },  methods: {    update: function(event) {      value = event.target.value;      this.info = value;      console.log(value)    }  }});
<script src="https://unpkg.com/vue@2.1.10/dist/vue.js"></script><div id="app">  <input @input="update">  {{ info }}</div>