forked from github/dataease
feat(视图):视图 表格 高度调整,界面变动自适应
This commit is contained in:
parent
90c406d108
commit
461b0dda24
@ -54,6 +54,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.calcHeight()
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
@ -61,6 +62,14 @@ export default {
|
||||
this.fields = JSON.parse(JSON.stringify(this.chart.data.fields))
|
||||
const datas = JSON.parse(JSON.stringify(this.chart.data.tableRow))
|
||||
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 @@
|
||||
</el-row>
|
||||
|
||||
<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-col>
|
||||
</el-row>
|
||||
|
Loading…
Reference in New Issue
Block a user