main.js 951 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import Vue from 'vue'
  2. import App from './App.vue'
  3. import router from './router'
  4. import store from './store'
  5. import ElementUI from 'element-ui';
  6. import 'element-ui/lib/theme-chalk/index.css';
  7. import 'font-awesome/css/font-awesome.css'
  8. import './iconfont/iconfont.css';
  9. import api from './api';
  10. import echarts from 'echarts';
  11. import 'echarts/theme/dark.js'
  12. // import BaiduMap from 'vue-baidu-map'
  13. // Vue.use(BaiduMap, {
  14. // ak: '1hqg34NFaCw9jcv0xG82cI7uINFaXGGM'
  15. // })
  16. Vue.use(ElementUI);
  17. Vue.prototype.$echarts = echarts
  18. Vue.prototype.$api = api;
  19. Vue.config.productionTip = false
  20. Vue.prototype.msgSuccess = function (msg) {
  21. this.$message({ showClose: true, message: msg, type: "success" });
  22. }
  23. Vue.prototype.msgError = function (msg) {
  24. this.$message({ showClose: true, message: msg, type: "error" });
  25. }
  26. Vue.prototype.msgInfo = function (msg) {
  27. this.$message.info(msg);
  28. }
  29. new Vue({
  30. router,
  31. store,
  32. render: h => h(App)
  33. }).$mount('#app')