Answer the question
In order to leave comments, you need to log in
How to setTimeout in Vue?
Hello. Do not judge strictly, I'm at the very beginning of learning vue, but in a combat project.
There is a Home.vue main page. There was a button that calls the method that opens the modal
methods: {
showFirstModal() {
this.$store.commit("showModal", {
name: "сallToRegistrationModal",
props: null,
isShown: true,
});
},
}
Answer the question
In order to leave comments, you need to log in
mounted() {
setTimeout(() =>{
this.showFirstModal()
}, 20000)
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question