Update app.js to use new Inertia exports
This commit is contained in:
parent
9b2b7d74ef
commit
27272fb7d2
|
@ -1,27 +1,27 @@
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import VueMeta from 'vue-meta'
|
import VueMeta from 'vue-meta'
|
||||||
import PortalVue from 'portal-vue'
|
import PortalVue from 'portal-vue'
|
||||||
import { InertiaApp } from '@inertiajs/inertia-vue'
|
import { App, plugin } from '@inertiajs/inertia-vue'
|
||||||
import { InertiaProgress } from '@inertiajs/progress/src'
|
import { InertiaProgress } from '@inertiajs/progress/src'
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
Vue.mixin({ methods: { route: window.route } })
|
Vue.mixin({ methods: { route: window.route } })
|
||||||
Vue.use(InertiaApp)
|
Vue.use(plugin)
|
||||||
Vue.use(PortalVue)
|
Vue.use(PortalVue)
|
||||||
Vue.use(VueMeta)
|
Vue.use(VueMeta)
|
||||||
|
|
||||||
InertiaProgress.init()
|
InertiaProgress.init()
|
||||||
|
|
||||||
let app = document.getElementById('app')
|
const el = document.getElementById('app')
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
metaInfo: {
|
metaInfo: {
|
||||||
titleTemplate: (title) => title ? `${title} - Ping CRM` : 'Ping CRM'
|
titleTemplate: (title) => title ? `${title} - Ping CRM` : 'Ping CRM'
|
||||||
},
|
},
|
||||||
render: h => h(InertiaApp, {
|
render: h => h(App, {
|
||||||
props: {
|
props: {
|
||||||
initialPage: JSON.parse(app.dataset.page),
|
initialPage: JSON.parse(el.dataset.page),
|
||||||
resolveComponent: name => import(`@/Pages/${name}`).then(module => module.default),
|
resolveComponent: name => import(`@/Pages/${name}`).then(module => module.default),
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
}).$mount(app)
|
}).$mount(el)
|
||||||
|
|
Loading…
Reference in New Issue