• 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.js
  • hookehuyr's avatar
    ✨ feat(作品详情页): 留言相关API联调 · 2a933e95
    2a933e95 Browse Directory
    hookehuyr authored 2022-05-06 19:06:53 +0800
index.js 368 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
import { defineStore } from 'pinia';

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