代理后端前端代码(带权限管理)
zj
2024-06-03 59782819ef818c3457aaf750a0358b485de3c249
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// 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')