push
This commit is contained in:
21
lib/saas/store/modules/messagecount.ts
Normal file
21
lib/saas/store/modules/messagecount.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
|
||||
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,
|
||||
// },
|
||||
});
|
||||
Reference in New Issue
Block a user