mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-17 10:27:30 +08:00
e355341596
集成 Pinia 状态管理
16 lines
267 B
TypeScript
16 lines
267 B
TypeScript
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
|
|
};
|
|
});
|