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
33 lines
686 B
Vue
|
5 years ago
|
<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 {
|
||
|
5 years ago
|
// overflow: hidden;
|
||
|
5 years ago
|
padding: 20px;
|
||
|
|
}
|
||
|
|
</style>
|