<template>
	<v-header v-if="!isShow"/>
	<v-sidebar v-if="!isShow"/>
	<div v-if="!isShow" 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>
	<div style="overflow-y: scroll;height: 600px;">
	<router-view v-if="isShow" v-slot="{ Component }">
		<transition name="move" mode="out-in">
			<keep-alive :include="tags.nameList">
				<component :is="Component"></component>
			</keep-alive>
		</transition>
	</router-view>
	</div>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router';
import { useSidebarStore } from '../store/sidebar';
import { useTagsStore } from '../store/tags';
import vHeader from '../components/header.vue';
import vSidebar from '../components/sidebar.vue';
import vTags from '../components/tags.vue';
import { ref } from 'vue';

const isShow = ref<boolean>(false)
const { currentRoute } = useRouter()
const route= currentRoute.value
const code = route.query
isShow.value = code.isShow==='true'?true:false

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