mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-11-23 00:03:07 +00:00
Drawer better toggle logic
This commit is contained in:
parent
c7fd54f60d
commit
334540187e
1 changed files with 3 additions and 3 deletions
|
@ -53,12 +53,12 @@ export default class extends Vue {
|
|||
|
||||
public toggle() {
|
||||
this.is_open = !this.is_open;
|
||||
this.refresh();
|
||||
if (this.is_open) this.$emit("open");
|
||||
}
|
||||
|
||||
public refresh() {
|
||||
if (!this.is_open) return;
|
||||
this.$emit("open");
|
||||
this.is_open = false;
|
||||
this.toggle();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue