listen on router

This commit is contained in:
ThatOneCalculator 2022-11-07 12:03:03 -08:00
parent 07389a9370
commit 4c549326b4
2 changed files with 8 additions and 9 deletions

View file

@ -1,6 +1,6 @@
{
"name": "calckey",
"version": "12.119.0-calc.9.15",
"version": "12.119.0-calc.9.16",
"codename": "aqua",
"repository": {
"type": "git",

View file

@ -79,7 +79,7 @@
</template>
<script lang="ts" setup>
import { defineAsyncComponent, provide, onMounted, computed, ref, watch, ComputedRef } from 'vue';
import { defineAsyncComponent, provide, onMounted, computed, ref, ComputedRef } from 'vue';
import XCommon from './_common_/common.vue';
import { instanceName } from '@/config';
import { StickySidebar } from '@/scripts/sticky-sidebar';
@ -130,12 +130,6 @@ const menuIndicated = computed(() => {
return false;
});
const drawerMenuShowing = ref(false);
mainRouter.on('change', () => {
drawerMenuShowing.value = false;
});
function updateButtonState(): void {
let routerState = window.location.href;
let secondaryRouterState = mainRouter.currentRoute.value.name;
@ -156,7 +150,12 @@ function updateButtonState(): void {
updateButtonState();
watch($$(window.location.href), () => (updateButtonState()));
const drawerMenuShowing = ref(false);
mainRouter.on('change', () => {
drawerMenuShowing.value = false;
updateButtonState();
});
document.documentElement.style.overflowY = 'scroll';