|
|
@ -41,4 +41,35 @@ export function clientTable(app: App<Element>) { |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
app.directive('clientTableForm', (el, binding) => { |
|
|
|
nextTick(() => { |
|
|
|
let {isShowPagination,isShowButton,isFullscreen} = binding.value |
|
|
|
console.log('clientTableForm') |
|
|
|
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 |
|
|
|
} |
|
|
|
}); |
|
|
|
console.dir(el) |
|
|
|
let top = el.getBoundingClientRect().top |
|
|
|
let tableFormTop = top - el.offsetParent.offsetTop |
|
|
|
console.log(top) |
|
|
|
console.log(el.offsetParent.offsetTop) |
|
|
|
console.log(el.offsetParent.clientHeight) |
|
|
|
let height = el.offsetParent.clientHeight - tableFormTop - footerHeight - 30 |
|
|
|
if(isShowPagination){ |
|
|
|
height = height- 34 |
|
|
|
} |
|
|
|
if(isShowButton){ |
|
|
|
height = height- 50 |
|
|
|
} |
|
|
|
console.log(height) |
|
|
|
el.style.height = height + 'px' |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|