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) => {