mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-17 10:27:30 +08:00
feat: 重构播放 store
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
import { createPinia } from 'pinia';
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
||||
import { markRaw } from 'vue';
|
||||
|
||||
import router from '@/router';
|
||||
|
||||
// 创建 pinia 实例
|
||||
const pinia = createPinia();
|
||||
|
||||
pinia.use(piniaPluginPersistedstate);
|
||||
|
||||
// 添加路由到 Pinia
|
||||
pinia.use(({ store }) => {
|
||||
store.router = markRaw(router);
|
||||
|
||||
Reference in New Issue
Block a user