在vue的项目初建过程当中,使用了flexible.js,发现不兼容ipad以及iPadpro,各类查了资料,要在代码里面加入判断什么的,由于是不太熟悉,不知道到底在哪一个位置添加,后来想了想,直接在html页面中添加就能够了,整个vue项目只有一个index.html的html文件页面,因此,到这里添加就是最好的了啦。~~html
<script> // 用于适配ipad以及ipad pro ;/(iPhone|iPad|iPhone OS|Phone|iPod|iOS)/i.test(navigator.userAgent) && ((head = document.getElementsByTagName('head')), (viewport = document.createElement('meta')), (viewport.name = 'viewport'), (viewport.content = 'target-densitydpi=device-dpi, width=480px, user-scalable=no'), head.length > 0 && head[head.length - 1].appendChild(viewport)) </script>