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

<script>
export default {
  name: "MeunView",
  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>
