You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
686 B
Vue

<template>
<section class="app-main">
<router-view v-slot="{ Component, route }">
<transition name="fade" mode="out-in" appear>
<keep-alive :include="getCaches">
<component :is="Component" :key="route.fullPath" />
</keep-alive>
</transition>
</router-view>
</section>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import { useCache } from '_c/ParentView/useCache'
export default defineComponent({
name: 'AppMain',
setup() {
const { getCaches } = useCache(true)
return {
getCaches
}
}
})
</script>
<style lang="less" scoped>
.app-main {
// overflow: hidden;
padding: 20px;
}
</style>