tanghaolin
2022-07-28 62aa8e0f0b366bc131309b72e1350d800d30be72
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// 页面信息
 
const state = {
  /**当前页信息 */
  current: {},
  /**已缓存页面 */
  cached: [],
}
 
const actions = {
  /**
   * @description 打开页面
   */
  open({ commit }, route) {
    document.title = route.meta.title || MkhUI.config.site.title
    //console.log(route,"route")
    commit('setCurrent', route)
  },
}
 
const mutations = {
  setCurrent(state, current) {
    //console.log("23")
    Object.assign(state.current, current)
  },
}
 
export default {
  namespaced: true,
  state,
  actions,
  mutations,
}