To develop a large screen data display system on PC side, it is necessary to consider the adaptive zooming problem of web pages

 setSize(){
      let docElem = document.documentElement;
      let docWid = docElem.getBoundingClientRect().width// Get the page width

      if(docWid<1280){
        docElem.style.fontSize=1280/16 + 'px'// Set a minimum page width and calculate the page REM, and assign the value
      }else{
        docElem.style.fontSize = docElem.getBoundingClientRect().width / 16 + "px";// Calculate the page REM and assign the value
      }
      // console.log('docElem.style.fontSize',docElem.style.fontSize)
    }
Copy the code

With the monitor page width changes to achieve equal scale scaling