This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
cyber-narrator-cn-ui/src/components/layout/Home.vue
2021-06-20 13:31:55 +08:00

50 lines
926 B
Vue

<template>
<div class="cn-home">
<left-menu @refresh="refresh"></left-menu>
<main ref="body" class="cn-body">
<cn-header></cn-header>
<cn-container v-if="containerShow" ref="container"></cn-container>
</main>
</div>
</template>
<script>
import Header from './Header'
import LeftMenu from './LeftMenu'
import Container from './Container'
export default {
name: 'Home',
components: {
LeftMenu,
'cn-header': Header,
'cn-container': Container
},
data () {
return {
containerShow: true
}
},
methods: {
refresh () {
this.containerShow = false
this.$nextTick(() => { this.containerShow = true })
}
}
}
</script>
<style lang="scss">
.cn-home {
display: flex;
height: 100%;
transition: all .2s;
.cn-body {
flex: 1;
display: flex;
flex-direction: column;
width: calc(100% - 240px);
transition: all .2s;
}
}
</style>