73 lines
1.8 KiB
JavaScript
73 lines
1.8 KiB
JavaScript
// with polyfills
|
|
import 'core-js/stable'
|
|
import 'regenerator-runtime/runtime'
|
|
import Print from 'vue-print-nb'
|
|
|
|
|
|
import Vue from 'vue'
|
|
import App from './App.vue'
|
|
import router from './router'
|
|
import store from './store/'
|
|
import i18n from './locales'
|
|
import { VueAxios } from './utils/request'
|
|
import ProLayout, { PageHeaderWrapper } from '@ant-design-vue/pro-layout'
|
|
import themePluginConfig from '../config/themePluginConfig'
|
|
import '@/utils/prototype'
|
|
|
|
import bootstrap from './core/bootstrap'
|
|
import './core/lazy_use'
|
|
import './permission' // permission control
|
|
import './utils/filter' // global filter
|
|
import './global.less'
|
|
import moment from 'moment'
|
|
import { FormModel, Empty } from 'ant-design-vue'
|
|
import { hasBtnPermission } from './utils/permissions'
|
|
|
|
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'
|
|
|
|
Vue.use(FormModel)
|
|
Vue.use(Empty)
|
|
Vue.prototype.hasPerm = hasBtnPermission
|
|
Vue.prototype.$emptyImg = Empty.PRESENTED_IMAGE_SIMPLE
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
Vue.use(Print); //注册
|
|
Vue.use(VueAxios)
|
|
Vue.component('pro-layout', ProLayout)
|
|
Vue.component('page-header-wrapper', PageHeaderWrapper)
|
|
|
|
window.umi_plugin_ant_themeVar = themePluginConfig.theme
|
|
|
|
// use([
|
|
// CanvasRenderer,
|
|
// BarChart,
|
|
// TitleComponent,
|
|
// TooltipComponent,
|
|
// LegendComponent,
|
|
// GridComponent
|
|
// ])
|
|
|
|
new Vue({
|
|
router,
|
|
store,
|
|
i18n,
|
|
created: bootstrap,
|
|
render: h => h(App)
|
|
}).$mount('#app')
|
|
|
|
Vue.filter('moment', (dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') => {
|
|
if (!dataStr) return ''
|
|
return moment(dataStr).format(pattern)
|
|
}) |