Update app.js to use the new `createInertiaApp()` factory method
This commit is contained in:
parent
d2c1bc9a0e
commit
99b88e8943
|
@ -1,28 +1,24 @@
|
||||||
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 { App, plugin } from '@inertiajs/inertia-vue'
|
import { InertiaProgress } from '@inertiajs/progress'
|
||||||
import { InertiaProgress } from '@inertiajs/progress/src'
|
import { createInertiaApp } from '@inertiajs/inertia-vue'
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
Vue.mixin({ methods: { route: window.route } })
|
Vue.mixin({ methods: { route: window.route } })
|
||||||
Vue.use(plugin)
|
|
||||||
Vue.use(PortalVue)
|
Vue.use(PortalVue)
|
||||||
Vue.use(VueMeta)
|
Vue.use(VueMeta)
|
||||||
|
|
||||||
InertiaProgress.init()
|
InertiaProgress.init()
|
||||||
|
|
||||||
const el = document.getElementById('app')
|
createInertiaApp({
|
||||||
|
resolve: name => require(`./Pages/${name}`),
|
||||||
new Vue({
|
setup({ el, app, props }) {
|
||||||
metaInfo: {
|
new Vue({
|
||||||
titleTemplate: title => (title ? `${title} - Ping CRM` : 'Ping CRM'),
|
metaInfo: {
|
||||||
},
|
titleTemplate: title => (title ? `${title} - Ping CRM` : 'Ping CRM'),
|
||||||
render: h =>
|
|
||||||
h(App, {
|
|
||||||
props: {
|
|
||||||
initialPage: JSON.parse(el.dataset.page),
|
|
||||||
resolveComponent: name => require(`./Pages/${name}`).default,
|
|
||||||
},
|
},
|
||||||
}),
|
render: h => h(app, props),
|
||||||
}).$mount(el)
|
}).$mount(el)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in New Issue