This repository was archived by the owner on Jan 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.ts
68 lines (54 loc) · 1.75 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/index'
import {Util} from '@/Util';
import VeeValidate from 'vee-validate';
import Multiselect from 'vue-multiselect'
import './../node_modules/gentelella/vendors/bootstrap/js/tooltip.js';
require('jquery-slimscroll/jquery.slimscroll.js');
require('ckeditor/ckeditor.js');
declare let CKEDITOR: any;
let DOMAIN_CODE: any = '000';
CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;
CKEDITOR.config.allowedContent = true;
CKEDITOR.config.basePath = '/';
CKEDITOR.dtd.$removeEmpty['i'] = false;
CKEDITOR.dtd.$removeEmpty['span'] = false;
/*
* Редакторы
*/
CKEDITOR.config.filebrowserBrowseUrl = '/elfinder/ckeditor';
CKEDITOR.config.contentsCss = ['http://' + window.location.hostname + '/themes/' + DOMAIN_CODE + '/default/assets/editor/style.css'];
Vue.component('multiselect', Multiselect);
Vue.use(VeeValidate);
let axios = require('axios');
Vue.config.productionTip = false;
router.beforeEach((to, from, next) => {
store.dispatch('setBreadcrumbs', {
items: []
});
if (store.getters.getRouteNotify == true) {
alert('Подтверждение перехода');
Util.deleteDialog({
title: 'Подтверждение перехода',
text: 'На странице были внесены изменения, подтвердите переход...',
text_ok: 'Перейти',
callback: function () {
store.dispatch('setRouteNotify', false);
next()
}
});
next(false)
} else {
next()
}
});
new Vue({
router,
store,
render: h => h(App),
methods: {},
created() {
}
}).$mount('#app');