chore: /debug route

This commit is contained in:
yangsy
2025-09-05 17:46:20 +08:00
parent b1fde49495
commit 3140539fa4
2 changed files with 30 additions and 0 deletions

19
src/pages/debug-page.vue Normal file
View 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>

View File

@@ -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(.*)*',
name: 'NotFound',