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 VueMeta from 'vue-meta'
|
||||
import PortalVue from 'portal-vue'
|
||||
import { App, plugin } from '@inertiajs/inertia-vue'
|
||||
import { InertiaProgress } from '@inertiajs/progress/src'
|
||||
import { InertiaProgress } from '@inertiajs/progress'
|
||||
import { createInertiaApp } from '@inertiajs/inertia-vue'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
Vue.mixin({ methods: { route: window.route } })
|
||||
Vue.use(plugin)
|
||||
Vue.use(PortalVue)
|
||||
Vue.use(VueMeta)
|
||||
|
||||
InertiaProgress.init()
|
||||
|
||||
const el = document.getElementById('app')
|
||||
|
||||
new Vue({
|
||||
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,
|
||||
createInertiaApp({
|
||||
resolve: name => require(`./Pages/${name}`),
|
||||
setup({ el, app, props }) {
|
||||
new Vue({
|
||||
metaInfo: {
|
||||
titleTemplate: title => (title ? `${title} - Ping CRM` : 'Ping CRM'),
|
||||
},
|
||||
}),
|
||||
}).$mount(el)
|
||||
render: h => h(app, props),
|
||||
}).$mount(el)
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue