From 65297071bbb4d25e3780471ba6076208dfb98423 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Thu, 6 Jun 2024 16:58:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0clientSearchTable=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=EF=BC=8C=E5=A4=84=E7=90=86SearchTable=E4=B8=AD?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=86=85=E5=AE=B9=E8=BF=87=E5=A4=9A=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E5=B1=8F=E5=B9=95=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchTable/src/SearchTable.vue | 2 +- src/directives/permission/clientTable.ts | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/components/SearchTable/src/SearchTable.vue b/src/components/SearchTable/src/SearchTable.vue index c7f7cd534..77a946718 100644 --- a/src/components/SearchTable/src/SearchTable.vue +++ b/src/components/SearchTable/src/SearchTable.vue @@ -14,7 +14,7 @@ :allSchemas="allSchemasRef" /> - ) { el.firstChild.style.height = '100%' }) }) + app.directive('clientSearchTable', (el, binding) => { + nextTick(() => { + const top = el.getBoundingClientRect().top + const qustionHeight = 150 + let paginationHeight = 0 + if(el.children&&el.children.length>1){ + paginationHeight = 70 + } + const height = window.innerHeight - top - paginationHeight - qustionHeight + if(el.getBoundingClientRect().height>height){ + console.log('高度',el.getBoundingClientRect().height) + el.style.height = height + 'px' + el.firstChild.style.height = '100%' + } + }) + }) }