Transitioning to Vue. Installed environment and restored homepage scene overview.
This commit is contained in:
30
assets/js/main.js
Normal file
30
assets/js/main.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import Vue from 'vue';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import router from './router';
|
||||
import initStore from './store';
|
||||
|
||||
import '../css/style.scss';
|
||||
|
||||
import Container from '../components/container/container.vue';
|
||||
|
||||
function init() {
|
||||
const store = initStore(router);
|
||||
|
||||
Vue.mixin({
|
||||
methods: {
|
||||
formatDate: (date, format) => dayjs(date).format(format),
|
||||
},
|
||||
});
|
||||
|
||||
new Vue({ // eslint-disable-line no-new
|
||||
el: '#container',
|
||||
store,
|
||||
router,
|
||||
render(createElement) {
|
||||
return createElement(Container);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
init();
|
||||
Reference in New Issue
Block a user