Skip to content

Commit 100029e

Browse files
committed
fix(docs): right drawer toggle should always show when in mobile mode
1 parent 55d2a6f commit 100029e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/src/layouts/Layout.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ q-layout.doc-layout(view="lHh LpR lff", @scroll="onScroll")
1414

1515
header-menu.self-stretch.row.no-wrap(v-if="$q.screen.gt.xs")
1616

17-
q-btn.q-ml-xs(v-show="$store.state.toc.length > 0", flat, dense, round, @click="rightDrawerState = !rightDrawerState", aria-label="Menu")
17+
q-btn.q-ml-xs(v-show="hasRightDrawer", flat, dense, round, @click="rightDrawerState = !rightDrawerState", aria-label="Menu")
1818
q-icon(name="assignment")
1919

2020
q-drawer(
@@ -61,7 +61,7 @@ q-layout.doc-layout(view="lHh LpR lff", @scroll="onScroll")
6161

6262
q-drawer(
6363
v-model="rightDrawerState"
64-
v-if="$store.state.toc.length > 0"
64+
v-if="hasRightDrawer"
6565
side="right"
6666
content-class="bg-grey-1"
6767
:width="180"
@@ -146,6 +146,10 @@ export default {
146146
set (val) {
147147
this.$store.commit('updateRightDrawerState', val)
148148
}
149+
},
150+
151+
hasRightDrawer () {
152+
return this.$store.state.toc.length > 0 || this.$q.screen.lt.sm === true
149153
}
150154
},
151155

0 commit comments

Comments
 (0)