title: Passing data from input to vue's function
body: <p>I want to pass data from an input:</p>
  
  <pre><code>&lt;input
    id="txtName" 
    type="text"
    v-on:keyup.enter="addMessage(/* THIS FIELD VALUE */)"
  /&gt;
  </code></pre>
  
  <p>to a method: </p>
  
  <pre><code>methods: {
    addMessage(name) {
      //stuff
    }
  }
  </code></pre>
  
  <p>I tried using <code>this</code> or <code>this.value</code> as a parameter but it is not working. </p>
  
  <p>How should I solve this?</p>