zb-admin/src/layout/components/AppMain.vue

56 lines
1.2 KiB
Vue
Raw Normal View History

2022-03-24 04:15:14 +00:00
<template>
2022-04-30 13:19:10 +00:00
<section class="app-main" >
2022-05-30 07:37:04 +00:00
<router-view v-slot="{ Component,route }">
2022-05-31 08:52:37 +00:00
<transition name="fade-slide" mode="out-in" appear>
2022-05-30 07:37:04 +00:00
<keep-alive :include="cachedViews">
<component :is="Component" :key="route.name" />
</keep-alive>
</transition>
</router-view>
2022-04-30 13:19:10 +00:00
<u-setting/>
2022-03-24 04:15:14 +00:00
</section>
</template>
2022-04-30 13:19:10 +00:00
<script lang="ts" setup>
import USetting from '@/components/u-setting/index.vue'
2022-05-30 07:37:04 +00:00
import {useStore} from "vuex";
import {computed, ref,} from 'vue'
const store = useStore()
2022-04-30 13:19:10 +00:00
2022-05-30 07:37:04 +00:00
const cachedViews = computed(()=>{
return store.state.tagsView.cachedViews
})
2022-03-24 04:15:14 +00:00
</script>
<style lang="scss" scoped>
.app-main{
padding: 20px;
2022-04-30 13:19:10 +00:00
/*padding-top: 110px;*/
2022-03-31 02:13:27 +00:00
//min-height: 100%;
//overflow: auto;
//flex: 1;
//overflow: auto;
2022-04-30 13:19:10 +00:00
overflow: hidden;
2022-03-31 02:13:27 +00:00
box-sizing: border-box;
//padding-top: 70px;
2022-04-30 13:19:10 +00:00
background: white;
2022-03-24 04:15:14 +00:00
}
2022-04-30 13:19:10 +00:00
2022-05-31 08:52:37 +00:00
//// 主内容区动画
//.main-enter-active {
// transition: 0.2s;
//}
//.main-leave-active {
// transition: 0.15s;
//}
//.main-enter-from {
// opacity: 0;
// margin-left: -20px;
//}
//.main-leave-to {
// opacity: 0;
// margin-left: 20px;
//}
2022-03-24 04:15:14 +00:00
</style>