V
V
VegasChickiChicki2019-10-26 09:36:11
JavaScript
VegasChickiChicki, 2019-10-26 09:36:11

How to pass data and data to the animation function?

I'm using Nuxt, I need to execute a function when going to a page. The bottom line is that I need to take data from the data of the current page, I can’t figure out how.
An example of what is:

export default {
transition: {
          name: 'test',
          leave: function (el) {
              //тут мне необходимы данные из data текущей страницы, но я не понимаю как передать сюда this
          }
        },
data () {
            return {
                testCounter: 0,
            }
        },
}

Do not understand the logic ... Please help, thank you!

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