2021-08-11 15:44:50 +08:00
|
|
|
// with polyfills
|
|
|
|
import 'core-js/stable'
|
|
|
|
import 'regenerator-runtime/runtime'
|
|
|
|
|
2021-08-09 17:28:48 +08:00
|
|
|
import Vue from 'vue'
|
|
|
|
import App from './App.vue'
|
|
|
|
import router from './router'
|
2021-08-11 15:44:50 +08:00
|
|
|
import store from './store/'
|
|
|
|
import i18n from './locales'
|
|
|
|
import { VueAxios } from './utils/request'
|
|
|
|
import ProLayout, { PageHeaderWrapper } from '@ant-design-vue/pro-layout'
|
2021-08-20 11:14:51 +08:00
|
|
|
import themePluginConfig from '../config/themePluginConfig'
|
2022-01-07 14:43:46 +08:00
|
|
|
import '@/utils/prototype'
|
2021-08-09 17:28:48 +08:00
|
|
|
|
2021-08-11 15:44:50 +08:00
|
|
|
import bootstrap from './core/bootstrap'
|
|
|
|
import './core/lazy_use'
|
2021-09-02 11:04:14 +08:00
|
|
|
import './permission' // permission control
|
2021-08-11 15:44:50 +08:00
|
|
|
import './utils/filter' // global filter
|
|
|
|
import './global.less'
|
2021-08-20 11:14:51 +08:00
|
|
|
import moment from 'moment'
|
|
|
|
import { FormModel } from 'ant-design-vue'
|
2021-09-02 11:04:14 +08:00
|
|
|
import { hasBtnPermission } from './utils/permissions'
|
|
|
|
|
2022-01-18 17:08:15 +08:00
|
|
|
window.Vue = Vue
|
|
|
|
|
|
|
|
// echart
|
|
|
|
// import { use } from 'echarts/core'
|
|
|
|
// import { CanvasRenderer } from 'echarts/renderers'
|
|
|
|
// import { BarChart } from 'echarts/charts'
|
|
|
|
// import {
|
|
|
|
// TitleComponent,
|
|
|
|
// TooltipComponent,
|
|
|
|
// LegendComponent,
|
|
|
|
// GridComponent
|
|
|
|
// } from 'echarts/components'
|
2021-12-22 09:12:42 +08:00
|
|
|
|
2021-08-20 11:14:51 +08:00
|
|
|
Vue.use(FormModel)
|
2021-09-02 11:04:14 +08:00
|
|
|
Vue.prototype.hasPerm = hasBtnPermission
|
2021-08-09 17:28:48 +08:00
|
|
|
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
|
2021-08-11 15:44:50 +08:00
|
|
|
Vue.use(VueAxios)
|
|
|
|
Vue.component('pro-layout', ProLayout)
|
|
|
|
Vue.component('page-header-wrapper', PageHeaderWrapper)
|
|
|
|
|
2021-08-20 11:14:51 +08:00
|
|
|
window.umi_plugin_ant_themeVar = themePluginConfig.theme
|
2021-08-11 15:44:50 +08:00
|
|
|
|
2022-01-18 17:08:15 +08:00
|
|
|
// use([
|
|
|
|
// CanvasRenderer,
|
|
|
|
// BarChart,
|
|
|
|
// TitleComponent,
|
|
|
|
// TooltipComponent,
|
|
|
|
// LegendComponent,
|
|
|
|
// GridComponent
|
|
|
|
// ])
|
|
|
|
|
2021-08-09 17:28:48 +08:00
|
|
|
new Vue({
|
|
|
|
router,
|
|
|
|
store,
|
2021-08-11 15:44:50 +08:00
|
|
|
i18n,
|
|
|
|
created: bootstrap,
|
2021-08-09 17:28:48 +08:00
|
|
|
render: h => h(App)
|
|
|
|
}).$mount('#app')
|
2021-08-20 11:14:51 +08:00
|
|
|
|
|
|
|
Vue.filter('moment', (dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') => {
|
|
|
|
if (!dataStr) return ''
|
|
|
|
return moment(dataStr).format(pattern)
|
|
|
|
})
|