main.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import Vue from 'vue'
  2. import App from './App.vue'
  3. import router from './router'
  4. import store from './store'
  5. import Element from 'element-ui'
  6. import GlobalPlugin from './common/plugins'
  7. import { download } from '@/utils/request'
  8. import '@/assets/style/index.scss'
  9. import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from '@/utils/ruoyi'
  10. import './router/permission'
  11. // 自定义表格工具组件
  12. import RightToolbar from '@/components/RightToolbar'
  13. // 字典标签组件
  14. // 字典标签组件
  15. import DictTag from '@/components/DictTag'
  16. import Pagination from '@/components/Pagination/index'
  17. import { getDicts } from '@/network/api/system/dict/data'
  18. import has from '@/common/directive/permission/'
  19. import { hasPerm } from '@/common/utils/has-permission'
  20. // 全局方法挂载
  21. Vue.prototype.getDicts = getDicts
  22. Vue.prototype.parseTime = parseTime
  23. Vue.prototype.resetForm = resetForm
  24. Vue.prototype.addDateRange = addDateRange
  25. Vue.prototype.selectDictLabel = selectDictLabel
  26. Vue.prototype.selectDictLabels = selectDictLabels
  27. Vue.prototype.handleTree = handleTree
  28. Vue.config.productionTip = false
  29. Vue.prototype.download = download
  30. Vue.component('Paginations', Pagination)
  31. Vue.component('RightToolbar', RightToolbar)
  32. Vue.component('DictTag', DictTag)
  33. Vue.directive('has', has)
  34. Vue.prototype.hasPerm = hasPerm
  35. Vue.use(Element, { size: 'medium' })
  36. // 全局方法挂载
  37. Vue.use(GlobalPlugin)
  38. new Vue({
  39. router,
  40. store,
  41. render: h => h(App)
  42. }).$mount('#app')