提交 623b7585 编写于 作者: KK's avatar KK

路由缓存

上级 f87a3318
<template> <template>
<!-- <transition name="fade"> <transition name="fade">
<app-keep-alive :routerList="this.$store.state.historyPathList"> <app-keep-alive :routerList="getRouterList">
<router-view :key="this.$route.fullPath"></router-view> <router-view :key="this.$route.fullPath"></router-view>
</app-keep-alive> </app-keep-alive>
</transition> -->
<transition name="fade">
<router-view />
</transition> </transition>
</template> </template>
<script lang="ts"> <script lang="ts">
...@@ -14,6 +12,18 @@ import { Component, Vue } from 'vue-property-decorator'; ...@@ -14,6 +12,18 @@ import { Component, Vue } from 'vue-property-decorator';
@Component({}) @Component({})
export default class ViewShell extends Vue { export default class ViewShell extends Vue {
/**
* 获取路由列表
*
* @readonly
* @type {any[]}
* @memberof AppIndexViewBase
*/
get getRouterList(): any[] {
return this.$store.state.historyPathList;
}
/** /**
* 首页上下文 * 首页上下文
* *
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册