// Vanilla JS Code Conversion
const app = new Vue({
el: '#app',
methods: {
// Logged out Events
loginHelp: function() {
this.$refs.forgotten.style.display = 'flex';
this.$refs.login.style.display = 'none';
this.$refs.signup.style.display = 'none';
},
forgottenBack: function() {
this.$refs.forgotten.style.display = 'none';
this.$refs.login.style.display = 'flex';
this.$refs.signup.style.display = 'none';
},
signupBtn: function() {
this.$refs.forgotten.style.display = 'none';
this.$refs.login.style.display = 'none';
this.$refs.signup.style.display = 'flex';
},
signupBack: function() {
this.$refs.forgotten.style.display = 'none';
this.$refs.login.style.display = 'flex';
this.$refs.signup.style.display = 'none';
}
}
});
This is my attempt to convert vanilla JavaScript code to Vue.js. I created a new Vue instance and defined methods for handling the logged out events. However, I encountered some errors while trying to implement this conversion. Can you help me debug and successfully convert this code?
<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";
export default {
name: "Home",
methods: {
// Method declarations here
},
components: {
HelloWorld
}
};
</script>