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