<template>
  <div class="flex h-full w-full flex-col">
    <Header></Header>
    <div
      :class="[
        'out-box',
        'flex-1',
        'overflow-auto',
        'pb-[24px]',
        {
          'not-home': $route.path != '/home',
        },
      ]"
    >
      <keep-alive>
        <!-- 需要缓存的视图组件 -->
        <router-view v-if="$route.meta.keepAlive"> </router-view>
      </keep-alive>
      <!-- 不需要缓存的视图组件 -->
      <router-view v-if="!$route.meta.keepAlive"> </router-view>
    </div>
  </div>
</template>

<script>
import Header from "./components/Header.vue";
export default {
  components: {
    Header,
  },
};
</script>

<style lang="less" scoped>
.not-home {
  padding: 24px 50px;
}
</style>
