pingcrm/resources/js/app.js

29 lines
698 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: {
2021-02-27 11:00:09 -03:00
titleTemplate: title => (title ? `${title} - Ping CRM` : 'Ping CRM'),
},
2021-02-27 11:00:09 -03:00
render: h =>
h(App, {
props: {
initialPage: JSON.parse(el.dataset.page),
2021-05-10 16:34:42 -03:00
resolveComponent: name => require(`./Pages/${name}`).default,
2021-02-27 11:00:09 -03:00
},
}),
}).$mount(el)