diff --git a/src/components/core/d2-layout-main/index.vue b/src/components/core/d2-layout-main/index.vue
index 60025cb2..10b922cd 100644
--- a/src/components/core/d2-layout-main/index.vue
+++ b/src/components/core/d2-layout-main/index.vue
@@ -39,13 +39,10 @@
-
-
+
+
-
-
-
@@ -77,25 +74,27 @@ export default {
},
computed: {
...mapState({
- isGrayMode: state => state.d2admin.isGrayMode
+ isGrayMode: state => state.d2admin.isGrayMode,
+ pageOpenedList: state => state.d2admin.pageOpenedList
}),
...mapGetters([
'themeActiveSetting'
]),
+ /**
+ * @description 返回现在需要缓存的页面 name
+ */
+ keepAliveList () {
+ return this.pageOpenedList.filter(item => !(item.meta && item.meta.notCache)).map(e => e.name)
+ },
+ /**
+ * @description 最外层容器的背景图片样式
+ */
styleLayoutMainGroup () {
return {
...this.themeActiveSetting.backgroundImage ? {
backgroundImage: `url('${this.$assetsPublicPath}${this.themeActiveSetting.backgroundImage}')`
} : {}
}
- },
- alive () {
- if (this.$route.meta) {
- if (this.$route.meta.alive) {
- return true
- }
- }
- return false
}
}
}
diff --git a/src/pages/demo/playground/page-cache/on.vue b/src/pages/demo/playground/page-cache/on.vue
index 8d5ed49c..4c9bc566 100644
--- a/src/pages/demo/playground/page-cache/on.vue
+++ b/src/pages/demo/playground/page-cache/on.vue
@@ -8,6 +8,7 @@