Answers for "submit form on enter key in vue js"

0

Vuejs v-model when enter pressed

<input type="text" v-on:keyup.enter="submit" />
<p> {{ outputValueOnEnter }} </p>

//In data() :
outputValueOnEnter = ''

// In methods: 
submit(e) {
 this.outputValueOnEnter = e.target.value
 e.target.value = ''
}
Posted by: Guest on December-16-2020

Code answers related to "submit form on enter key in vue js"

Browse Popular Code Answers by Language