mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-12 19:21:20 +08:00
refactor: replace Vuex with Pinia
This commit is contained in:
16
src/stores/index.ts
Normal file
16
src/stores/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { createPinia } from 'pinia'
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||
|
||||
// 创建 Pinia 实例
|
||||
const pinia = createPinia()
|
||||
|
||||
// 使用持久化插件
|
||||
pinia.use(piniaPluginPersistedstate)
|
||||
|
||||
export default pinia
|
||||
|
||||
// 所有的 store
|
||||
import { useAuthStore } from './auth'
|
||||
import { useUserStore } from './user'
|
||||
|
||||
export { useAuthStore, useUserStore }
|
||||
Reference in New Issue
Block a user