You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
369 B
22 lines
369 B
7 months ago
|
|
||
|
|
||
|
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,
|
||
|
// },
|
||
|
});
|