15 lines
191 B
JavaScript
15 lines
191 B
JavaScript
|
import {
|
||
|
defineStore
|
||
|
} from 'pinia'
|
||
|
|
||
|
export const counterStore = defineStore('counter', {
|
||
|
state: () => ({
|
||
|
count: 0
|
||
|
}),
|
||
|
getters: {},
|
||
|
actions: {
|
||
|
increment() {
|
||
|
this.count++
|
||
|
}
|
||
|
}
|
||
|
})
|