vue climb pit road ---- flexible.js not fit ipad and ipad pro

In the course of the construction project in the early vue used flexible.js, incompatibilities ipad and iPadpro, various check the information, determine what you want to join in the code inside, because it is not very familiar with, I do not know exactly where to add positions and later thought, added directly in the html page on it, the whole project is only a vue html file index.html page, so to add here is the best of friends. ~~

    <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>

 

 

 

Guess you like

Origin www.cnblogs.com/liuguoying/p/10966237.html