no message
Former-commit-id: ce1e8da6144a0b9fb947336d56df1deba2d7ad92 [formerly ce1e8da6144a0b9fb947336d56df1deba2d7ad92 [formerly ce1e8da6144a0b9fb947336d56df1deba2d7ad92 [formerly ce1e8da6144a0b9fb947336d56df1deba2d7ad92 [formerly 6953b0ad96b8fce65908dacfc7d93d2fa4cd232a [formerly dd99c86232a5da894db614f3afb11014bd0d3470]]]]] Former-commit-id: c32d5c983c5527bf6b410bcfdd29d48dd856fac4 Former-commit-id: f58431af307f27e31a19969b40ca5db4bf88ad0e Former-commit-id: aca490422b0abeeaf53398ed6f88bb8e841f152d [formerly 0cd810bf8ee1c2c95e52f279b4f7b6d29899bfd5] Former-commit-id: b8fbd8eead9a8a382d23c458c1ea3eca37e0b930 Former-commit-id: 9f8464014a4c2e4aa0d3be177c180afd0e86ea69 Former-commit-id: 1149c7d49ae85f4ec8b38db96938526ecff34ac5 Former-commit-id: ecad8d328d89f6494ed701eb3197a312827aca75 Former-commit-id: 43abd5a1fcf08ce7afa02d38c1d3709cf2a427d1
This commit is contained in:
@@ -30,14 +30,17 @@
|
||||
<!-- 主体 -->
|
||||
<el-main>
|
||||
<div class="d2-layout-main-header">
|
||||
<d2-multiple-page-control></d2-multiple-page-control>
|
||||
<d2-multiple-page-control/>
|
||||
</div>
|
||||
<div class="d2-layout-main-body">
|
||||
<transition name="fade-transverse">
|
||||
<keep-alive>
|
||||
<router-view/>
|
||||
<router-view v-if="alive"/>
|
||||
</keep-alive>
|
||||
</transition>
|
||||
<transition name="fade-transverse">
|
||||
<router-view v-if="!alive"/>
|
||||
</transition>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
@@ -78,6 +81,14 @@ export default {
|
||||
backgroundImage: `url('${this.$assetsPublicPath}${this.themeActive.backgroundImage}')`
|
||||
} : {}
|
||||
}
|
||||
},
|
||||
alive () {
|
||||
if (this.$route.meta) {
|
||||
if (this.$route.meta.alive) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
||||
@@ -1 +1 @@
|
||||
a741ca1e629d094296537193224186be0fe27007
|
||||
25bf046328d0f61221cbfbd777ae8dfcfefb8b6f
|
||||
@@ -1,17 +0,0 @@
|
||||
<template>
|
||||
<d2-container type="full">
|
||||
page-name
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
17
src/pages/demo/playground/page-cache/off.vue
Normal file
17
src/pages/demo/playground/page-cache/off.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<d2-container type="full">
|
||||
<template slot="header">这个页面不会被 keep-alive</template>
|
||||
<p class="d2-mt-0">在下面的输入框输入任意字符后,切换到其它页面,再回到此页时输入框文字消失,证明没有被缓存</p>
|
||||
<el-input v-model="value" placeholder="input here"></el-input>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
value: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
17
src/pages/demo/playground/page-cache/on.vue
Normal file
17
src/pages/demo/playground/page-cache/on.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<d2-container type="full">
|
||||
<template slot="header">这个页面会被 keep-alive</template>
|
||||
<p class="d2-mt-0">在下面的输入框输入任意字符后,切换到其它页面,再回到此页时输入框文字保留,证明被缓存</p>
|
||||
<el-input v-model="value" placeholder="input here"></el-input>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
value: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1 +1 @@
|
||||
c33ea8b29ae79d4d8fd278159427b1f326d0d9a9
|
||||
f8c29d259d65f4cb1bf09a96087e6bd73c78f24f
|
||||
Reference in New Issue
Block a user