综合办公系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.js 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * @Author: ysh
  3. * @Date: 2024-01-03 09:23:11
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2024-04-24 15:36:45
  6. */
  7. import Vue from 'vue'
  8. import Cookies from 'js-cookie'
  9. import Element from 'element-ui'
  10. import './assets/styles/element-variables.scss'
  11. import '@/assets/styles/index.scss' // global css
  12. import '@/assets/styles/ruoyi.scss' // ruoyi css
  13. import App from './App'
  14. import store from './store'
  15. import router from './router'
  16. import directive from './directive' // directive
  17. import plugins from './plugins' // plugins
  18. import { download } from '@/utils/request'
  19. import './assets/icons' // icon
  20. import './permission' // permission control
  21. import { getDicts } from "@/api/system/dict/data";
  22. import { getConfigKey } from "@/api/system/config";
  23. import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
  24. // 标题组件
  25. import RowTitle from '@/components/RowTitle'
  26. // 分页组件
  27. import Pagination from "@/components/Pagination";
  28. // 自定义表格工具组件
  29. import RightToolbar from "@/components/RightToolbar"
  30. // 富文本组件
  31. import Editor from "@/components/Editor"
  32. // 文件上传组件
  33. import FileUpload from "@/components/FileUpload"
  34. // 图片上传组件
  35. import ImageUpload from "@/components/ImageUpload"
  36. // 图片预览组件
  37. import ImagePreview from "@/components/ImagePreview"
  38. // 字典标签组件
  39. import DictTag from '@/components/DictTag'
  40. // 头部标签组件
  41. import VueMeta from 'vue-meta'
  42. // 字典数据组件
  43. import DictData from '@/components/DictData'
  44. import Tinymce from '@/components/tinymce/index.vue'
  45. import publicData from '@/assets/datas/publicData'
  46. // 全局方法挂载
  47. Vue.prototype.getDicts = getDicts
  48. Vue.prototype.getConfigKey = getConfigKey
  49. Vue.prototype.parseTime = parseTime
  50. Vue.prototype.resetForm = resetForm
  51. Vue.prototype.addDateRange = addDateRange
  52. Vue.prototype.selectDictLabel = selectDictLabel
  53. Vue.prototype.selectDictLabels = selectDictLabels
  54. Vue.prototype.download = download
  55. Vue.prototype.handleTree = handleTree
  56. Vue.prototype.publicData = publicData
  57. // 全局组件挂载
  58. Vue.component('DictTag', DictTag)
  59. Vue.component('Pagination', Pagination)
  60. Vue.component('RightToolbar', RightToolbar)
  61. Vue.component('Editor', Editor)
  62. Vue.component('FileUpload', FileUpload)
  63. Vue.component('ImageUpload', ImageUpload)
  64. Vue.component('ImagePreview', ImagePreview)
  65. Vue.component('tinymce', Tinymce)
  66. Vue.component('RowTitle', RowTitle)
  67. Vue.use(directive)
  68. Vue.use(plugins)
  69. Vue.use(VueMeta)
  70. DictData.install()
  71. /**
  72. * If you don't want to use mock-server
  73. * you want to use MockJs for mock api
  74. * you can execute: mockXHR()
  75. *
  76. * Currently MockJs will be used in the production environment,
  77. * please remove it before going online! ! !
  78. */
  79. Vue.use(Element, {
  80. size: Cookies.get('size') || 'medium' // set element-ui default size
  81. })
  82. Vue.config.productionTip = false
  83. new Vue({
  84. el: '#app',
  85. router,
  86. store,
  87. render: h => h(App)
  88. })