mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-18 03:17:29 +08:00
🦄 refactor: 重构代码将 Vuex替换为 Pinia
集成 Pinia 状态管理
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { ref } from 'vue';
|
||||
|
||||
export const useLyricStore = defineStore('lyric', () => {
|
||||
const lyric = ref({});
|
||||
|
||||
const setLyric = (newLyric: any) => {
|
||||
lyric.value = newLyric;
|
||||
};
|
||||
|
||||
return {
|
||||
lyric,
|
||||
setLyric
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user