Reverse slide transition, VUE JS

Asked

Viewed 176 times

3

I’m developing a single page Aplication/app mobile, with VUE JS, I want to slide when switching pages, and I can already do it this way:

transition name="slide"
router-view
transition

But I wanted the reverse effect of the slide when the user goes back to the page, that is, when the user opens a new page, the page will come from the right, when voting, the page will come from the left.

Has a plugin for Vue router, called Vue-router-Transition (Link) but does not work, is outdated, errors, only works with very old versions of VUE.

It also has tutorial on how to make dynamic transitions, but only works when it is daughter routes, such as site.com/rota1/rota2/rota3, what is not my case: https://router.vuejs.org/en/advanced/transitions.html

I thought the following logic, the before.each.router, define the transition class, (slide-left or slide-right) depending on whether the user clicked on some button Go back, the problem is that I do not know apply this logic in the code, I would have to pass the value of a variable that is in main.js to the app.See and I do not know how to do this...

  • I don’t understand, what is this number?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.