af358fb9 by 406803045

解决首页白屏,添加fastclick

1 parent 3579fed1
......@@ -16,6 +16,7 @@
},
"dependencies": {
"axios": "0.18.0",
"fastclick": "^1.0.6",
"lib-flexible": "^0.3.2",
"normalize.css": "7.0.0",
"vant": "^1.6.19",
......
......@@ -8,8 +8,18 @@ import store from './store'
import router from './router'
import '@/filters' // filters
import '@/permission' // permission 权限
// 解决移动端click事件300毫秒延迟方法
import FastClick from 'fastclick'
if ('addEventListener' in document) {
document.addEventListener(
'DOMContentLoaded',
function() {
FastClick.attach(document.body)
},
false
)
}
Vue.config.productionTip = false
new Vue({
el: '#app',
router,
......
import router from './router'
router.beforeEach(async(to, from, next) => {})
router.beforeEach(async(to, from, next) => {
next()
})
router.afterEach(() => {})
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!