main.js 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 '@/static/ueditor/ueditor.config.js'
  24. // import '@/static/ueditor/ueditor.all.js'
  25. // import '@/static/ueditor/lang/zh-cn/zh-cn.js'
  26. // import '../static/ueditor/ueditor.config.js'
  27. // import '../static/ueditor/ueditor.all.min.js'
  28. // import '../static/ueditor/lang/zh-cn/zh-cn.js'
  29. // import '../static/ueditor/ueditor.parse.min.js'
  30. // import './mock' // simulation data
  31. import '../static/ueditor/ueditor.config.js'
  32. import '../static/ueditor/ueditor.all.min.js'
  33. import '../static/ueditor/lang/zh-cn/zh-cn.js'
  34. import '../static/ueditor/ueditor.parse.min.js'
  35. import VueClipboard from 'vue-clipboard2'
  36. import * as filters from './filters' // global filters
  37. import * as voicePromptFun from './utils/voicePrompt'
  38. import 'default-passive-events'
  39. Vue.prototype.voicePrompt = voicePromptFun.voicePrompt //语音提醒
  40. // import Popup from "./components/Popup/index" //全局删除弹框控件
  41. // Vue.prototype.$popup = Popup.install
  42. // Vue.component(Popup)
  43. import FileSaver from 'file-saver'
  44. import XLSX from 'xlsx'
  45. Vue.prototype.$FileSaver = FileSaver; //设置全局
  46. Vue.prototype.$XLSX = XLSX; //设置全局
  47. import Computed from "../src/xt_pages/components/Computed/index" //自动计算金额控件
  48. Vue.component("Computed",Computed)
  49. // 表格宽度自适应
  50. import fitcolumn from 'v-fit-columns'
  51. Vue.use(fitcolumn)
  52. import VueUeditorWrap from 'vue-ueditor-wrap'
  53. Vue.component('vue-ueditor-wrap', VueUeditorWrap)
  54. Vue.use(Element, {
  55. size: 'medium', // set element-ui default size
  56. i18n: (key, value) => i18n.t(key, value)
  57. })
  58. Vue.use(VueClipboard)
  59. // register global utility filters.
  60. Object.keys(filters).forEach(key => {
  61. Vue.filter(key, filters[key])
  62. })
  63. Vue.config.productionTip = false
  64. new Vue({
  65. el: '#app',
  66. router,
  67. store,
  68. i18n,
  69. render: h => h(App)
  70. })
  71. Vue.prototype.Base64 = require('js-base64').Base64