移动端
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

main.js 1.1 KiB

hace 4 años
hace 3 años
hace 3 años
hace 4 años
hace 4 años
hace 4 años
hace 4 años
hace 4 años
123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // The Vue build version to load with the `import` command
  2. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
  3. import Vue from 'vue'
  4. import App from './App'
  5. import router from './router'
  6. import FastClick from 'fastclick'
  7. Vue.config.productionTip = false
  8. // import 'lib-flexible/flexible.js'
  9. import 'amfe-flexible/index.js'
  10. import './config/flexible'
  11. import store from './store/'
  12. import './permission' // permission control
  13. import { getDicts } from "@/utils/data";
  14. //全局方法挂载
  15. Vue.prototype.getDicts = getDicts;
  16. // Vant 引用
  17. import Vant from 'vant';
  18. import 'vant/lib/index.css';
  19. Vue.use(Vant)
  20. /*解决手动点击与真正触发click事件会存在300ms的延迟*/
  21. if ('addEventListener' in document) {
  22. document.addEventListener('DOMContentLoaded', function () {
  23. FastClick.attach(document.body);
  24. }, false);
  25. }
  26. //设置动态登录页
  27. router.beforeEach((to, from, next) => {
  28. if (to.meta.title) {
  29. document.title = to.meta.title
  30. }
  31. next()
  32. })
  33. /* eslint-disable no-new */
  34. new Vue({
  35. el: '#app',
  36. router,
  37. store,
  38. components: { App },
  39. template: '<App/>'
  40. })