移动端
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

main.js 1.3 KiB

il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. import { selectDictLabel , onClickLeft , getNowFormatDate } from "@/utils/utils";
  15. //全局方法挂载
  16. Vue.prototype.getDicts = getDicts
  17. Vue.prototype.selectDictLabel = selectDictLabel
  18. Vue.prototype.onClickLeft = onClickLeft
  19. Vue.prototype.getNowFormatDate = getNowFormatDate
  20. // Vant 引用
  21. import Vant from 'vant';
  22. import 'vant/lib/index.css';
  23. Vue.use(Vant)
  24. /*解决手动点击与真正触发click事件会存在300ms的延迟*/
  25. if ('addEventListener' in document) {
  26. document.addEventListener('DOMContentLoaded', function () {
  27. FastClick.attach(document.body);
  28. }, false);
  29. }
  30. //设置动态登录页
  31. router.beforeEach((to, from, next) => {
  32. if (to.meta.title) {
  33. document.title = to.meta.title
  34. }
  35. next()
  36. })
  37. /* eslint-disable no-new */
  38. new Vue({
  39. el: '#app',
  40. router,
  41. store,
  42. components: { App },
  43. template: '<App/>'
  44. })