Sign in

cnlive_project / cnlive-community-web-vue · Files

GitLab

  • Back to group
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • cnlive-community-web-vue
  • src
  • pinia
  • modules
  • menu.ts
  • 兼容性 & pinia
    44fb48db
    杨泽宇 authored
    2021-12-30 10:58:02 +0800  
    Browse Code »
menu.ts 411 Bytes
Edit 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 23 24 25 26 27 28 29
const id = 'menu'
const state = () => ({
    data1: '10086',
    desc: 'test',
  })
  const getters = {
    doubleCount() {
      return this.desc
    },
    doubleCountPlusOne() {
      return this.data1
    }
  }
  const actions = {
    reset() {
      this.data1 = '10010'
    },
    grown() {
      this.desc = 'test test'
    }
  }

export default {
  namespace: true,
  actions,
  getters,
  state,
  id
}