Look at the code below. What does @focus do in this example?
<template>
<input type="text" @focus="changeBackground" @blur="resetBackground" v-bind:style="{backgroundColor: bgColor}">
</template>
<script>
export default {
data() {
return {
bgColor: ''
};
},
methods: {
changeBackground() {
this.bgColor = 'yellow';
},
resetBackground() {
this.bgColor = '';
}
}
}
</script>