diff --git a/src/App.vue b/src/App.vue index 5265546..b396504 100644 --- a/src/App.vue +++ b/src/App.vue @@ -34,6 +34,8 @@ const store = useStore(); store.commit("loadSettings"); store.commit("loadCaches"); +const showPlaying = ref(false); //是否显示播放列表 + //处理route消息 const routeToken = pubsub.subscribe( "router", @@ -49,9 +51,18 @@ const routeToken = pubsub.subscribe( } ); +const token = pubsub.subscribe("zp", (msg, data) => { + switch (msg) { + case "zp.togglePlaying": + showPlaying.value = !showPlaying.value; + break; + } +}); + //卸载组件 onUnmounted(() => { pubsub.unsubscribe(routeToken); + pubsub.unsubscribe(token); }); @@ -77,10 +88,13 @@ onUnmounted(() => { +
+
+