Commit 4012b4b3 authored by 李苏's avatar 李苏 💬

优化

parent 28844119
......@@ -4,7 +4,8 @@
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<router-view v-if="!$route.meta.link" :key="key" />
<!-- <router-view v-if="!$route.meta.link" :key="key" /> -->
<router-view />
</keep-alive>
</transition>
</section>
......@@ -14,18 +15,20 @@
export default {
name: 'AppMain',
computed: {
cachedViews() {
console.log(this.$store.state.tagsView,'this.$store.state.tagsView')
return this.$store.state.tagsView.cachedViews
},
key() {
return this.$route.path
}
}
}
export default {
name: 'AppMain',
computed: {
cachedViews() {
const list =this.$store.state.tagsView.cachedViews
list.push('AppMain')
return list
},
key() {
return this.$route.path
}
}
}
</script>
......
......@@ -41,10 +41,10 @@
<ChangeProject/>
</div>
<template v-if="device!=='mobile'">
<!--<template v-if="device!=='mobile'">-->
<screenfull id="screenfull" class="right-menu-item hover-effect" />
</template>
<!--<screenfull id="screenfull" class="right-menu-item hover-effect" />-->
<!--</template>-->
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment