|
@@ -3,6 +3,7 @@ import Vuex from "vuex";
|
|
import createPersistedState from "vuex-persistedstate";
|
|
import createPersistedState from "vuex-persistedstate";
|
|
import user from "./modules/user";
|
|
import user from "./modules/user";
|
|
import invigilation from "./modules/invigilation";
|
|
import invigilation from "./modules/invigilation";
|
|
|
|
+import { keepAliveRoutesPairs } from "@/constant/constants";
|
|
|
|
|
|
Vue.use(Vuex);
|
|
Vue.use(Vuex);
|
|
|
|
|
|
@@ -15,6 +16,7 @@ export default new Vuex.Store({
|
|
state: {
|
|
state: {
|
|
isFullScreen: false,
|
|
isFullScreen: false,
|
|
schoolLogo: "",
|
|
schoolLogo: "",
|
|
|
|
+ keepAliveRoutes: keepAliveRoutesPairs.map((v) => v[0]),
|
|
},
|
|
},
|
|
mutations: {
|
|
mutations: {
|
|
setIsFullScreen(state, isFullScreen) {
|
|
setIsFullScreen(state, isFullScreen) {
|
|
@@ -23,6 +25,12 @@ export default new Vuex.Store({
|
|
setSchoolLogo(state, schoolLogo) {
|
|
setSchoolLogo(state, schoolLogo) {
|
|
state.schoolLogo = schoolLogo;
|
|
state.schoolLogo = schoolLogo;
|
|
},
|
|
},
|
|
|
|
+ setEmptyKeepAliveRoutes(state) {
|
|
|
|
+ state.keepAliveRoutes = [];
|
|
|
|
+ },
|
|
|
|
+ setRestoreKeepAliveRoutes(state) {
|
|
|
|
+ state.keepAliveRoutes = keepAliveRoutesPairs.map((v) => v[0]);
|
|
|
|
+ },
|
|
},
|
|
},
|
|
actions: {},
|
|
actions: {},
|
|
});
|
|
});
|