main.js
1006 Bytes
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
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import qs from 'qs'
import vueClipboard from 'vue-clipboard2'
import JsonViewer from 'vue-json-viewer'
import VCharts from 'v-charts'
Vue.config.productionTip = false
Vue.prototype.$http = axios
Vue.prototype.$qs=qs
//axios.defaults.baseURL = 'http://127.0.0.1:9090'
axios.defaults.baseURL = 'http://43.140.221.162:9090'
Vue.use(Element, { size: 'small', zIndex: 3000 });
Vue.use(vueClipboard);
Vue.use(JsonViewer);
Vue.use(VCharts);
router.beforeEach((to, from, next) => {
if (to.meta.title) {
document.title = to.meta.title
}
next()
})
/* eslint-disable no-new */
new Vue({
el: '#app',
render: h => h(App),
router,
components: { App },
template: '<App/>'
})