chore: /debug route
This commit is contained in:
19
src/pages/debug-page.vue
Normal file
19
src/pages/debug-page.vue
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { NLayout, NLayoutContent } from 'naive-ui';
|
||||||
|
import { onBeforeUnmount } from 'vue';
|
||||||
|
import { useQueryControlStore } from '@/stores/query-control';
|
||||||
|
|
||||||
|
const queryControlStore = useQueryControlStore();
|
||||||
|
queryControlStore.disablePolling();
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
queryControlStore.enablePolling();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<NLayout style="height: 100%">
|
||||||
|
<NLayoutContent :content-style="{ 'padding-top': '6px' }"></NLayoutContent>
|
||||||
|
</NLayout>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
@@ -39,6 +39,17 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'debug',
|
||||||
|
component: () => import('@/pages/debug-page.vue'),
|
||||||
|
beforeEnter: (to, from, next) => {
|
||||||
|
if (import.meta.env.DEV) {
|
||||||
|
next();
|
||||||
|
} else {
|
||||||
|
next(false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/:pathMatch(.*)*',
|
path: '/:pathMatch(.*)*',
|
||||||
name: 'NotFound',
|
name: 'NotFound',
|
||||||
|
|||||||
Reference in New Issue
Block a user