Click on the current in the vue for loop to change the attribute of the sibling element (vue rookie)

want to use vue to achieve the function, the list is to request the data for loop to render, click the button in the list item to change whether the neighboring sibling elements are displayed, and how to achieve this function, ask the god to help come up with an idea

Mar.31,2021

defines an array list in data to store all the iconic things such as index of item . Each item fires an event with index as a parameter, and then handles the index adjacent index in the event.


  

Let me talk about one of my ideas. The for loop has a key value, which is judged by key and then added to the specified class.

Menu