Answer the question
In order to leave comments, you need to log in
How to avoid Vuex and ESLint error?
There is such a method in the index.vue file:
getRouteName() {
const routeName = this.$route.name;
this.$store.dispatch('pageName', routeName);
}
pagePath({dispatch}, routeName) { // вот здесь возникает ошибка якобы "dispatch is not defined"
alert(`Это страница ${routeName}`);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question