<script setup lang="ts">
// import { ref, provide, beforeRouteUpdate } from 'vue'
// import { useRoute } from 'vue-router'
// import { KeepAliveStore } from '@/stores/modules/keepAlive'
// const isRouterShow = ref(true)
// const refreshCurrentPage = (val: boolean) => {
//   isRouterShow.value = val
// }
// provide('refresh', refreshCurrentPage)

// const keepAliveStore = KeepAliveStore()
// console.log(keepAliveStore)
// const transitionName = ''
// beforeRouteUpdate (to, from, next) {
//  // 如果isBack为true时，证明是用户点击了回退，执行slide-right动画
//   let isBack = this.$router.isBack
//   if (isBack) {
//    this.transitionName = 'slide-right'
//   } else {
//    this.transitionName = 'slide-left'
//   }
//   // 做完回退动画后，要设置成前进动画，否则下次打开页面动画将还是回退
//   this.$router.isBack = false
//   next()
// }
</script>

<template>
  <el-main>
    <router-view v-slot="{ Component, route }">
      <transition appear name="fade-transform" mode="out-in">
        <component :is="Component" :key="route.path" />
      </transition>

      <!-- <keep-alive>
       
      </keep-alive> -->
    </router-view>
  </el-main>
</template>

<style scoped lang="scss">
@import './index.scss';
</style>
