mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-24 08:07:23 +08:00
可以播放了
This commit is contained in:
+18
-1
@@ -1,4 +1,5 @@
|
||||
import { createStore } from "vuex";
|
||||
import { SongResult } from "@/type/music";
|
||||
|
||||
let state = {
|
||||
menus: [
|
||||
@@ -18,9 +19,25 @@ let state = {
|
||||
text: "hello",
|
||||
},
|
||||
],
|
||||
isPlay: false,
|
||||
playMusic: {} as SongResult,
|
||||
};
|
||||
|
||||
let mutations = {};
|
||||
let mutations = {
|
||||
setMenus(state: any, menus: any[]) {
|
||||
state.menus = menus;
|
||||
},
|
||||
setPlay(state: any, playMusic: SongResult) {
|
||||
console.log(playMusic);
|
||||
|
||||
state.playMusic = playMusic;
|
||||
},
|
||||
setIsPlay(state: any, isPlay: boolean) {
|
||||
console.log(isPlay);
|
||||
|
||||
state.isPlay = isPlay;
|
||||
},
|
||||
};
|
||||
|
||||
const store = createStore({
|
||||
state: state,
|
||||
|
||||
Reference in New Issue
Block a user