main.js 953 B

1234567891011121314151617181920212223242526272829303132
  1. import Vue from 'vue'
  2. import App from './App'
  3. import router from './router'
  4. import ElementUI from 'element-ui';
  5. import 'element-ui/lib/theme-chalk/index.css';
  6. import './assets/iconfont/iconfont.css';
  7. import httpRequest from './api/httpRequest';
  8. import * as socketApi from './api/wssocket';
  9. import emotion from './api/emotion.js';
  10. import element from './api/element.js';
  11. import store from './store';
  12. import * as enums from './api/enums.js';
  13. import * as date from './api/date.js';
  14. import './utils/directive/dialogDrag';
  15. Vue.use(ElementUI);
  16. // 挂载全局
  17. Vue.prototype.$wsApi = socketApi;
  18. Vue.prototype.$date = date;
  19. Vue.prototype.$http = httpRequest // http请求方法
  20. Vue.prototype.$emo = emotion; // emo表情
  21. Vue.prototype.$elm = element; // 元素操作
  22. Vue.prototype.$enums = enums; // 枚举
  23. Vue.config.productionTip = false;
  24. new Vue({
  25. el: '#app',
  26. // 配置路由
  27. router,
  28. store,
  29. render: h=>h(App)
  30. })