This commit is contained in:
zilong
2021-11-06 12:07:41 +08:00
parent f0e5ea4363
commit d70bf6738e
6 changed files with 63 additions and 27 deletions

View File

@@ -102,7 +102,7 @@ const token = pubsub.subscribe("zp", (msg, data) => {
});
//卸载组件
onUnmounted(() => {
onUnmounted(() => {
pubsub.unsubscribe(routeToken);
pubsub.unsubscribe(token);
});
@@ -130,6 +130,11 @@ const hideWins = (e) => {
showSearch.value = false;
}
};
const keyup = (e) => {
console.log(e);
}
</script>
<template>
@@ -152,9 +157,9 @@ const hideWins = (e) => {
</div>
<div id="main">
<router-view v-slot="{ Component, route }">
<!-- <keep-alive exclude="FM,Friends"> -->
<keep-alive exclude="FM,Friends">
<component :is="Component" />
<!-- </keep-alive> -->
</keep-alive>
</router-view>
<!-- <router-view v-slot="{ Component, route }">
<keep-alive v-if="route.meta.keepAlive">
@@ -211,6 +216,7 @@ body {
}
* {
box-sizing: border-box;
// scroll-behavior: smooth;
}
.top-menu {