mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
fix category sidebar hidden all the time
This commit is contained in:
parent
761e276ace
commit
86652dcecb
1 changed files with 17 additions and 10 deletions
|
@ -37,6 +37,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
showSidebar: false,
|
||||
mobile: false,
|
||||
links: [],
|
||||
baseLinks: [
|
||||
{
|
||||
|
@ -56,24 +57,20 @@ export default {
|
|||
allCategories() {
|
||||
return this.$store.getters.getCategories;
|
||||
},
|
||||
mobile() {
|
||||
switch (this.$vuetify.breakpoint.name) {
|
||||
case "xs":
|
||||
return true;
|
||||
case "sm":
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
allCategories() {
|
||||
this.buildSidebar();
|
||||
},
|
||||
showSidebar() {
|
||||
console.log("Sidebar", this.showSidebar);
|
||||
console.log("Mobile", this.mobile);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.buildSidebar();
|
||||
this.mobile = this.viewScale();
|
||||
this.showSidebar = !this.viewScale();
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
@ -88,6 +85,16 @@ export default {
|
|||
});
|
||||
});
|
||||
},
|
||||
viewScale() {
|
||||
switch (this.$vuetify.breakpoint.name) {
|
||||
case "xs":
|
||||
return true;
|
||||
case "sm":
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue