<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default {
  components: {
  },
  created () {
    const reg = /(Android|iPhone|SymbianOS|Windows phone|iPad|iPod|BlackBerry|phone|pad|Mobile|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian)/gi
    const isMobile = reg.test(window.navigator.userAgent)
    console.log('App.vue 查看是否是移动设备', isMobile)
    if (isMobile) {
      document.documentElement.style.fontSize = 'calc(100vw / (375 / 80))'
    } else {
      document.documentElement.style.fontSize = 'calc(100vw / (1920 / 80))'
    }
  },
  mounted () {

  }
  // mounted () {
  //   const html = document.documentElement
  //   html.style.transform = `scale(${window.innerWidth / 1920}, ${window.innerHeight / 1080
  //     })`
  //   window.addEventListener('resize', () => {
  //     const html = document.documentElement
  //     console.log('拿到', html)
  //     html.style.transform = `scale(${window.innerWidth / 1920}, ${window.innerHeight / 1080
  //       })`
  //   })
  // }
}
</script>
<style lang="scss">
</style>
