提交 1758bf49 authored 作者: junjie's avatar junjie

feat(fix):视图表格底部遮挡修复

上级 38013f98
......@@ -117,23 +117,24 @@ export default {
}
},
calcHeight() {
const that = this
this.$nextTick(function() {
if (that.$refs.tableContainer) {
const currentHeight = that.$refs.tableContainer.offsetHeight
const tableMaxHeight = currentHeight - that.$refs.title.offsetHeight
this.$nextTick(() => {
setTimeout(() => {
if (this.$refs.tableContainer) {
const currentHeight = this.$refs.tableContainer.offsetHeight
const tableMaxHeight = currentHeight - this.$refs.title.offsetHeight
let tableHeight
if (that.chart.data) {
tableHeight = (that.chart.data.tableRow.length + 2) * 36
if (this.chart.data) {
tableHeight = (this.chart.data.tableRow.length + 2) * 36
} else {
tableHeight = 0
}
if (tableHeight > tableMaxHeight) {
that.height = tableMaxHeight + 'px'
this.height = tableMaxHeight + 'px'
} else {
that.height = 'auto'
this.height = 'auto'
}
}
}, 100)
})
},
initStyle() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论