<template>
  <v-header />
  <v-sidebar />
  <div class="content-box" :class="{ 'content-collapse': sidebar.collapse }">
    <v-tags></v-tags>
    <div class="content">
      <router-view v-slot="{ Component }">
        <transition name="move" mode="out-in">
          <keep-alive :include="tags.nameList">
            <component :is="Component"></component>
          </keep-alive>
        </transition>
      </router-view>
    </div>
  </div>
</template>
<script setup lang="ts">
  import { useSidebarStore } from '@/store/sidebar'
  import { useTagsStore } from '@/store/tags'
  import vHeader from '@/layout/header.vue'
  import vSidebar from '@/layout/sidebar.vue'
  import vTags from '@/layout/tags.vue'

  const sidebar = useSidebarStore()
  const tags = useTagsStore()
</script>

<style lang="less" scoped>
  .content {
    background-color: #f3f7fe;
    // overflow-x: auto;
  }
</style>
