mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-11 21:53:24 +08:00
* Solve empty menu in relationships * fixe style of dashboard * Review changes of Fixe style of dashboard * delete console.log
33 lines
750 B
Vue
33 lines
750 B
Vue
<template>
|
|
<div id="app">
|
|
<router-view />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'App',
|
|
mounted() {
|
|
this.$nextTick(() => {
|
|
window.addEventListener('resize', this.getWindowWidth)
|
|
window.addEventListener('resize', this.getWindowHeight)
|
|
|
|
this.getWindowWidth()
|
|
this.getWindowHeight()
|
|
})
|
|
},
|
|
beforeDestroy() {
|
|
window.removeEventListener('resize', this.getWindowWidth)
|
|
window.removeEventListener('resize', this.getWindowHeight)
|
|
},
|
|
methods: {
|
|
getWindowWidth(event) {
|
|
this.$store.dispatch('setWidth', document.documentElement.clientWidth)
|
|
},
|
|
getWindowHeight(event) {
|
|
this.$store.dispatch('setHeight', document.documentElement.clientHeight)
|
|
}
|
|
}
|
|
}
|
|
</script>
|