main.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import Vue from 'vue'
  2. import App from './App.vue'
  3. import {router} from './router/index'
  4. import store from './store/index'
  5. import { Tabbar,TabbarItem,NavBar,Toast,Dialog,Uploader,ActionSheet,Field,Popup,Collapse,CollapseItem,RadioGroup,Radio,Button,Swipe,SwipeItem} from 'vant'
  6. import 'element-ui/lib/theme-chalk/index.css';
  7. import "./assets/css/reset.css"
  8. import "./styles/public.css"
  9. import http from "@/utils/http";
  10. import ElementUI from 'element-ui';
  11. import * as echarts from "echarts"
  12. import jm from 'vue-jsmind'
  13. Vue.use(jm)
  14. if (window.jsMind) {
  15. console.log('wind')
  16. Vue.prototype.jsMind = window.jsMind
  17. }
  18. Vue.prototype.$echarts = echarts
  19. ElementUI.Dialog.props.lockScroll.default = false;
  20. Vue.use(ElementUI);
  21. Vue.prototype.$http = http;
  22. Vue.prototype.bus=new Vue();
  23. Vue.use(Tabbar).use(TabbarItem).use(NavBar).use(Toast).use(Dialog).use(Uploader).use(ActionSheet);
  24. Vue.use(Field).use(Popup).use(Collapse).use(CollapseItem).use(RadioGroup).use(Radio).use(Button).use(Swipe).use(SwipeItem);
  25. Vue.config.productionTip = false;
  26. Toast.setDefaultOptions({ duration: 5000 });
  27. new Vue({
  28. router,
  29. store,
  30. render: h => h(App)
  31. }).$mount('#app');
  32. router.afterEach((to,from,next) => {
  33. // if (to.fullPath) {
  34. // }
  35. });