1.8 版本

This commit is contained in:
zhengjie
2019-05-11 13:46:15 +08:00
parent 9ea77930ef
commit dab2fc076d
23 changed files with 738 additions and 143 deletions

View File

@@ -0,0 +1,23 @@
import Config from '@/config'
const settings = {
state: {
showRightPanel: false,
tagsView: Config.tagsView,
fixedHeader: Config.fixedHeader,
sidebarLogo: Config.sidebarLogo
},
mutations: {
CHANGE_SETTING: (state, { key, value }) => {
if (state.hasOwnProperty(key)) {
state[key] = value
}
}
},
actions: {
changeSetting({ commit }, data) {
commit('CHANGE_SETTING', data)
}
}
}
export default settings

View File

@@ -56,7 +56,8 @@ const tagsView = {
},
DEL_ALL_VISITED_VIEWS: state => {
state.visitedViews = []
const affixTags = state.visitedViews.filter(tag => tag.meta.affix)
state.visitedViews = affixTags
},
DEL_ALL_CACHED_VIEWS: state => {
state.cachedViews = []
@@ -129,7 +130,6 @@ const tagsView = {
resolve([...state.cachedViews])
})
},
delAllViews({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delAllVisitedViews', view)