如何解决移动端300ms延迟问题

时间:2020-07-03 23:45:16   收藏:0   阅读:105

方案一:

 <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
注释掉vue中public文件夹里面的meta标签
方案二:
在style中添加
*{
  touch-action:manipulatiaon
}
方案三:
引入 fastclick.js文件
<script type=‘application/javascript‘ src=‘/path/to/fastclick.js‘></script>
if (‘addEventListener‘ in document) {
	document.addEventListener(‘DOMContentLoaded‘, function() {
		FastClick.attach(document.body);
	}, false);
}
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!