import { createApp } from 'vue'
|
import { createPinia } from 'pinia'
|
import ElementPlus from 'element-plus'
|
import 'element-plus/dist/index.css'
|
import './assets/styles/global.css'
|
import './assets/styles/elementTheme.css'
|
import { ruleGenerator } from '@/utils/ruleGenerator'
|
import { getImageUrl, getDictData, getOccupationName, getJobName } from '@/utils/tool'
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
import dayjs from 'dayjs'
|
import 'dayjs/locale/zh-cn'
|
import App from './App.vue'
|
import router from './router'
|
import axios from '@/utils/axios.js'
|
import { Icon } from '@iconify/vue'
|
import DataTable from '@/views/main/components/DataTable.vue'
|
import Filtrate from '@/views/main/components/Filtrate.vue'
|
import ReturnBtn from '@/views/main/components/ReturnBtn.vue'
|
import DictTag from '@/views/main/components/DictTag.vue'
|
import UploadBtn from '@/views/main/components/UploadBtn.vue'
|
|
import property from '@/config/property.js'
|
import qxueyou from '@/config/qxueyou.js'
|
|
const app = createApp(App)
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
app.component(key, component)
|
}
|
app.config.globalProperties.$rules = ruleGenerator
|
app.config.globalProperties.$property = property
|
app.config.globalProperties.$qxueyou = qxueyou
|
app.config.globalProperties.$axios = axios
|
app.config.globalProperties.$dayjs = dayjs
|
app.config.globalProperties.$getImageUrl = getImageUrl
|
app.config.globalProperties.$getDictData = getDictData
|
app.config.globalProperties.$getOccupationName = getOccupationName
|
app.config.globalProperties.$getJobName = getJobName
|
|
app.component('DataTable', DataTable);
|
app.component('Filtrate', Filtrate);
|
app.component('DictTag', DictTag);
|
app.component('ReturnBtn', ReturnBtn);
|
app.component('Icon', Icon)
|
app.component('UploadBtn', UploadBtn)
|
|
app.use(ElementPlus, {
|
locale: zhCn
|
})
|
app.use(createPinia())
|
app.use(router)
|
|
app.mount('#app')
|