タイトルバー非表示オプション

This commit is contained in:
syuilo
2020-12-29 11:47:36 +09:00
parent 22049b10ff
commit 6b6483c9fc
5 changed files with 15 additions and 5 deletions

View File

@ -2,8 +2,8 @@
<div class="mk-app" :class="{ wallpaper }">
<XSidebar ref="nav" class="sidebar"/>
<div class="contents" ref="contents">
<header class="header" ref="header" @contextmenu.prevent.stop="onContextmenu" @click="onHeaderClick">
<div class="contents" ref="contents" :class="{ withHeader: $store.state.titlebar }" @contextmenu.prevent.stop="onContextmenu">
<header v-if="$store.state.titlebar" class="header" ref="header" @click="onHeaderClick">
<XHeader :info="pageInfo"/>
</header>
<main ref="main">
@ -162,7 +162,7 @@ export default defineComponent({
this.navHidden = navWidth === 0;
if (this.$refs.contents == null) return;
const width = this.$refs.contents.offsetWidth;
this.$refs.header.style.width = `${width}px`;
if (this.$refs.header) this.$refs.header.style.width = `${width}px`;
},
showNav() {
@ -256,7 +256,10 @@ export default defineComponent({
> .contents {
width: 100%;
min-width: 0;
padding-top: $header-height;
&.withHeader {
padding-top: $header-height;
}
> .header {
position: fixed;