0👍
Try with $refs
Add your element to ref="yourRef"
, you can select it using by this.$refs.yourRef[0].$el
in method
For Class styling you can use v-bind:class
- [Vuejs]-Vue-socket.io install failing, cannot find 'package.tgz'
- [Vuejs]-Javascript: FBXLoader not displaying anything
-2👍
Using document.querySelector
you can try like this
var element = document.querySelector('[data-row="'+ row + '"][data-cell="' + cell +'"]');
element.addClass('bg-red')
or use the class and style bindings
Source:stackexchange.com