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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showSidebar: false,
|
showSidebar: false,
|
||||||
|
mobile: false,
|
||||||
links: [],
|
links: [],
|
||||||
baseLinks: [
|
baseLinks: [
|
||||||
{
|
{
|
||||||
|
@ -56,24 +57,20 @@ export default {
|
||||||
allCategories() {
|
allCategories() {
|
||||||
return this.$store.getters.getCategories;
|
return this.$store.getters.getCategories;
|
||||||
},
|
},
|
||||||
mobile() {
|
|
||||||
switch (this.$vuetify.breakpoint.name) {
|
|
||||||
case "xs":
|
|
||||||
return true;
|
|
||||||
case "sm":
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
allCategories() {
|
allCategories() {
|
||||||
this.buildSidebar();
|
this.buildSidebar();
|
||||||
},
|
},
|
||||||
|
showSidebar() {
|
||||||
|
console.log("Sidebar", this.showSidebar);
|
||||||
|
console.log("Mobile", this.mobile);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.buildSidebar();
|
this.buildSidebar();
|
||||||
|
this.mobile = this.viewScale();
|
||||||
|
this.showSidebar = !this.viewScale();
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
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>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue