解决Vue移动端事件延迟的问题

框架

浏览数:391

2019-6-15

更改meta标签

<meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1,
minimum-scale=1, user-scalable=no” />

引入fastclick及一系列操作

<script >

if ('addEventListener' in document) {
  document.addEventListener('DOMContentLoaded', function () {
    FastClick.attach(document.body);
  }, false);
}

if (!window.Promise) {

document.writeln('<script src = "https://as.alipayobjects.com/g/component/es6-promise/3.2.2/es6-promise.min.js"'+' > '+' < '+' / '+'script > ')
}

</script>

作者:yang