This commit is contained in:
姚宇浩 2024-10-21 09:46:59 +08:00
parent a6c6ceca29
commit 23f51f0d66
2 changed files with 8 additions and 12 deletions

8
src/stores/index.js Normal file
View File

@ -0,0 +1,8 @@
import { defineStore } from 'pinia';
export const userStore = defineStore('store', {
state: () => ({
count: 0,
}),
persist: true
});

View File

@ -1,12 +0,0 @@
import { defineStore } from 'pinia';
export const useStore = defineStore('store', {
state: () => ({
count: 0,
}),
actions: {
increment() {
this.count++;
},
},
});