<template>
  <section class="app-main">
    <transition name="fade" mode="out-in">
      <!-- <router-view :key="key"></router-view> -->
      <keep-alive :include="keepAliveRoutes">
        <router-view />
      </keep-alive>
    </transition>
  </section>
</template>

<script>
export default {
  name: "AppMain",
  computed: {
    keepAliveRoutes() {
      return this.$store.state.keepAliveRoutes;
    },
  },
};
</script>

<style scoped>
.app-main {
  padding: 30px;
}
</style>
