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

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

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