This commit is contained in:
浅念
2026-03-11 11:15:33 +08:00
parent 277be244ed
commit 5114ac0d70
870 changed files with 112087 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', {
state: () => ({
count: 0
}),
getters: {
doubleCount: (state) => state.count * 2
},
actions: {
increment() {
this.count++
},
decrement() {
this.count--
}
}
})