<template>
  <q-page class="container-height">
    <q-scroll-area class="fit">
      <router-view v-slot="{ Component, route }">
        <keep-alive :include="keepAliveList">
          <component :is="Component" :key="route.path" />
        </keep-alive>
      </router-view>
    </q-scroll-area>
  </q-page>
</template>
<script lang="ts">
// v-if="route.meta && route.meta.keepalive"
// <component
//   v-if="!(route.meta && route.meta.keepalive)"
//   :is="Component"
// />
import { computed } from 'vue';
import { usePageStore } from 'src/common/hooks';
export default {
  name: 'LaoutIndexPage',
  setup() {
    const pageStore = usePageStore();
    const keepAliveList = computed(() => {
      return pageStore.allPageKeys;
    });

    return {
      keepAliveList,
    };
  },
};
</script>

<style scoped lang="scss"></style>
