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 @@