• This project
    • Loading...
  • Sign in

Hooke / tswj

Itomix
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • tswj
  • src
  • store
  • index.ts
  • hookehuyr's avatar
    🎉 init: 初始化运行环境 · 60814b1a
    60814b1a
    hookehuyr authored 2022-04-18 16:01:27 +0800
index.ts 289 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import { defineStore } from 'pinia';

export const mainStore = defineStore('main', {
  state: () => {
    return {
      msg: 'Hello world',
      count: 0,
      auth: false
    };
  },
  getters: {},
  actions: {
    changeState (state: boolean) {
      this.auth = state;
    }
  },
});