移动端
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.

41 lines
1018 B

  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. // Vant 引用
  14. import Vant from 'vant';
  15. import 'vant/lib/index.css';
  16. Vue.use(Vant)
  17. /*解决手动点击与真正触发click事件会存在300ms的延迟*/
  18. if ('addEventListener' in document) {
  19. document.addEventListener('DOMContentLoaded', function () {
  20. FastClick.attach(document.body);
  21. }, false);
  22. }
  23. //设置动态登录页
  24. router.beforeEach((to, from, next) => {
  25. if (to.meta.title) {
  26. document.title = to.meta.title
  27. }
  28. next()
  29. })
  30. /* eslint-disable no-new */
  31. new Vue({
  32. el: '#app',
  33. router,
  34. store,
  35. components: { App },
  36. template: '<App/>'
  37. })