21 lines
369 B

import { defineStore } from 'pinia';
export const messagecount = defineStore({
id: 'messagecount',
state() {
return { count: 0 };
},
getters: {
getCount: (state: any) => state.count,
},
actions: {
updateCount(val: number | string) {
this.count = val;
},
},
// 开启数据缓存
// persist: {
// enabled: true,
// },
});