I am new in vue js. I want to show hide elements on click. So that What I can do - make a property in data object like
isHidden: false
and add a mehtod like
showHide(){
return this.isHidden = !this.isHidden;
}
And bind the showHide method on click event like
<li @click="showHide">Some text</a>
But the problem is- if there are several list items binding the same click event, all lists will be shown on click, or all will hide. But I want the target element will only show or hide by click.
How can I do this, please?
isHiddenflag on each item? What does this list of items look like?