This commit is contained in:
浅念
2025-12-05 18:08:03 +08:00
commit 423fc8b7e1
841 changed files with 103564 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--
}
}
})