main.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import Vue from 'vue'
  2. import App from './App.vue'
  3. // 引入element
  4. import ElementUI from 'element-ui';
  5. import 'element-ui/lib/theme-chalk/index.css';
  6. // 全局配置elementui的dialog不能通过点击遮罩层关闭
  7. ElementUI.Dialog.props.closeOnClickModal.default = false
  8. Vue.use(ElementUI);
  9. // 引入封装的router
  10. import router from '@/router/index'
  11. // time line css
  12. import '../node_modules/timeline-vuejs/dist/timeline-vuejs.css'
  13. import '@/permission'
  14. import { store } from '@/store/index'
  15. Vue.config.productionTip = false
  16. // 路由守卫
  17. import Bus from '@/utils/bus.js'
  18. Vue.use(Bus)
  19. import APlayer from '@moefe/vue-aplayer';
  20. Vue.use(APlayer, {
  21. defaultCover: 'https://github.com/u3u.png',
  22. productionTip: true,
  23. });
  24. import { auth } from '@/directive/auth'
  25. // 按钮权限指令
  26. auth(Vue)
  27. import uploader from 'vue-simple-uploader'
  28. Vue.use(uploader)
  29. export default new Vue({
  30. render: h => h(App),
  31. router,
  32. store
  33. }).$mount('#app')
  34. //引入echarts
  35. import echarts from 'echarts'
  36. Vue.prototype.$echarts = echarts;
  37. console.log(`
  38. 欢迎使用 Gin-Vue-Admin
  39. 当前版本:V2.3.8
  40. 默认自动化文档地址:http://127.0.0.1%s/swagger/index.html
  41. 默认前端文件运行地址:http://127.0.0.1:8080
  42. 如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.gin-vue-admin.com/docs/coffee
  43. `)