no message

Former-commit-id: 39ce7cc5f4fedfbc532ce0dd84969566f2ac9ea9 [formerly 7260132cf9457c2add2123dcdf753b6a2685a6fa] [formerly 39ce7cc5f4fedfbc532ce0dd84969566f2ac9ea9 [formerly 7260132cf9457c2add2123dcdf753b6a2685a6fa] [formerly 39ce7cc5f4fedfbc532ce0dd84969566f2ac9ea9 [formerly 7260132cf9457c2add2123dcdf753b6a2685a6fa] [formerly 7260132cf9457c2add2123dcdf753b6a2685a6fa [formerly 6a0f8169e55aef3a06ad4ad1a886ccefbb89c7c6 [formerly 7c6206c877e9d669c7549f216a743ba7749f568c]]]]]
Former-commit-id: c3d91f0f3530405ede6dd6d0b3af0f4182098792
Former-commit-id: 12e4b2e828fc38cf1825ce4e3205abe7914bab20
Former-commit-id: 4c6031327259be12bc930cc1b99257bfac590672 [formerly 78a40e795c2429e3fc8d42bc790c59dbec7c5911]
Former-commit-id: d164c4db1803cd684bf9806e4d044b5032e0612e
Former-commit-id: 9df3d0fe1a100cf6d1bed1ef46fe79f4330aa277
Former-commit-id: edf76528ce6ecd10f92dbc2c65e8fb3bacd3b86b
Former-commit-id: 485555b0759bf336c15a561343a7ad6a150a2aee
Former-commit-id: 2177d168625cf72c301207b8be4efb254be963e5
This commit is contained in:
liyang
2018-06-30 19:59:04 +08:00
parent 27ab18faa0
commit 436c927105
5 changed files with 5 additions and 21 deletions

View File

@@ -26,7 +26,6 @@
"highlight.js": "^9.12.0", "highlight.js": "^9.12.0",
"js-cookie": "^2.2.0", "js-cookie": "^2.2.0",
"lodash.clonedeep": "^4.5.0", "lodash.clonedeep": "^4.5.0",
"lodash.get": "^4.4.2",
"lodash.uniqueid": "^4.0.1", "lodash.uniqueid": "^4.0.1",
"lowdb": "^1.0.0", "lowdb": "^1.0.0",
"marked": "^0.3.9", "marked": "^0.3.9",

View File

@@ -34,7 +34,7 @@
</div> </div>
<div class="d2-layout-main-body"> <div class="d2-layout-main-body">
<transition name="fade-transverse"> <transition name="fade-transverse">
<keep-alive :include="pageUseCacheList"> <keep-alive>
<router-view/> <router-view/>
</keep-alive> </keep-alive>
</transition> </transition>
@@ -70,8 +70,7 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
themeActive: state => state.d2admin.themeActive, themeActive: state => state.d2admin.themeActive,
isGrayMode: state => state.d2admin.isGrayMode, isGrayMode: state => state.d2admin.isGrayMode
pageUseCacheList: state => state.d2admin.pageUseCacheList
}), }),
styleLayoutMainGroup () { styleLayoutMainGroup () {
return { return {

View File

@@ -57,6 +57,7 @@ import pluginOpen from '@/plugin/open'
// 插件 支持百万级数据的表格 // 插件 支持百万级数据的表格
import bigdataTable from '@/plugin/vue-bigdata-table' import bigdataTable from '@/plugin/vue-bigdata-table'
// 打包的设置 用户获取路径
import buildConfig from '../config/index' import buildConfig from '../config/index'
Vue.use(ElementUI) Vue.use(ElementUI)
@@ -94,22 +95,17 @@ new Vue({
getAllTagFromRoutes () { getAllTagFromRoutes () {
// 所有加载在主框架内的页面 // 所有加载在主框架内的页面
const tagPool = [] const tagPool = []
// 所有需要被缓存的页面组件 name
const pageUseCacheList = []
const push = function (routes) { const push = function (routes) {
routes.forEach(route => { routes.forEach(route => {
if (route.children) { if (route.children) {
push(route.children) push(route.children)
} else { } else {
console.log('alive', route.meta.alive)
tagPool.push(route) tagPool.push(route)
} }
}) })
} }
push(frameInRoutes) push(frameInRoutes)
console.log('tagPool', tagPool)
this.$store.commit('d2adminTagPoolSet', tagPool) this.$store.commit('d2adminTagPoolSet', tagPool)
this.$store.commit('d2adminPageUseCacheListSet', pageUseCacheList)
} }
} }
}) })

View File

@@ -1 +1 @@
e5b63ace9e1672fcf1badc8cbb5889e21060b67f c33ea8b29ae79d4d8fd278159427b1f326d0d9a9

View File

@@ -18,19 +18,9 @@ export default {
{ name: 'index', title: '首页' } { name: 'index', title: '首页' }
], ],
// 当前页面 // 当前页面
pageCurrent: '', pageCurrent: ''
// 使用缓存的页面
pageUseCacheList: []
}, },
mutations: { mutations: {
/**
* 设置使用缓存的页面
* @param {state} state vuex state
* @param {array} name pageUseCacheList
*/
d2adminPageUseCacheList (state, list) {
state.pageUseCacheList = list
},
/** /**
* 设置当前激活的页面 name * 设置当前激活的页面 name
* @param {state} state vuex state * @param {state} state vuex state