11-mes-new/src/App.vue
2022-11-14 14:38:52 +08:00

31 lines
563 B
Vue

<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: 'App',
mounted() {
this.beilv = document.body.offsetWidth / 1920
document.documentElement.style.setProperty('--beilv', this.beilv)
window.addEventListener('resize', () => {
this.beilv = document.body.offsetWidth / 1920
document.documentElement.style.setProperty('--beilv', this.beilv)
})
},
data() {
return {
beilv: 1
}
}
}
</script>
<style lang="scss" scoped>
#app {
background-color: #f2f4f9;
}
</style>