pk优化版
This commit is contained in:
@@ -43,3 +43,20 @@ export const pkIMloginStore = defineStore('pkIMlogin', {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export const pkUnreadStore = defineStore('pkUnread', {
|
||||
state: () => {
|
||||
return { count: 0 }
|
||||
},
|
||||
actions: {
|
||||
setCount(count) {
|
||||
this.count = count
|
||||
},
|
||||
decrease(num = 1) {
|
||||
this.count = Math.max(0, this.count - num)
|
||||
},
|
||||
clear() {
|
||||
this.count = 0
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user