<template>
	<div class="about">
		<el-config-provider :locale="zhCn">
		<v-header />
		<v-sidebar />
		<div class="content-box" :class="{ 'content-collapse': collapse }">
			<v-tags></v-tags>
			<div class="content">
				<!-- <router-view /> -->
				<router-view v-slot="{ Component }">
					<transition name="move" mode="out-in">
						<keep-alive :include="tagsList">
							<component :is="Component" />
						</keep-alive>
					</transition>
				</router-view>
			</div>
		</div>
		</el-config-provider>
	</div>
</template>
<script setup>
import { ElConfigProvider } from "element-plus"
import zhCn from "element-plus/lib/locale/lang/zh-cn"

import { computed ,onBeforeMount } from 'vue'
import { useStore } from 'vuex'
import vHeader from '../components/Header.vue'
import vSidebar from '../components/Sidebar.vue'
import vTags from '../components/Tags.vue'

const store = useStore()

const tagsList = computed(() => store.state.tagsList.map(item => item.name))
const collapse = computed(() => store.state.collapse)
// import { fetchStationList,fetchStationListAll } from "/@/api/api.js";
onBeforeMount(async () => {
  // await getStationList();
  // await getStationListAll();
});
//get 场站
// const getStationList = async () => {
//   const res = await fetchStationList();
//   store.dispatch("actionsStationList", res);
// };
// const getStationListAll = async () => {
//   const res = await fetchStationListAll();
//   store.dispatch("actionsStationListAll", res);
// };
</script>
