初始提交
This commit is contained in:
18
store/modules/test.js
Normal file
18
store/modules/test.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import {
|
||||
defineStore
|
||||
} from 'pinia';
|
||||
|
||||
export const useTestStore = defineStore({
|
||||
id: ' test',
|
||||
state: () => ({
|
||||
count: 0,
|
||||
}),
|
||||
actions: {
|
||||
increment() {
|
||||
this.count++;
|
||||
},
|
||||
decrement() {
|
||||
this.count--;
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user