From 9ec4813ffc10413758132cb064f5b3c9ef91abe3 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 6 Nov 2024 10:55:50 +0800 Subject: [PATCH] =?UTF-8?q?YT-703=E5=BA=93=E5=AD=98=E4=BD=99=E9=A2=9D?= =?UTF-8?q?=EF=BC=8C=E6=89=93=E5=8D=B0=E6=A0=87=E7=AD=BE=EF=BC=8C=E7=8E=B0?= =?UTF-8?q?=E5=88=9A=E8=BF=9B=E5=85=A5=E9=A1=B5=E9=9D=A2=E8=BF=99=E6=A0=B7?= =?UTF-8?q?(=E5=A6=82=E5=9B=BE=EF=BC=89=EF=BC=8C=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=90=8E=E5=8F=98=E6=88=90=E5=A6=82=E5=9B=BE=EF=BC=8C=E5=BA=94?= =?UTF-8?q?=E4=B8=80=E7=9B=B4=E4=BF=9D=E6=8C=81=E9=80=89=E6=8B=A9=E5=90=8E?= =?UTF-8?q?=E7=9A=84=E6=A0=B7=E5=BC=8F=EF=BC=8C=E5=A4=A7=E5=B0=8F=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/directives/permission/clientTable.ts | 27 +++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/directives/permission/clientTable.ts b/src/directives/permission/clientTable.ts index 4654792dd..b07d81a35 100644 --- a/src/directives/permission/clientTable.ts +++ b/src/directives/permission/clientTable.ts @@ -27,18 +27,21 @@ export function clientTable(app: App) { 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%' - } + + setTimeout(() => { + const top = el.getBoundingClientRect().top + const qustionHeight = 260 + let paginationHeight = 0 + if (el.children && el.children.length > 1) { + paginationHeight = 70 + } + const height = window.innerHeight - paginationHeight - qustionHeight + if (el.getBoundingClientRect().height > height) { + el.style.height = height + 'px' + el.firstChild.style.height = '100%' + } + }) + }) }) app.directive('clientTableForm', (el, binding) => {