Fix Sidebar menu on mobile RTL
Fix collapsable menu on mobile
This commit is contained in:
parent
8d1fc33d13
commit
15b46a2e13
27
src/App.vue
27
src/App.vue
@ -1,23 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="{'nav-open': $sidebar.showSidebar}">
|
<div>
|
||||||
<notifications></notifications>
|
<notifications></notifications>
|
||||||
<router-view :key="$route.fullPath"></router-view>
|
<router-view :key="$route.fullPath"></router-view>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
disableRTL() {
|
disableRTL() {
|
||||||
if(!this.$rtl.isRTL) {
|
if (!this.$rtl.isRTL) {
|
||||||
this.$rtl.disableRTL();
|
this.$rtl.disableRTL();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toggleNavOpen() {
|
||||||
|
let root = document.getElementsByTagName('html')[0];
|
||||||
|
root.classList.toggle('nav-open');
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$watch('$route', this.disableRTL, { immediate: true });
|
||||||
|
this.$watch('$sidebar.showSidebar', this.toggleNavOpen)
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
mounted() {
|
|
||||||
this.$watch('$route', this.disableRTL, {immediate: true});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss"></style>
|
<style lang="scss"></style>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<nav class="navbar navbar-expand-lg navbar-absolute navbar-transparent"
|
<nav class="navbar navbar-expand-lg navbar-absolute"
|
||||||
:class="{'bg-white': showMenu}">
|
:class="{'bg-white': showMenu}">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="navbar-wrapper">
|
<div class="navbar-wrapper">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user