main.js 1006 Bytes
// 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/>'
})