移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.5 KiB

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