Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

dev_frame / pig-ui

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • 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
  • pig-ui
  • src
  • stores
  • msg.ts
  • 王欣伟's avatar
    首次提交 · 7242e12d
    王欣伟 committed Dec 04, 2023
    7242e12d Browse Files
msg.ts 299 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
import { defineStore } from 'pinia';

export const useMsg = defineStore('msg', {
	state: () => ({
		msgArray: [] as any[],
	}),
	actions: {
		getAllMsg() {
			return this.msgArray;
		},
		setMsg(value: Object) {
			this.msgArray.push(value);
		},
		removeAll() {
			this.msgArray = [];
		},
	},
});