2019-06-03 03:31:38 +00:00
|
|
|
import Vue from 'vue';
|
|
|
|
import dayjs from 'dayjs';
|
2019-11-13 02:14:24 +00:00
|
|
|
import VTooltip from 'v-tooltip';
|
2019-06-03 03:31:38 +00:00
|
|
|
|
|
|
|
import router from './router';
|
|
|
|
import initStore from './store';
|
|
|
|
|
|
|
|
import '../css/style.scss';
|
|
|
|
|
|
|
|
import Container from '../components/container/container.vue';
|
2019-10-28 01:54:37 +00:00
|
|
|
import Icon from '../components/icon/icon.vue';
|
2019-06-03 03:31:38 +00:00
|
|
|
|
|
|
|
function init() {
|
|
|
|
const store = initStore(router);
|
|
|
|
|
|
|
|
Vue.mixin({
|
2019-10-28 01:54:37 +00:00
|
|
|
components: {
|
|
|
|
Icon,
|
|
|
|
},
|
2019-07-06 03:29:12 +00:00
|
|
|
watch: {
|
|
|
|
pageTitle(title) {
|
|
|
|
if (title) {
|
2019-09-28 01:26:04 +00:00
|
|
|
document.title = `traxxx - ${title}`;
|
2019-07-06 03:29:12 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-09-28 01:26:04 +00:00
|
|
|
document.title = 'traxxx';
|
2019-07-06 03:29:12 +00:00
|
|
|
},
|
|
|
|
},
|
2019-06-03 03:31:38 +00:00
|
|
|
methods: {
|
|
|
|
formatDate: (date, format) => dayjs(date).format(format),
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2019-11-13 02:14:24 +00:00
|
|
|
Vue.use(VTooltip);
|
|
|
|
|
2019-06-03 03:31:38 +00:00
|
|
|
new Vue({ // eslint-disable-line no-new
|
|
|
|
el: '#container',
|
|
|
|
store,
|
|
|
|
router,
|
|
|
|
render(createElement) {
|
|
|
|
return createElement(Container);
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
init();
|