<template>
  <div class="main">
  <keep-alive :include="keepAliveList">
    <router-view  />
  </keep-alive>
  <!--<router-view v-if="!keepAlive" />-->
  </div>
</template>

<script>
  export default {
    name: "RouteView",
    computed: {
      keepAlive () {
        return this.$route.meta.keepAlive || false
      },
      keepAliveList(){
        let list = [];
        this.$store.state.app.pageObj.forEach(item =>{
          list.push(item.name);
        })
        list.push('MeunView');
        return list.join(",")
      }
    }
  }
</script>
