mounted(){
// 设置html的font-size
document.addEventListener("DOMContentLoaded", function() {
const html = document.querySelector("html");
html.style.fontSize = window.innerWidth / 10 + "px";
});
}
哪个页面需要,就在哪个页面引入reset.scss
<style lang="scss" scoped>
@import "../assets/css/reset.scss";
.status {
position: absolute;
width: rem(690);
left: 5%;
top: 3%;
}
</style>