adrema/resources/js/app.js

29 lines
753 B
JavaScript
Raw Normal View History

2020-04-10 20:32:12 +02:00
import Vue from 'vue';
2021-04-10 19:45:11 +02:00
import { App, plugin } from '@inertiajs/inertia-vue'
2020-04-10 20:32:12 +02:00
import 'font-awesome/css/font-awesome.css';
2020-04-12 00:26:44 +02:00
import Echo from 'laravel-echo';
window.io = require('socket.io-client');
2021-04-11 00:57:47 +02:00
import Sprite from './components/Sprite.js';
2020-04-10 20:32:12 +02:00
2021-04-10 19:45:11 +02:00
import FText from './components/FText.vue';
2021-04-11 02:55:26 +02:00
import Pages from './components/Pages.vue';
import VBool from './components/VBool.vue';
2020-04-10 20:32:12 +02:00
2021-04-10 19:45:11 +02:00
Vue.use(plugin)
Vue.component('f-text', FText);
2021-04-11 00:57:47 +02:00
Vue.component('sprite', Sprite);
2021-04-11 02:55:26 +02:00
Vue.component('pages', Pages);
Vue.component('v-bool', VBool);
2020-04-10 20:32:12 +02:00
2021-04-10 19:45:11 +02:00
const el = document.getElementById('app')
2020-04-12 00:26:44 +02:00
2020-04-10 20:32:12 +02:00
new Vue({
2021-04-10 19:45:11 +02:00
render: h => h(App, {
props: {
initialPage: JSON.parse(el.dataset.page),
resolveComponent: name => require(`./views/${name}`).default,
},
}),
}).$mount(el);