mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
restore drawer toggle in docs
This commit is contained in:
parent
a413b49a97
commit
238a5f02fa
@ -2,7 +2,7 @@
|
||||
<v-navigation-drawer app
|
||||
v-model="isDrawerOpen"
|
||||
:permanent="isMenuLocked"
|
||||
@transitionend="toggleDrawerOpened"
|
||||
@transitionend="afterMenuTransition"
|
||||
:title="drawerTitle">
|
||||
|
||||
<div class="menu" >
|
||||
@ -17,7 +17,7 @@
|
||||
<!-- <v-list-item v-if="$vuetify.breakpoint.mdAndDown">-->
|
||||
<v-list-item-action>
|
||||
<v-switch inset v-model="isMenuLocked" label="keep open"
|
||||
@change="toggleMenuLocked"></v-switch>
|
||||
@click="toggleMenuLocked"></v-switch>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
|
||||
@ -87,14 +87,13 @@ export default {
|
||||
this.$store.dispatch("docs/setActiveTopic", topic)
|
||||
this.$nuxt.$router.push({path: topic.path})
|
||||
},
|
||||
toggleDrawerOpened() {
|
||||
afterMenuTransition() {
|
||||
this.drawer = !this.drawer;
|
||||
console.log("drawer now " + (this.drawer ? "true" : "false"))
|
||||
},
|
||||
toggleMenuLocked() {
|
||||
this.$store.dispatch("docs/setIsMenuLocked", !this.$store.getters["docs/getIsMenuLocked"])
|
||||
},
|
||||
setIsDrawerOpen() {
|
||||
this.$store.commit('docs/setIsDrawerOpen', this.drawer);
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
|
@ -77,6 +77,14 @@ export default {
|
||||
async set(val) {
|
||||
await this.$store.dispatch("docs/setActiveTopic")
|
||||
}
|
||||
},
|
||||
isDrawerOpen: {
|
||||
get() {
|
||||
return this.$store.getters["docs/getIsDrawerOpen"]
|
||||
},
|
||||
set(val) {
|
||||
this.$store.dispatch("docs/setIsDrawerOpen", val)
|
||||
}
|
||||
}
|
||||
},
|
||||
async asyncData({params, route, store}) {
|
||||
@ -93,7 +101,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async toggleDrawer() {
|
||||
await this.$store.dispatch("docs/setIsDrawerOpen", this.$store.getters["docs/getIsDrawerOpen"])
|
||||
this.isDrawerOpen=!this.isDrawerOpen;
|
||||
// await this.$store.dispatch("docs/setIsDrawerOpen", this.$store.getters["docs/getIsDrawerOpen"])
|
||||
console.log("toggled drawer, now " + this.isDrawerOpen)
|
||||
},
|
||||
menuChanged(evt) {
|
||||
console.log("menu changed:" + JSON.stringify(evt, null, 2))
|
||||
|
Loading…
Reference in New Issue
Block a user