|
|
|
@ -6,7 +6,9 @@ const state = {
|
|
|
|
|
|
|
|
|
|
const mutations = {
|
|
|
|
|
CLOSE_LIST: (state, list) => {
|
|
|
|
|
state.visitedViews = list;
|
|
|
|
|
state.visitedViews = [];
|
|
|
|
|
state.cachedViews = [];
|
|
|
|
|
state.iframeViews = [];
|
|
|
|
|
},
|
|
|
|
|
ADD_IFRAME_VIEW: (state, view) => {
|
|
|
|
|
if (state.iframeViews.some((v) => v.path === view.path)) return;
|
|
|
|
@ -128,6 +130,9 @@ const mutations = {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const actions = {
|
|
|
|
|
closeVisitedView({ commit }, view) {
|
|
|
|
|
commit("CLOSE_LIST", view);
|
|
|
|
|
},
|
|
|
|
|
addView({ dispatch }, view) {
|
|
|
|
|
dispatch("addVisitedView", view);
|
|
|
|
|
dispatch("addCachedView", view);
|
|
|
|
|