How to get Class value in Vue Js?(how to bind it)


when toggle open
class=" m-aside–offcanvas-default m-quick-sidebar–on">

when toggle close
class=" m-aside–offcanvas-default">

i need class value into my vueJs as per value change i get changed value how?

i want to get value when it’s change in my component and want to perform action on according…
how i can bind and when change action perform ??
any help

how to get value into my props of this class ?

props: ['myprop'],

watch: {
  myprop: {
    immediate: true, 
    handler (val, oldVal) {
      // do your stuff


How are you changing class?


You shouldn’t watch the DOM for changes, you should watch changes in your data. You should rethink your approach with this in mind.