mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-04-26 00:00:04 +08:00
菜单优化
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
<template>
|
||||
<section class="app-main">
|
||||
<transition name="fade-transform" mode="out-in">
|
||||
<keep-alive :include="cachedViews">
|
||||
<router-view :key="key" />
|
||||
</keep-alive>
|
||||
</transition>
|
||||
<keep-alive>
|
||||
<router-view v-if="$route.meta.keepAlive" :key="key" />
|
||||
</keep-alive>
|
||||
<router-view v-if="!$route.meta.keepAlive" :key="key" />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -12,9 +11,6 @@
|
||||
export default {
|
||||
name: 'AppMain',
|
||||
computed: {
|
||||
cachedViews() {
|
||||
return this.$store.state.tagsView.cachedViews
|
||||
},
|
||||
key() {
|
||||
return this.$route.path
|
||||
}
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
<template>
|
||||
<router-view />
|
||||
<div>
|
||||
<keep-alive>
|
||||
<router-view v-if="$route.meta.keepAlive" :key="key" />
|
||||
</keep-alive>
|
||||
<router-view v-if="!$route.meta.keepAlive" :key="key" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'None',
|
||||
computed: {
|
||||
key() {
|
||||
return this.$route.path
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user