From 461b0dda246aa4577cd2d1df93cb7369a0a6817c Mon Sep 17 00:00:00 2001 From: junjie Date: Sun, 25 Apr 2021 18:49:57 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=A7=86=E5=9B=BE):=E8=A7=86=E5=9B=BE=20?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=20=E9=AB=98=E5=BA=A6=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=8C=E7=95=8C=E9=9D=A2=E5=8F=98=E5=8A=A8=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/table/TableNormal.vue | 9 +++++++++ frontend/src/views/chart/view/ChartEdit.vue | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/components/table/TableNormal.vue b/frontend/src/views/chart/components/table/TableNormal.vue index 4545a024ed..2e2b1caaf3 100644 --- a/frontend/src/views/chart/components/table/TableNormal.vue +++ b/frontend/src/views/chart/components/table/TableNormal.vue @@ -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 } } } diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 36480d194d..c48e6477c9 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -196,7 +196,7 @@ - +