Home.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <el-container>
  3. <el-container>
  4. <el-aside style="width:auto !important;">
  5. <huan-zhe-lie-biao v-show="xianShiLieBiao"></huan-zhe-lie-biao>
  6. </el-aside>
  7. <el-main>
  8. <huan-zhe-xin-xi></huan-zhe-xin-xi>
  9. <router-view v-slot="{ Component }">
  10. <keep-alive>
  11. <component :is="Component"/>
  12. </keep-alive>
  13. </router-view>
  14. </el-main>
  15. </el-container>
  16. </el-container>
  17. </template>
  18. <script>
  19. import store from '../../../store'
  20. import {computed, ref, watch} from "vue";
  21. import HuanZheLieBiao from "../../../components/zhu-yuan-yi-sheng/HuanZheLieBiao.vue";
  22. import HuanZheXinXi from "../../../components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
  23. import YiZhuLuRuZhuJian from "./yi-zhu-lu-ru/YiZhuLuRu.vue";
  24. import router from "@/router";
  25. export default {
  26. name: "Home",
  27. components: {YiZhuLuRuZhuJian, HuanZheXinXi, HuanZheLieBiao},
  28. setup() {
  29. const tableHeight = computed(() => {
  30. return store.state.app.windowSize.h
  31. })
  32. const xianShiLieBiao = ref(true)
  33. watch(() => router.currentRoute.value.path, () => {
  34. xianShiLieBiao.value = !router.currentRoute.value.meta.blankPage;
  35. })
  36. return {
  37. tableHeight,
  38. xianShiLieBiao
  39. }
  40. }
  41. }
  42. </script>
  43. <style scoped>
  44. </style>