main.js 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import Vue from 'vue'
  2. import 'normalize.css/normalize.css' // A modern alternative to CSS resets
  3. import Element from 'element-ui'
  4. import 'element-ui/lib/theme-chalk/index.css'
  5. import '@/styles/index.scss' // global css
  6. import '@/styles/variables.scss' // global css
  7. import '@/assets/iconfont/iconfont.css'
  8. import '@/assets/icon/iconfont.css'
  9. import {
  10. Message
  11. } from 'element-ui'
  12. import App from './App'
  13. import router from './router'
  14. import store from './store'
  15. import {
  16. Base64
  17. } from 'js-base64'
  18. import i18n from './lang' // Internationalization
  19. import './icons' // icon
  20. import './errorLog' // error log
  21. // import './permission' // permission control
  22. import './xt_permission'
  23. // import './mock' // simulation data
  24. import VueClipboard from 'vue-clipboard2'
  25. import * as filters from './filters' // global filters
  26. import * as voicePromptFun from './utils/voicePrompt'
  27. import 'default-passive-events'
  28. Vue.prototype.voicePrompt = voicePromptFun.voicePrompt //语音提醒
  29. // import Popup from "./components/Popup/index" //全局删除弹框控件
  30. // Vue.prototype.$popup = Popup.install
  31. // Vue.component(Popup)
  32. import FileSaver from 'file-saver'
  33. import XLSX from 'xlsx'
  34. Vue.prototype.$FileSaver = FileSaver; //设置全局
  35. Vue.prototype.$XLSX = XLSX; //设置全局
  36. import Computed from "../src/xt_pages/components/Computed/index" //自动计算金额控件
  37. Vue.component("Computed",Computed)
  38. Vue.use(Element, {
  39. size: 'medium', // set element-ui default size
  40. i18n: (key, value) => i18n.t(key, value)
  41. })
  42. Vue.use(VueClipboard)
  43. // register global utility filters.
  44. Object.keys(filters).forEach(key => {
  45. Vue.filter(key, filters[key])
  46. })
  47. Vue.config.productionTip = false
  48. new Vue({
  49. el: '#app',
  50. router,
  51. store,
  52. i18n,
  53. render: h => h(App)
  54. })
  55. Vue.prototype.Base64 = require('js-base64').Base64