function resize() {
let ratioX = window.innerWidth / 6400;
let tempH = 9 * window.innerWidth / 32;
let ratioY = tempH / 1800;
that.classContent = {
transform: "scale(" + ratioX + "," + ratioY + ")",
transformOrigin: "left top",
backgroundSize: "100% 100%"
}
}
window.onresize = function () {
resize();
};
resize();
<template>
<div id="app" :style="classContent">
<router-view />
</div>
</template>