Files
jh-military-admin/src/stores/msg.ts
T
2025-05-23 11:40:05 +08:00

19 lines
299 B
TypeScript

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 = [];
},
},
});