<template>
<div class="test">
<h1>か</h1>
<input type="text" v-model="userIn" v-on:keyup.enter="enterHit" id="tboxInput">
<button v-on:click="enterHit()">Next</button>
</div>
</template>
<script>
export default {
name: 'test',
data() {
return {
title: 'Hello World',
userIn: "",
user: {
firstName: 'Taco',
lastName: 'Bell'
}
}
},
methods: {
enterHit: function(){
//validate
console.log("test");
}
}
}
</script>
<style scoped>
</style>
New to Vue.js. Testing out v-on:keyup.enter functionality. Console in Firefox giving me an error:
[Vue warn]: Property or method "enterHit" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.
TypeError: _vm.enterHit is not a function
Test.vue component is being imported into my main App.vue, for reference.