forked from marktext/marktext
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
108 lines (95 loc) · 2.01 KB
/
main.js
File metadata and controls
108 lines (95 loc) · 2.01 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import Vue from 'vue'
import VueElectron from 'vue-electron'
import sourceMapSupport from 'source-map-support'
import bootstrapRenderer from './bootstrap'
import VueRouter from 'vue-router'
import lang from 'element-ui/lib/locale/lang/en'
import locale from 'element-ui/lib/locale'
import axios from './axios'
import store from './store'
import './assets/symbolIcon'
import {
Dialog,
Form,
FormItem,
InputNumber,
Button,
Tooltip,
Upload,
Slider,
Checkbox,
ColorPicker,
Col,
Row,
Tree,
Autocomplete,
Switch,
Select,
Option,
Radio,
RadioGroup,
Table,
TableColumn,
Tabs,
TabPane,
Input
} from 'element-ui'
import services from './services'
import routes from './router'
import { addElementStyle } from '@/util/theme'
import './assets/styles/index.css'
import './assets/styles/printService.css'
// -----------------------------------------------
// Decode source map in production - must be registered first
sourceMapSupport.install({
environment: 'node',
handleUncaughtExceptions: false,
hookRequire: false
})
global.marktext = {}
bootstrapRenderer()
addElementStyle()
// -----------------------------------------------
// Be careful when changing code before this line!
// Configure Vue
locale.use(lang)
Vue.use(Dialog)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(InputNumber)
Vue.use(Button)
Vue.use(Tooltip)
Vue.use(Upload)
Vue.use(Slider)
Vue.use(Checkbox)
Vue.use(ColorPicker)
Vue.use(Col)
Vue.use(Row)
Vue.use(Tree)
Vue.use(Autocomplete)
Vue.use(Switch)
Vue.use(Select)
Vue.use(Option)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Input)
Vue.use(VueRouter)
Vue.use(VueElectron)
Vue.http = Vue.prototype.$http = axios
Vue.config.productionTip = false
services.forEach(s => {
Vue.prototype['$' + s.name] = s[s.name]
})
const router = new VueRouter({
routes: routes(global.marktext.env.type)
})
/* eslint-disable no-new */
new Vue({
store,
router,
template: '<router-view class="view"></router-view>'
}).$mount('#app')