Open demiro opened 2 years ago
How can I extend the global $mq object with reactive isMobile / isTablet / isWide, etc properties?
I want to be able to use it similar to $device.isMobile from Nuxt
<div v-if="$mq.isMobile"> ...
and not the long version like
<div v-if="$mq === mobile"> ...
Any idea on how could I extend it to be working like this?
How can I extend the global $mq object with reactive isMobile / isTablet / isWide, etc properties?
I want to be able to use it similar to $device.isMobile from Nuxt
<div v-if="$mq.isMobile"> ...
and not the long version like
<div v-if="$mq === mobile"> ...
Any idea on how could I extend it to be working like this?