提交 461b0dda authored 作者: junjie's avatar junjie

feat(视图):视图 表格 高度调整,界面变动自适应

上级 90c406d1
...@@ -54,6 +54,7 @@ export default { ...@@ -54,6 +54,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.calcHeight()
this.init() this.init()
}, },
methods: { methods: {
...@@ -61,6 +62,14 @@ export default { ...@@ -61,6 +62,14 @@ export default {
this.fields = JSON.parse(JSON.stringify(this.chart.data.fields)) this.fields = JSON.parse(JSON.stringify(this.chart.data.fields))
const datas = JSON.parse(JSON.stringify(this.chart.data.tableRow)) const datas = JSON.parse(JSON.stringify(this.chart.data.tableRow))
this.$refs.plxTable.reloadData(datas) this.$refs.plxTable.reloadData(datas)
const that = this
window.onresize = function() {
that.calcHeight()
}
},
calcHeight() {
const currentHeight = document.documentElement.clientHeight
this.height = currentHeight - 56 - 40 - 84 - 24 - 16 * 2 - 20
} }
} }
} }
......
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
</el-row> </el-row>
<chart-component v-if="chart.type && !chart.type.includes('table')" :chart-id="chart.id" :chart="chart" class="chart-class" /> <chart-component v-if="chart.type && !chart.type.includes('table')" :chart-id="chart.id" :chart="chart" class="chart-class" />
<table-normal v-if="chart.type && chart.type.includes('table')" :chart="chart" /> <table-normal v-if="chart.type && chart.type.includes('table')" :chart="chart" class="chart-class" />
</el-row> </el-row>
</el-col> </el-col>
</el-row> </el-row>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论