From 3ce6aaebfb9481a048598bf456de183defb67ba0 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 1 Dec 2021 14:47:19 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BB=AA=E8=A1=A8=E6=9D=BF?= =?UTF-8?q?=E5=AF=BC=E5=87=BApdf=E4=BC=98=E5=8C=96=EF=BC=8C=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E5=AF=BC=E5=87=BA=E7=94=BB=E9=9D=A2=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/panel/view.js | 3 +++ .../src/components/canvas/components/Editor/Preview.vue | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/api/panel/view.js b/frontend/src/api/panel/view.js index 1c3f9c12c6..5cc64150b1 100644 --- a/frontend/src/api/panel/view.js +++ b/frontend/src/api/panel/view.js @@ -4,6 +4,7 @@ export function tree(data) { return request({ url: '/api/panelView/tree', method: 'post', + timeout: 30000, data }) } @@ -12,6 +13,7 @@ export function viewsWithIds(data) { return request({ url: '/api/panelView/viewsWithIds', method: 'post', + timeout: 30000, loading: true, data }) @@ -21,6 +23,7 @@ export function findOne(id) { return request({ url: '/api/panelView/findOne/' + id, method: 'get', + timeout: 30000, loading: true }) } diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index 27cf09c80b..83496631e7 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -4,6 +4,7 @@
{ _this.$nextTick(() => { _this.restore() + }) + }) + // 监听div变动事件 + const tempCanvas = document.getElementById('canvasInfoTemp') + erd.listenTo(tempCanvas, element => { + _this.$nextTick(() => { // 将mainHeight 修改为px 临时解决html2canvas 截图不全的问题 - _this.mainHeight = mainDom.scrollHeight + 'px!important' + _this.mainHeight = tempCanvas.scrollHeight + 'px!important' }) }) eventBus.$on('openChartDetailsDialog', this.openChartDetailsDialog)