0👍
I’ve tested this code based on your question and it works fine for me.
You should pass the event
parameter to the switchItOn
and use event.target.parentNode
as the selector.
switchItOn: function(event) {
console.log(event.target.parentNode)
},
If you’re interested in this property, you can read about it here
- [Vuejs]-Format json for line chart using laravel api and vue js
- [Vuejs]-Modal not showing in Vue based on query parameter
Source:stackexchange.com