2021-05-26 17:34:13 +08:00
|
|
|
import { createApp } from 'vue'
|
2021-12-14 16:42:45 +08:00
|
|
|
import '@/assets/css/font/iconfont.css'
|
2022-04-14 11:59:37 +08:00
|
|
|
import '@/assets/css/font/iconfont.js'
|
2021-06-11 10:00:22 +08:00
|
|
|
import router from '@/router'
|
|
|
|
|
import store from '@/store'
|
|
|
|
|
import App from '@/App.vue'
|
|
|
|
|
import { hasPermission } from '@/permission'
|
|
|
|
|
import commonMixin from '@/mixins/common'
|
2022-08-11 15:49:41 +08:00
|
|
|
import { cancelWithChange, noData } from '@/utils/tools'
|
2021-06-21 18:41:17 +08:00
|
|
|
import { ClickOutside } from 'element-plus/lib/directives'
|
2021-06-11 10:00:22 +08:00
|
|
|
import i18n from '@/i18n'
|
2023-04-26 18:06:57 +08:00
|
|
|
import '@/mock/index.js'
|
2021-09-02 17:12:27 +08:00
|
|
|
import hljsVuePlugin from '@highlightjs/vue-plugin'
|
|
|
|
|
import 'highlight.js/styles/color-brewer.css'
|
2021-06-07 18:35:16 +08:00
|
|
|
import '@/assets/css/main.scss' // 样式入口
|
2022-01-16 23:16:00 +08:00
|
|
|
import VueGridLayout from 'vue-grid-layout'
|
2021-06-07 18:35:16 +08:00
|
|
|
import ElementPlus from 'element-plus'
|
2022-01-19 16:18:11 +08:00
|
|
|
import bus from 'tiny-emitter'
|
2021-06-21 20:33:39 +08:00
|
|
|
|
2022-01-18 23:12:03 +08:00
|
|
|
import DateTimeRange from '@/components/common/TimeRange/DateTimeRange'
|
|
|
|
|
import TimeRefresh from '@/components/common/TimeRange/TimeRefresh'
|
2022-01-18 13:56:01 +08:00
|
|
|
import PanelChartList from '@/views/charts/PanelChartList'
|
2022-11-18 15:18:05 +08:00
|
|
|
import Error from '@/components/common/Error'
|
2022-04-25 15:29:44 +08:00
|
|
|
import 'lib-flexible'
|
|
|
|
|
|
2022-08-11 15:49:41 +08:00
|
|
|
const emitter = new bus()
|
|
|
|
|
|
2021-06-21 20:33:39 +08:00
|
|
|
const _ = require('lodash') // lodash工具
|
|
|
|
|
|
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-09-02 17:12:27 +08:00
|
|
|
app.use(hljsVuePlugin)
|
2022-01-16 23:16:00 +08:00
|
|
|
app.use(VueGridLayout)
|
2021-06-11 10:00:22 +08:00
|
|
|
|
|
|
|
|
app.directive('has', hasPermission) // 注册指令
|
2021-06-21 18:41:17 +08:00
|
|
|
app.directive('ele-click-outside', ClickOutside)
|
2021-06-11 10:00:22 +08:00
|
|
|
app.directive('cancel', cancelWithChange)
|
2021-08-15 15:49:29 +08:00
|
|
|
app.directive('no-data', noData)
|
2021-06-21 20:33:39 +08:00
|
|
|
app.config.globalProperties.$_ = _
|
|
|
|
|
|
2021-06-11 10:00:22 +08:00
|
|
|
app.mixin(commonMixin)
|
2021-06-07 18:35:16 +08:00
|
|
|
|
2022-01-18 23:12:03 +08:00
|
|
|
app.component('date-time-range', DateTimeRange)
|
|
|
|
|
app.component('time-refresh', TimeRefresh)
|
2022-01-18 13:56:01 +08:00
|
|
|
app.component('panel-chart-list', PanelChartList)
|
2022-11-18 15:18:05 +08:00
|
|
|
app.component('chart-error', Error)
|
2022-01-18 13:56:01 +08:00
|
|
|
|
2021-06-07 18:35:16 +08:00
|
|
|
app.mount('#app')
|
2022-01-19 16:18:11 +08:00
|
|
|
|
|
|
|
|
app.config.globalProperties.emitter = emitter
|
2021-06-11 10:00:22 +08:00
|
|
|
export default app
|