M
M
mindfox2018-04-27 17:19:26
Vue.js
mindfox, 2018-04-27 17:19:26

What logic to use to make such a menu?

I'm making a menu on Vue js, l7beta.staging.wpengine.com . It is necessary to navigate through the child menu items, this function has been implemented. The next function is backtracking. I can not think of a scheme by which I can move through the menu items back and forth. If you look at the full variable, then it is items.children[0].children[0].children[1] - etc. now you need to go back somehow

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Drozdov, 2018-04-27
@mindfox

You save the sequence of transitions in a separate variable, and when you want to go back, subtract a part from the end of the array, and overlay the resulting array on the menu array, it should be filtered))
You just have to implement it in the form of functions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question