Skip to content

Commit

Permalink
fix(LoadingBar): don't overrwrite $q.loadingBar with the bar instance #…
Browse files Browse the repository at this point in the history
  • Loading branch information
pdanpdan committed Jan 17, 2022
1 parent 5b86e11 commit f75fcee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ui/dev/src/pages/global/loadingbar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="q-layout-padding">
<div>Status: {{ this.$q.loadingBar.isActive ? 'active' : 'idle' }}</div>
<div>Status: {{ $q.loadingBar.isActive ? 'active' : 'idle' }}</div>
<h1>LoadingBar global</h1>
<div class="q-gutter-sm">
<q-btn color="primary" label="Add event" @click="add()" />
Expand Down
5 changes: 3 additions & 2 deletions ui/src/plugins/LoadingBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ export default {
setDefaults: noop,

install ({ $q, cfg }) {
$q.loadingBar = this

if (isSSR === true) {
$q.loadingBar = this
return
}

const props = cfg.loadingBar !== void 0
? { ...cfg.loadingBar }
: {}

const bar = $q.loadingBar = new Vue({
const bar = new Vue({
name: 'LoadingBar',

// hide App from Vue devtools
Expand Down

0 comments on commit f75fcee

Please sign in to comment.