main.js 979 B

123456789101112131415161718192021222324252627282930
  1. import { VueElement, createApp,Vue } from 'vue'
  2. import App from './App.vue'
  3. import router from './router'
  4. import * as echarts from 'echarts'
  5. import $ from 'jquery'
  6. //import Vuex from 'vuex' // 引入vuex
  7. import ElementUI from 'element-plus'
  8. import { createPinia } from 'pinia'
  9. import 'element-plus/theme-chalk/index.css' // 引入整个Element样式
  10. import './style/index.css' // 引入整个Element样式
  11. import "normalize.css/normalize.css";//重置样式
  12. import '@/js/lindex.js'
  13. // import mitt from 'mitt'
  14. //import '"element-plus/dist/index.css'
  15. //创建一个路由.user(router)
  16. createApp(App)
  17. .use(router)
  18. .use(ElementUI)
  19. .use(createPinia)
  20. // .use(mitt)
  21. //.use(Vuex)
  22. .mount('#app')
  23. const originalReplace = router.prototype.replace
  24. router.prototype.replace = function replace(location) {
  25. return originalReplace.call(this, location).catch(err => err);
  26. }
  27. VueElement.prototype.$echarts = echarts;
  28. // app.config.globalProperties.$mitt=mitt();