We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11dde6f commit e3cd201Copy full SHA for e3cd201
src/body.js
@@ -1,6 +1,7 @@
1
import { ready } from './utils/dom'
2
import { setBrand } from './utils/colors'
3
import { isSSR } from './plugins/platform'
4
+import { $q, queues } from './install'
5
6
function getBodyClasses ({ is, has, within }, cfg) {
7
const cls = [
@@ -53,7 +54,7 @@ function setColors (brand) {
53
54
}
55
56
export default {
- install ({ $q, cfg, queues }) {
57
+ install ({ cfg }) {
58
if (isSSR) {
59
queues.server.push((q, ctx) => {
60
const update = ctx.ssr.setBodyClasses
src/history.js
@@ -1,11 +1,12 @@
+import { $q } from './install'
__history: [],
add: () => {},
remove: () => {},
8
- install ({ $q, cfg }) {
9
10
if (isSSR || !$q.platform.is.cordova) {
11
return
12
src/i18n.js
@@ -1,9 +1,10 @@
import langEn from '../i18n/en-us'
- install ({ $q, Vue, queues, lang }) {
+ install ({ Vue, lang }) {
const fn = ctx.ssr.setHtmlAttrs
src/icons.js
import materialIcons from '../icons/material-icons'
__installed: false,
- install ({ $q, Vue, iconSet }) {
+ install ({ Vue, iconSet }) {
this.set = (iconDef = materialIcons) => {
iconDef.set = this.set
src/install.js
@@ -23,11 +23,11 @@ export default function (Vue, opts = {}) {
23
const cfg = opts.config || {}
24
25
// required plugins
26
- Platform.install({ $q, Vue, queues })
27
- Body.install({ $q, queues, cfg })
28
- History.install({ $q, cfg })
29
- I18n.install({ $q, Vue, queues, cfg, lang: opts.i18n })
30
- Icons.install({ $q, Vue, queues, iconSet: opts.iconSet })
+ Platform.install({ Vue })
+ Body.install({ cfg })
+ History.install({ cfg })
+ I18n.install({ Vue, cfg, lang: opts.i18n })
+ Icons.install({ Vue, iconSet: opts.iconSet })
31
32
33
Vue.mixin({
@@ -59,10 +59,11 @@ export default function (Vue, opts = {}) {
61
if (opts.plugins) {
62
+ const param = { Vue, cfg }
63
Object.keys(opts.plugins).forEach(key => {
64
const p = opts.plugins[key]
65
if (typeof p.install === 'function' && p !== Platform) {
- p.install({ $q, Vue, queues, cfg })
66
+ p.install(param)
67
68
})
69
src/plugins/action-sheet.js
@@ -1,8 +1,9 @@
import { QActionSheet } from '../components/action-sheet'
import modalFn from '../utils/modal-fn'
+import { $q } from '../install'
- install ({ $q, Vue }) {
+ install ({ Vue }) {
this.create = $q.actionSheet = modalFn(QActionSheet, Vue)
src/plugins/addressbar-color.js
import Platform, { isSSR } from './platform'
import { ready } from '../utils/dom'
import { getBrand } from '../utils/colors'
let metaValue
@@ -46,7 +47,7 @@ function setColor (hexColor) {
46
47
48
49
50
51
this.set = !isSSR && Platform.is.mobile && (
52
Platform.is.cordova ||
Platform.is.winphone || Platform.is.safari ||
src/plugins/app-fullscreen.js
@@ -1,4 +1,5 @@
import { isSSR } from './platform'
const prefixes = {}
@@ -26,7 +27,7 @@ export default {
},
$q.fullscreen = this
if (isSSR) { return }
src/plugins/app-visibility.js
appVisible: false,
this.appVisible = $q.appVisible = true
src/plugins/cookies.js
+import { $q, queues } from '../install'
function encode (string) {
return encodeURIComponent(string)
@@ -139,7 +140,7 @@ export function getObject (ctx = {}) {
139
140
141
142
- install ({ $q, queues }) {
143
+ install () {
144
145
146
q.cookies = getObject(ctx)
0 commit comments