I
I
ilovemaryjane2018-11-12 15:44:05
Vue.js
ilovemaryjane, 2018-11-12 15:44:05

BeforeRouteLeave stops working after mixin merge?

There is a mixin (part of it):

beforeRouteLeave (to, from, next) {
    this.$store.commit('ui/SET_LEAVING', true)
    this.routeNext = next
  }

After applying it in the component file, everything works fine (I run it later routeNextin the watcher). But! If I add in addition to the mixin additionally beforeRouteLeavein the same component, then everything stops working. It turns out that Vue does not merge beforeRouteLeave?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question