Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

monorepo / venus

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 1
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • venus
  • apps
  • web-antd
  • src
  • store
  • modules
  • example.ts
  • vben's avatar
    chore: update app name · d584d4cf
    vben committed Jun 08, 2024
    d584d4cf
example.ts 265 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14
import { defineStore } from 'pinia';

export const useCounterStore = defineStore('counter', {
  actions: {
    increment() {
      this.count++;
    },
  },
  getters: {
    double: (state) => state.count * 2,
  },
  persist: [],
  state: () => ({ count: 0 }),
});