2021-05-26 17:34:13 +08:00
|
|
|
import { createApp } from 'vue'
|
2021-06-11 10:00:22 +08:00
|
|
|
import _ from 'lodash'
|
|
|
|
|
import router from '@/router'
|
|
|
|
|
import store from '@/store'
|
|
|
|
|
import App from '@/App.vue'
|
|
|
|
|
import { hasPermission } from '@/permission'
|
|
|
|
|
import commonMixin from '@/mixins/common'
|
|
|
|
|
import { cancelWithChange, clickOutside } from '@/utils/tools'
|
|
|
|
|
import i18n from '@/i18n'
|
2021-06-07 18:35:16 +08:00
|
|
|
import '@/assets/css/main.scss' // 样式入口
|
2021-06-20 13:31:55 +08:00
|
|
|
// import VueGridLayout from 'vue-grid-layout'
|
2021-06-07 18:35:16 +08:00
|
|
|
import ElementPlus from 'element-plus'
|
2021-06-16 10:02:54 +08:00
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
import utc from 'dayjs/plugin/utc' // dependent on utc plugin
|
|
|
|
|
import timezone from 'dayjs/plugin/timezone'
|
|
|
|
|
import advancedFormat from 'dayjs/plugin/advancedFormat'
|
|
|
|
|
import weekday from 'dayjs/plugin/weekday'
|
|
|
|
|
dayjs.extend(utc)
|
|
|
|
|
dayjs.extend(timezone)
|
|
|
|
|
dayjs.extend(advancedFormat)
|
|
|
|
|
dayjs.extend(weekday)
|
|
|
|
|
window.$dayJs = dayjs
|
2021-06-07 18:35:16 +08:00
|
|
|
|
|
|
|
|
const app = createApp(App)
|
2021-06-16 10:02:54 +08:00
|
|
|
|
2021-06-07 18:35:16 +08:00
|
|
|
app.use(router)
|
|
|
|
|
app.use(store)
|
|
|
|
|
app.use(ElementPlus)
|
2021-06-11 10:00:22 +08:00
|
|
|
app.use(i18n)
|
2021-06-20 13:31:55 +08:00
|
|
|
// app.use(VueGridLayout)
|
2021-06-11 10:00:22 +08:00
|
|
|
app.use(_)
|
|
|
|
|
|
|
|
|
|
app.directive('has', hasPermission) // 注册指令
|
|
|
|
|
app.directive('click-outside', clickOutside)
|
|
|
|
|
app.directive('cancel', cancelWithChange)
|
|
|
|
|
|
|
|
|
|
app.mixin(commonMixin)
|
2021-06-07 18:35:16 +08:00
|
|
|
|
|
|
|
|
app.mount('#app')
|
2021-06-11 10:00:22 +08:00
|
|
|
export default app
|