<template>
  <router-view />
</template>
<script setup>
(function(){
    function w() {
    var r = document.documentElement;
    var a = r.getBoundingClientRect().width;//获取当前设备的宽度
        if (a > 1920 ){//720不固定，根据设计稿的宽度定
            a = 1920;
        } 
        var rem = a / 192;
        r.style.fontSize = rem + "px"
    }
    w();
    window.addEventListener("resize", function() {//监听横竖屏切换
        w()
    }, false);
})();
</script>
