The value of $mq is not correct on mouted
See original GitHub issueIssue Description
// main.js
Vue.use(VueMq, {
breakpoints: {
xs: 468,
sm: 768,
md: 1080,
lg: Infinity
}
})
// App.js
{
mounted () {
console.log(this.$mq) // sm, but the viewport size was matched `lg`
}
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:11
Top Results From Across the Web
MQ CRTMQM COMMAND FAILS WITH ERROR AMQ7064 ...
The MQ crtmqm command can fail with error message AMQ7064 ("Log path not valid or inaccessible") if the log directory for the queue...
Read more >Send to MQ from java always uses default installed mqm ...
Our code runs in weblogic and we MQ 6.0. No matter if I use the default createQueueConnection() or createQueueConnection("myuserid","mypassword") it always ...
Read more >Configuring WebSphere MQ with the WebSphere MQ Explorer
CHANNEL1). Create Server Connection Channel window. Second, the WebSphere MQ Client must be installed and configured on the client, which might or might...
Read more >Planning the Sun Cluster HA for WebSphere MQ Installation ...
If you do not intend to install multiple instances of WebSphere MQ, then you do not need to mount /var/mqm as a Global...
Read more >Document - RP33 for MessageQ V5.0 on OVMS VAX | HPE Support
... MessageQ installation when installed in batch mode 5046 - Correct MQ crashing OpenVMS O/S when kernel multi threading enabled 5047 - Incorrect...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Actually, upon further testing I have determined that the value of
$mq
for me is correct atmounted()
time.However, peeking into the source code a bit, the vue-mq plugin defaults to breakpoint size
sm
for all of the Vue lifecycle instance hooks up untilmounted()
, which causes elements that rely onv-if="$mq === 'sm'"
to actually be rendered initially before being removed from the DOM.In my case, setting the
defaultBreakpoint
for the plugin tolg
fixed the issue.That doesn’t fix the issue. Resize your browser down and reload the page. You’ll see the same issue persist. For the issue to be resolved, defaultBreakpoint would need to be deviceWidth aware and render the appropriate breakpoint at SSR