fix: 仪表盘 背景显示不全问题

This commit is contained in:
wangjiahao 2021-06-16 16:55:22 +08:00
parent 74f2a515ea
commit d89efc707d
4 changed files with 9 additions and 6 deletions

View File

@ -55,15 +55,17 @@ export default {
scaleWidth: '100', scaleWidth: '100',
scaleHeight: '100', scaleHeight: '100',
timer: null, timer: null,
componentDataShow: [] componentDataShow: [],
mainWidth: '100%',
mainHeight: '100%'
} }
}, },
computed: { computed: {
customStyle() { customStyle() {
let style = { let style = {
margin: 'auto', margin: 'auto',
width: '100%', width: this.mainWidth,
height: '100%' height: this.mainHeight
} }
if (this.canvasStyleData.openCommonStyle) { if (this.canvasStyleData.openCommonStyle) {
if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) { if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) {
@ -122,6 +124,7 @@ export default {
this.scaleHeight = canvasHeight * 100 / parseInt(this.canvasStyleData.height)// this.scaleHeight = canvasHeight * 100 / parseInt(this.canvasStyleData.height)//
if (this.showType === 'width') { if (this.showType === 'width') {
this.scaleHeight = this.scaleWidth this.scaleHeight = this.scaleWidth
this.mainHeight = this.canvasStyleData.height * this.scaleHeight / 100 + 'px'
} }
this.handleScaleChange() this.handleScaleChange()
}, },

View File

@ -1,6 +1,6 @@
<template> <template>
<div style="width: 100%;height: 100vh;"> <div style="width: 100%;height: 100vh;">
<fullscreen style="background: #ffffff" :fullscreen.sync="fullscreen" @change="fullscreenChange"> <fullscreen style="height:100%;background: #f7f8fa;overflow-y: auto" :fullscreen.sync="fullscreen" @change="fullscreenChange">
<Preview v-if="fullscreen" /> <Preview v-if="fullscreen" />
</fullscreen> </fullscreen>
</div> </div>

View File

@ -135,7 +135,7 @@
</div> </div>
</el-dialog> </el-dialog>
<fullscreen style="height: 100%;background: #f7f8fa" :fullscreen.sync="previewVisible"> <fullscreen style="height: 100%;background: #f7f8fa;overflow-y: auto" :fullscreen.sync="previewVisible">
<Preview v-if="previewVisible" :show-type="canvasStyleData.selfAdaption?'full':'width'" /> <Preview v-if="previewVisible" :show-type="canvasStyleData.selfAdaption?'full':'width'" />
</fullscreen> </fullscreen>

View File

@ -50,7 +50,7 @@
<!-- 仪表板预览区域--> <!-- 仪表板预览区域-->
<el-row class="panel-design-preview"> <el-row class="panel-design-preview">
<div ref="imageWrapper" style="width: 100%;height: 100%"> <div ref="imageWrapper" style="width: 100%;height: 100%">
<fullscreen style="height: 100%;background: #f7f8fa" :fullscreen.sync="fullscreen"> <fullscreen style="height: 100%;background: #f7f8fa;overflow-y: auto" :fullscreen.sync="fullscreen">
<Preview v-if="showMain" :show-type="canvasStyleData.selfAdaption?'full':'width'" /> <Preview v-if="showMain" :show-type="canvasStyleData.selfAdaption?'full':'width'" />
</fullscreen> </fullscreen>
</div> </div>