listen on router
This commit is contained in:
parent
ced7145c75
commit
fc2070c340
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "calckey",
|
"name": "calckey",
|
||||||
"version": "12.119.0-calc.9.15",
|
"version": "12.119.0-calc.9.16",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<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 XCommon from './_common_/common.vue';
|
||||||
import { instanceName } from '@/config';
|
import { instanceName } from '@/config';
|
||||||
import { StickySidebar } from '@/scripts/sticky-sidebar';
|
import { StickySidebar } from '@/scripts/sticky-sidebar';
|
||||||
@ -130,12 +130,6 @@ const menuIndicated = computed(() => {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
const drawerMenuShowing = ref(false);
|
|
||||||
|
|
||||||
mainRouter.on('change', () => {
|
|
||||||
drawerMenuShowing.value = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
function updateButtonState(): void {
|
function updateButtonState(): void {
|
||||||
let routerState = window.location.href;
|
let routerState = window.location.href;
|
||||||
let secondaryRouterState = mainRouter.currentRoute.value.name;
|
let secondaryRouterState = mainRouter.currentRoute.value.name;
|
||||||
@ -156,7 +150,12 @@ function updateButtonState(): void {
|
|||||||
|
|
||||||
updateButtonState();
|
updateButtonState();
|
||||||
|
|
||||||
watch($$(window.location.href), () => (updateButtonState()));
|
const drawerMenuShowing = ref(false);
|
||||||
|
|
||||||
|
mainRouter.on('change', () => {
|
||||||
|
drawerMenuShowing.value = false;
|
||||||
|
updateButtonState();
|
||||||
|
});
|
||||||
|
|
||||||
document.documentElement.style.overflowY = 'scroll';
|
document.documentElement.style.overflowY = 'scroll';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user