• This project
    • Loading...
  • Sign in

monitor_v3 / anji-plus-report · Files

Go to a project
11818 11818 11818 qq%e5%9b%be%e7%89%87 08 03 14 04 40

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Pipelines 0
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • Create a new issue
3df0c44ee25df2aeb52096e17fde42077b29323d
  • anji-plus-report
  • report-ui
  • src
  • store
  • modules
  • cachaView.js
  • 初始化最新的aj-report
    19748eac
    by 王涛
    3 years ago  
    Browse Files
cachaView.js 398 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

const cacheView = {
  state: {
    cacheViews: []
  },

  mutations: {
    ADD_CACHEVIEW: (state, view) => {
      if (state.cacheViews.includes(view.name)) return
      if (view.meta && view.meta.keepAlive) {
        state.cacheViews.push(view.name)
      } 
    }
  },
  actions: {
    addCachedView({ commit }, view ) {
      commit('ADD_CACHEVIEW', view)
    }
  }
}

export default cacheView