[solved] dynamic class using window width

  • Hey, guys!

    Not sure what is the best approach here…

    Wanted my button to have full width on small screens only, would that be possible to do something like:

    :class="{‘full-width’: $q.isSm}" ?


  • Well, managed to do this using QWindowObservable.
    Basically, using vuex we can do something like this:

    onResize (width) {
    this.updateIsSm(width < 992)

    and then map getter to a computed property

Log in to reply