农场 nuxt3实现的大屏界面
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

41 lines
714 B

<template>
<div class="page">
<PageHeader></PageHeader>
<PageMain></PageMain>
<PageFooter></PageFooter>
<PageModal></PageModal>
</div>
</template>
<script setup>
import { onMounted, provide } from 'vue';
provide('scene', 'center');
function setRem(html) {
const winWidth = html.clientWidth;
html.style.fontSize = winWidth / 1920 + 'px';
}
onMounted(() => {
const html = document.documentElement;
setRem(html);
window.addEventListener(
'resize',
() => {
setRem(html);
},
false,
);
});
</script>
<style scoped>
.page {
width: 100%;
height: 100%;
background: url('@/assets/images/bg.png') no-repeat center center;
background-size: cover;
}
</style>