add AppMain.vue

This commit is contained in:
不做码农 2022-05-23 18:07:34 +08:00
parent 0714502aa4
commit 623e071288

View File

@ -0,0 +1,18 @@
<template>
<el-main class="app-main">
<router-view v-slot="{ Component, route }" :key="route.path">
<transition appear name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<component :is="Component" :key="route.path" />
</keep-alive>
</transition>
</router-view>
</el-main>
</template>
<script setup>
const route = useRoute()
const store = useStore()
const cachedViews = computed(() => {
return store.state.tagsView.cachedViews
})
</script>