Skip to content

Commit 25dfc5a

Browse files
committed
Update plugins
1 parent c1b4870 commit 25dfc5a

File tree

9 files changed

+23
-23
lines changed

9 files changed

+23
-23
lines changed

src/install.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ export default function (_Vue, opts = {}) {
2828

2929
setVue(_Vue)
3030

31-
const Quasar = {
31+
const $q = {
3232
version,
3333
theme: __THEME__
3434
}
3535

3636
// required plugins
37-
Platform.install({ Quasar })
37+
Platform.install({ $q })
3838
History.install()
3939

4040
// inject body classes
@@ -60,10 +60,10 @@ export default function (_Vue, opts = {}) {
6060
Object.keys(opts.plugins).forEach(key => {
6161
const p = opts.plugins[key]
6262
if (typeof p.install === 'function') {
63-
p.install({ Quasar, Vue: _Vue })
63+
p.install({ $q, Vue: _Vue })
6464
}
6565
})
6666
}
6767

68-
_Vue.prototype.$q = Quasar
68+
_Vue.prototype.$q = $q
6969
}

src/plugins/action-sheet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import modalFn from '../utils/modal-fn'
33

44
export default {
55
__installed: false,
6-
install ({ Quasar, Vue }) {
6+
install ({ $q, Vue }) {
77
if (this.__installed) { return }
88
this.__installed = true
99

10-
Quasar.actionSheet = modalFn(QActionSheet, Vue)
10+
$q.actionSheet = modalFn(QActionSheet, Vue)
1111
}
1212
}

src/plugins/app-fullscreen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default {
2424
},
2525

2626
__installed: false,
27-
install ({ Quasar, Vue }) {
27+
install ({ $q, Vue }) {
2828
if (this.__installed) { return }
2929
this.__installed = true
3030

@@ -64,6 +64,6 @@ export default {
6464
})
6565

6666
Vue.util.defineReactive({}, 'isActive', this)
67-
Quasar.fullscreen = this
67+
$q.fullscreen = this
6868
}
6969
}

src/plugins/app-visibility.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export default {
33
isVisible: null,
44

55
__installed: false,
6-
install ({ Quasar, Vue }) {
6+
install ({ $q, Vue }) {
77
if (this.__installed) { return }
88
this.__installed = true
99

@@ -23,13 +23,13 @@ export default {
2323
}
2424

2525
const update = () => {
26-
this.isVisible = Quasar.appVisible = !document[prop]
26+
this.isVisible = $q.appVisible = !document[prop]
2727
}
2828

2929
update()
3030

3131
if (evt && typeof document[prop] !== 'undefined') {
32-
Vue.util.defineReactive({}, 'appVisible', Quasar)
32+
Vue.util.defineReactive({}, 'appVisible', $q)
3333
document.addEventListener(evt, update, false)
3434
}
3535
}

src/plugins/cookies.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ export default {
9797
all: () => get(),
9898

9999
__installed: false,
100-
install ({ Quasar }) {
100+
install ({ $q }) {
101101
if (this.__installed) { return }
102102
this.__installed = true
103103

104-
Quasar.cookies = this
104+
$q.cookies = this
105105
}
106106
}

src/plugins/dialog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import modalFn from '../utils/modal-fn'
33

44
export default {
55
__installed: false,
6-
install ({ Quasar, Vue }) {
6+
install ({ $q, Vue }) {
77
if (this.__installed) { return }
88
this.__installed = true
99

10-
Quasar.dialog = modalFn(QDialog, Vue)
10+
$q.dialog = modalFn(QDialog, Vue)
1111
}
1212
}

src/plugins/loading.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ const Loading = {
9595
hide,
9696

9797
__installed: false,
98-
install ({ Quasar, Vue }) {
98+
install ({ $q, Vue }) {
9999
if (this.__installed) { return }
100100
this.__installed = true
101101

102-
Quasar.loading = Loading
102+
$q.loading = Loading
103103
}
104104
}
105105

src/plugins/platform.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ function getPlatform () {
165165

166166
const Platform = {
167167
__installed: false,
168-
install ({ Quasar }) {
168+
install ({ $q }) {
169169
if (this.__installed) { return }
170170
this.__installed = true
171171

@@ -177,7 +177,7 @@ const Platform = {
177177
iframe: window.self !== window.top
178178
}
179179

180-
Quasar.platform = Platform
180+
$q.platform = Platform
181181
}
182182
}
183183

src/plugins/web-storage.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ export const LocalStorage = {
163163
isEmpty: storageIsEmpty.local,
164164

165165
__installed: false,
166-
install ({ Quasar }) {
166+
install ({ $q }) {
167167
if (this.__installed) { return }
168168
this.__installed = true
169169

170-
Quasar.localStorage = LocalStorage
170+
$q.localStorage = LocalStorage
171171
}
172172
}
173173

@@ -185,10 +185,10 @@ export const SessionStorage = {
185185
isEmpty: storageIsEmpty.session,
186186

187187
__installed: false,
188-
install ({ Quasar }) {
188+
install ({ $q }) {
189189
if (this.__installed) { return }
190190
this.__installed = true
191191

192-
Quasar.sessionStorage = SessionStorage
192+
$q.sessionStorage = SessionStorage
193193
}
194194
}

0 commit comments

Comments
 (0)