feat(pinia): 添加 pinia 并做数据持久化

This commit is contained in:
BTMuli
2023-03-05 17:45:15 +08:00
parent 1306c6fd4e
commit 8d6f9e13f9
4 changed files with 70 additions and 1 deletions

8
src/store/index.ts Normal file
View File

@@ -0,0 +1,8 @@
import { createPinia } from "pinia";
import { createPersistedState } from "pinia-plugin-persistedstate";
const pinia = createPinia();
pinia.use(createPersistedState());
export { pinia };