Commit fa766179 authored by wangxl's avatar wangxl

333

parent 2399077f
...@@ -19,7 +19,7 @@ const mutations = { ...@@ -19,7 +19,7 @@ const mutations = {
state.tabsArray = payload state.tabsArray = payload
if (!!state.tabsArray && state.tabsArray.length > 0) { if (!!state.tabsArray && state.tabsArray.length > 0) {
if (state.tabsArray[0].key != '0') { if (state.tabsArray[0].key != '0') {
state.tabsArray.unshift({ title: '首页', key: '0', code: 'home', keepAlive: 1, router: '/home', closable: false }) state.tabsArray.unshift(defaultTabsList[2])
} }
} }
}, },
...@@ -118,7 +118,7 @@ const mutations = { ...@@ -118,7 +118,7 @@ const mutations = {
router.push(list[index - 1].router) router.push(list[index - 1].router)
} }
else if (payload.type == 2) { else if (payload.type == 2) {
this.commit('app/setTabsArray', [list[0]]) this.commit('app/setTabsArray', [obj])
this.commit('app/setCachedViews', ['home', obj.code]) this.commit('app/setCachedViews', ['home', obj.code])
} }
else { else {
...@@ -138,7 +138,7 @@ const mutations = { ...@@ -138,7 +138,7 @@ const mutations = {
initStore (state, payload) { initStore (state, payload) {
this.commit('app/setOpenKeys', payload) this.commit('app/setOpenKeys', payload)
this.commit('app/setActiveKeys', []) this.commit('app/setActiveKeys', [])
this.commit('app/setTabsArray', [{ title: '首页', key: '0', code: 'home', keepAlive: 1, router: '/home', closable: false }]) this.commit('app/setTabsArray', [defaultTabsList[2]])
this.commit('app/setTabsActive', '0') this.commit('app/setTabsActive', '0')
}, },
clearStore (state) { clearStore (state) {
......
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