|
|
@ -41,4 +41,30 @@ export function clientTable(app: App<Element>) { |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
app.directive('clientTableForm', (el, binding) => { |
|
|
|
nextTick(() => { |
|
|
|
let {isShowPagination,isShowButton,isFullscreen} = binding.value |
|
|
|
let footerHeight = 0 |
|
|
|
let headerHeight = 0 |
|
|
|
el.offsetParent?.children?.forEach(element => { |
|
|
|
if(element.className=='el-dialog__footer'){ |
|
|
|
footerHeight = element.clientHeight |
|
|
|
} |
|
|
|
if(element.className=='el-dialog__header'){ |
|
|
|
headerHeight = element.clientHeight |
|
|
|
} |
|
|
|
}); |
|
|
|
let top = el.getBoundingClientRect().top |
|
|
|
let tableFormTop = top - (el.offsetParent?.offsetTop||0) |
|
|
|
|
|
|
|
let height = el.offsetParent?.clientHeight - tableFormTop - footerHeight - 30 |
|
|
|
if(isShowPagination){ |
|
|
|
height = height- 34 |
|
|
|
} |
|
|
|
if(isShowButton){ |
|
|
|
height = height- 50 |
|
|
|
} |
|
|
|
el.style.height = height + 'px' |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|