main.js 889 B

123456789101112131415161718192021222324252627282930313233
  1. import Vue from 'vue'
  2. import ElementUI from 'element-ui'
  3. import App from './App.vue'
  4. import router from './router'
  5. import store from '@/store'
  6. import 'element-ui/lib/theme-chalk/index.css'
  7. import '@/styles/index.scss' // global css
  8. import './icons' // icon
  9. import './router/permission' // permission control
  10. import vueWaves from '@/directive/waves'
  11. import locale from 'element-ui/lib/locale/lang/en'
  12. Vue.use(ElementUI, { locale })
  13. Vue.use(vueWaves)
  14. Vue.prototype.$openRoute = (route, isResult) => {
  15. let sharpe = "#"
  16. if (route.indexOf("/") !== 0) {
  17. sharpe += "/";
  18. }
  19. if (isResult) {
  20. window.open(location.origin + location.pathname + sharpe + route, "_blank", "status=no,location=no,menubar=no,toolbar=no,left=200");
  21. } else {
  22. window.open(location.origin + location.pathname + sharpe + route);
  23. }
  24. }
  25. new Vue({
  26. el: '#app',
  27. router,
  28. store,
  29. render: h => h(App)
  30. })