Yes
Switch
How can I do this?
One page has multiple card, and every card has a switch, the cards are genereated by 'v-for' loop. Now I need to recognize which card's switch triggered. I ever use a param to get this but now change event has a fixed param which is new state's bool value. My earlier code is not work any longer.
I try to use @change="switch(new_state, index)" but it does not work...
See: https://jsfiddle.net/okkthab6/
Outputs are in the Console.
@change="val => handleChange(val, index)"
Most helpful comment
See: https://jsfiddle.net/okkthab6/
Outputs are in the Console.