pingcrm/resources/js/app.js

28 lines
705 B
JavaScript
Raw Normal View History

2019-03-18 08:53:00 -03:00
import Vue from 'vue'
import VueMeta from 'vue-meta'
import PortalVue from 'portal-vue'
import { App, plugin } from '@inertiajs/inertia-vue'
2020-09-24 12:37:26 -03:00
import { InertiaProgress } from '@inertiajs/progress/src'
2019-03-18 08:53:00 -03:00
Vue.config.productionTip = false
2019-08-12 09:33:13 -03:00
Vue.mixin({ methods: { route: window.route } })
Vue.use(plugin)
2019-03-18 08:53:00 -03:00
Vue.use(PortalVue)
Vue.use(VueMeta)
2019-03-18 08:53:00 -03:00
2020-09-24 12:37:26 -03:00
InertiaProgress.init()
const el = document.getElementById('app')
2019-03-18 08:53:00 -03:00
new Vue({
metaInfo: {
2019-12-18 15:59:44 -03:00
titleTemplate: (title) => title ? `${title} - Ping CRM` : 'Ping CRM'
},
render: h => h(App, {
2019-03-18 08:53:00 -03:00
props: {
initialPage: JSON.parse(el.dataset.page),
resolveComponent: name => import(`@/Pages/${name}`).then(module => module.default),
2019-03-18 08:53:00 -03:00
},
}),
}).$mount(el)