综合办公系统
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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * @Author: ysh
  3. * @Date: 2024-01-03 09:23:11
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2024-05-09 14:49:27
  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. import Print from 'vue-print-nb'
  47. // 全局方法挂载
  48. Vue.prototype.getDicts = getDicts
  49. Vue.prototype.getConfigKey = getConfigKey
  50. Vue.prototype.parseTime = parseTime
  51. Vue.prototype.resetForm = resetForm
  52. Vue.prototype.addDateRange = addDateRange
  53. Vue.prototype.selectDictLabel = selectDictLabel
  54. Vue.prototype.selectDictLabels = selectDictLabels
  55. Vue.prototype.download = download
  56. Vue.prototype.handleTree = handleTree
  57. Vue.prototype.publicData = publicData
  58. // 全局组件挂载
  59. Vue.component('DictTag', DictTag)
  60. Vue.component('Pagination', Pagination)
  61. Vue.component('RightToolbar', RightToolbar)
  62. Vue.component('Editor', Editor)
  63. Vue.component('FileUpload', FileUpload)
  64. Vue.component('ImageUpload', ImageUpload)
  65. Vue.component('ImagePreview', ImagePreview)
  66. Vue.component('tinymce', Tinymce)
  67. Vue.component('RowTitle', RowTitle)
  68. Vue.use(directive)
  69. Vue.use(plugins)
  70. Vue.use(VueMeta)
  71. Vue.use(Print)
  72. DictData.install()
  73. /**
  74. * If you don't want to use mock-server
  75. * you want to use MockJs for mock api
  76. * you can execute: mockXHR()
  77. *
  78. * Currently MockJs will be used in the production environment,
  79. * please remove it before going online! ! !
  80. */
  81. Vue.use(Element, {
  82. size: Cookies.get('size') || 'medium' // set element-ui default size
  83. })
  84. Vue.config.productionTip = false
  85. new Vue({
  86. el: '#app',
  87. router,
  88. store,
  89. render: h => h(App)
  90. })