vue-cli[2.x]中:
安装
npm install fastclick --save
使用:
在main.js中 :先 import fastClick from 'fastclick' 然后 fastClick.attach(document.body)
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/>' })
来源:https://www.cnblogs.com/ladybug7/p/12251273.html