main.js 676 B

12345678910111213141516171819202122232425262728293031
  1. import Vue from "vue";
  2. import App from "./App.vue";
  3. import router from "./router";
  4. import store from "./store";
  5. import axios from "axios";
  6. Vue.config.productionTip = false;
  7. import ElementUI from "element-ui";
  8. import "element-ui/lib/theme-chalk/index.css";
  9. import locale from "element-ui/lib/locale/lang/zh-CN";
  10. // 引入dayjs库
  11. import dayjs from "dayjs";
  12. Vue.use(ElementUI, { locale });
  13. //拖拽注册
  14. import "./utils/directive";
  15. Vue.use(ElementUI, { locale });
  16. Vue.prototype.axios = axios;
  17. Vue.prototype.$dayjs=dayjs
  18. new Vue({
  19. router,
  20. store,
  21. render: (h) => h(App),
  22. // 全局事件总线
  23. beforeCreate() {
  24. Vue.prototype.$bus = this;
  25. },
  26. }).$mount("#app");