vue-cli[2.x]中:
安装
npm install fastclick --save
使用:
在main.js中 :先 import fastClick from ‘fastclick‘ 然后 fastClick.attach(document.body)
![移动端300毫秒事件响应延迟解决方法[fastclick] 移动端300毫秒事件响应延迟解决方法[fastclick]](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuam13d3cubmV0L3VwbG9hZHMvYWxsaW1nLzIwMjAvMi95TWptZWkuZ2lm.gif?w=700&webp=1)
![移动端300毫秒事件响应延迟解决方法[fastclick] 移动端300毫秒事件响应延迟解决方法[fastclick]](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuam13d3cubmV0L3VwbG9hZHMvYWxsaW1nLzIwMjAvMi8yVVpmaXUuZ2lm.gif?w=700&webp=1)
import Vue from ‘vue‘ import App from ‘./App‘ import router from ‘./router‘ import fastClick from ‘fastclick‘ import ‘./assets/styles/reset.css‘ import ‘./assets/styles/border.css‘ Vue.config.productionTip = false fastClick.attach(document.body) /* eslint-disable no-new */ new Vue({ el: ‘#app‘, router, components: { App }, template: ‘<App/>‘ })main.js