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%' + } + }) + }) }