Skip to content

Commit

Permalink
🐞 fix: 修复标题栏异常消失 #142
Browse files Browse the repository at this point in the history
  • Loading branch information
imsyy committed Mar 14, 2024
1 parent c34c4fd commit 0b87117
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

> 一个简约的音乐播放器
> [!CAUTION]
>
> # 因收到网易云官方警告函,本项目从即日起停止一切新功能开发,同时无限期停止维护,感谢您的理解和支持。
> ## 在线预览页面也将同步下线
![main](/screenshots/SPlayer.jpg)

## 说明
Expand Down
13 changes: 8 additions & 5 deletions src/components/Nav/MainNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<!-- 用户信息 -->
<userData />
<!-- TitleBar -->
<TitleBar v-if="isElectron" />
<TitleBar v-if="titleBarShow" />
</div>
</nav>
</template>
Expand Down Expand Up @@ -122,10 +122,8 @@ const openGithub = () => {
window.open(packageJson.github);
};

// 是否为 Electron
const isElectron = computed(() => {
return checkPlatform.electron() || typeof electron !== "undefined";
});
// TitleBar
const titleBarShow = ref(false);

// 主菜单渲染
const mainMenuShow = ref(false);
Expand All @@ -143,6 +141,11 @@ const mainMenuOptions = computed(() => [
},
},
]);

onBeforeMount(() => {
// 是否显示 TitleBar
titleBarShow.value = checkPlatform.electron() || typeof electron !== "undefined";
});
</script>

<style lang="scss" scoped>
Expand Down

0 comments on commit 0b87117

Please sign in to comment.