可以播放了

This commit is contained in:
algerkong
2021-07-20 22:46:18 +08:00
parent bb1bea4002
commit b55af4babd
7 changed files with 248 additions and 85 deletions
+18 -1
View File
@@ -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,