mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-18 14:18:03 +00:00
fix: bugs
This commit is contained in:
parent
bc0de620c1
commit
43fd1bc536
3 changed files with 31 additions and 24 deletions
|
|
@ -9,7 +9,7 @@ import { changeAppearance } from "@/utils/common";
|
|||
import updateApp from "@/utils/updateApp";
|
||||
import pkg from "../../package.json";
|
||||
// vuex 自定义插件
|
||||
import vuexBroadCast from "./plugins/broadcast";
|
||||
import { getBroadcastPlugin } from "./plugins/broadcast";
|
||||
import saveToLocalStorage from "./plugins/localStorage";
|
||||
|
||||
if (localStorage.getItem("appVersion") === null) {
|
||||
|
|
@ -24,11 +24,17 @@ updateApp();
|
|||
|
||||
Vue.use(Vuex);
|
||||
|
||||
let plugins = [saveToLocalStorage];
|
||||
if (process.env.IS_ELECTRON === true) {
|
||||
let vuexBroadCast = getBroadcastPlugin();
|
||||
plugins.push(vuexBroadCast);
|
||||
}
|
||||
|
||||
const options = {
|
||||
state,
|
||||
mutations,
|
||||
actions,
|
||||
plugins: [saveToLocalStorage, vuexBroadCast],
|
||||
plugins,
|
||||
};
|
||||
|
||||
const store = new Vuex.Store(options);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue