From b31ed9b9203a56221a4e4ee6eb453ab42b290a65 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Mon, 4 Nov 2024 18:56:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E8=B7=AF=E7=94=B1=E6=96=B9=E5=BC=8F=20(#6944?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/complex-table/index.vue | 16 ++++++++++++++-- frontend/src/components/layout-content/index.vue | 2 +- frontend/src/routers/index.ts | 9 ++++++++- frontend/src/routers/modules/website.ts | 1 + 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/complex-table/index.vue b/frontend/src/components/complex-table/index.vue index 68912da5a..2978527cc 100644 --- a/frontend/src/components/complex-table/index.vue +++ b/frontend/src/components/complex-table/index.vue @@ -53,6 +53,10 @@ const props = defineProps({ type: Number, default: 0, }, + height: { + type: Number, + default: 0, + }, }); const emit = defineEmits(['search', 'update:selects', 'update:paginationConfig']); const globalStore = GlobalStore(); @@ -105,11 +109,19 @@ onMounted(() => { if (props.heightDiff) { heightDiff = props.heightDiff; } + if (props.height) { + tableHeight.value = props.height; + } else { + tableHeight.value = window.innerHeight - heightDiff; + } - tableHeight.value = window.innerHeight - heightDiff; window.onresize = () => { return (() => { - tableHeight.value = window.innerHeight - heightDiff; + if (props.height) { + tableHeight.value = props.height; + } else { + tableHeight.value = window.innerHeight - heightDiff; + } })(); }; }); diff --git a/frontend/src/components/layout-content/index.vue b/frontend/src/components/layout-content/index.vue index 656c94b46..c1db90ab7 100644 --- a/frontend/src/components/layout-content/index.vue +++ b/frontend/src/components/layout-content/index.vue @@ -19,7 +19,7 @@
-
+
diff --git a/frontend/src/routers/index.ts b/frontend/src/routers/index.ts index cd40cb6a0..90ff4ce46 100644 --- a/frontend/src/routers/index.ts +++ b/frontend/src/routers/index.ts @@ -56,8 +56,15 @@ router.beforeEach((to, from, next) => { router.afterEach((to) => { if (to.meta.activeMenu && !isRedirecting) { - localStorage.setItem('cachedRoute' + to.meta.activeMenu, to.path); + let notMathParam = true; + if (to.matched.some((record) => record.path.includes(':'))) { + notMathParam = false; + } + if (notMathParam) { + localStorage.setItem('cachedRoute' + to.meta.activeMenu, to.path); + } } + isRedirecting = false; NProgress.done(); }); diff --git a/frontend/src/routers/modules/website.ts b/frontend/src/routers/modules/website.ts index 05ccd2c2f..9f868d471 100644 --- a/frontend/src/routers/modules/website.ts +++ b/frontend/src/routers/modules/website.ts @@ -45,6 +45,7 @@ const webSiteRouter = { component: () => import('@/views/website/runtime/php/index.vue'), meta: { title: 'menu.runtime', + activeMenu: '/websites/runtimes/php', requiresAuth: false, }, },