// with polyfills
|
import 'core-js/stable'
|
import 'regenerator-runtime/runtime'
|
import './mock'
|
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 Cookies from 'js-cookie'
|
import themePluginConfig from '../config/themePluginConfig'
|
import Element from 'element-ui'
|
import 'element-ui/lib/theme-chalk/index.css'
|
|
// mock
|
// import Element from 'element-ui';
|
Vue.use(Element, { size: 'small', zIndex: 3000 })
|
import bootstrap from './core/bootstrap'
|
import './core/lazy_use' // use lazy load components
|
import './permission' // permission control
|
import './utils/filter' // global filter
|
import './global.less'
|
window['console']['log'] = function () {} // global style
|
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from '@/utils/ruoyi'
|
import { butAuthority } from './utils/util'
|
|
Vue.config.productionTip = false
|
Vue.prototype.resetForm = resetForm
|
Vue.prototype.butAuthority = butAuthority
|
Vue.prototype.parseTime = parseTime
|
Vue.prototype.resetForm = resetForm
|
Vue.prototype.addDateRange = addDateRange
|
Vue.prototype.selectDictLabel = selectDictLabel
|
Vue.prototype.selectDictLabels = selectDictLabels
|
Vue.prototype.handleTree = handleTree
|
Vue.prototype.msgSuccess = function (msg) {
|
this.$message({ showClose: true, message: msg, type: 'success' })
|
}
|
Vue.prototype.$host = process.env.VUE_APP_API_BASE_URL
|
// mount axios to `Vue.$http` and `this.$http`
|
Vue.use(VueAxios)
|
// use pro-layout components
|
Vue.component('pro-layout', ProLayout)
|
Vue.component('page-container', PageHeaderWrapper)
|
Vue.component('page-header-wrapper', PageHeaderWrapper)
|
|
window.umi_plugin_ant_themeVar = themePluginConfig.theme
|
Vue.use(Element, {
|
size: Cookies.get('size') || 'medium', // set element-ui default size
|
})
|
|
Vue.config.productionTip = false
|
new Vue({
|
router,
|
store,
|
i18n,
|
// init localstorage, vuex, Logo message
|
created: bootstrap,
|
render: (h) => h(App),
|
}).$mount('#app')
|