Skip to content

Commit 53c6484

Browse files
committed
sidebar fix
1 parent 5dfee50 commit 53c6484

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/utils/app/components/Sidebar.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<v-list class="pa-1 primary--text">
1212
<v-list-tile v-if="sidebarMini && lockSidebarBtn && !locked" @click.stop="toggleLock">
1313
<v-list-tile-action>
14-
<v-icon color="primary">{{ locked ? 'chevron_left' : 'chevron_right' }}</v-icon>
14+
<v-icon color="primary">chevron_right</v-icon>
1515
</v-list-tile-action>
1616
</v-list-tile>
1717
<v-list-tile v-if="!sidebarMini">
@@ -62,11 +62,14 @@
6262
import { mapState, mapGetters, mapMutations } from "vuex";
6363
6464
export default {
65+
created() {
66+
this.locked = JSON.parse(localStorage.getItem('sidebarLocked')) || false
67+
},
6568
computed: {
6669
...mapGetters("auth", ["checkPermission"]),
6770
sidebarMini() {
6871
return this.locked ? false : !this.expanded
69-
}
72+
},
7073
},
7174
watch: {
7275
expanded(val) {
@@ -124,7 +127,7 @@ export default {
124127
data: () => ({
125128
setSidebarMini: false,
126129
dialog: false,
127-
locked: localStorage.getItem('sidebarLocked') || false,
130+
locked: false,
128131
expanded: false
129132
}),
130133
};

0 commit comments

Comments
 (0)