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)