update Navbar & beilv
This commit is contained in:
15
src/App.vue
15
src/App.vue
@@ -8,12 +8,21 @@
|
||||
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() {
|
||||
beilv: 1
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
#app {
|
||||
background-color: #f2f4f9;
|
||||
}
|
||||
#app {
|
||||
background-color: #f2f4f9;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user