feat: 编辑大屏,显示不全问题

This commit is contained in:
wangjiahao 2021-06-15 16:47:35 +08:00
parent 21a4073d85
commit 5dc6c5923f
2 changed files with 9 additions and 13 deletions

View File

@ -1,5 +1,5 @@
<template>
<div id="canvasInfo" :style="customStyle" class="bg">
<div id="canvasInfoTemp" :style="customStyle" class="bg">
<el-row v-if="componentDataShow.length===0" style="height: 100%;" class="custom-position">
{{ $t('panel.panelNull') }}
</el-row>
@ -101,7 +101,7 @@ export default {
const _this = this
const erd = elementResizeDetectorMaker()
// div
erd.listenTo(document.getElementById('canvasInfo'), element => {
erd.listenTo(document.getElementById('canvasInfoTemp'), element => {
_this.$nextTick(() => {
_this.restore()
})
@ -116,8 +116,8 @@ export default {
getStyle,
restore() {
debugger
const canvasHeight = document.getElementById('canvasInfo').offsetHeight
const canvasWidth = document.getElementById('canvasInfo').offsetWidth
const canvasHeight = document.getElementById('canvasInfoTemp').offsetHeight
const canvasWidth = document.getElementById('canvasInfoTemp').offsetWidth
this.scaleWidth = canvasWidth * 100 / parseInt(this.canvasStyleData.width)//
this.scaleHeight = canvasHeight * 100 / parseInt(this.canvasStyleData.height)//
if (this.showType === 'width') {

View File

@ -101,7 +101,7 @@
@mousedown="handleMouseDown"
@mouseup="deselectCurComponent"
>
<Editor :out-style="outStyle" />
<Editor v-if="!previewVisible" :out-style="outStyle" />
</div>
</de-main-container>
<de-aside-container v-if="aidedButtonActive" :class="aidedButtonActive ? 'show' : 'hidden'" class="style-aside">
@ -135,14 +135,10 @@
</div>
</el-dialog>
<el-dialog
v-if="previewVisible"
:visible.sync="previewVisible"
:fullscreen="true"
custom-class="preview-dialog"
>
<PreviewFullScreen :fullscreen="previewVisible" />
</el-dialog>
<fullscreen style="height: 100%;background: none" :fullscreen.sync="previewVisible">
<Preview v-if="previewVisible" :show-type="canvasStyleData.selfAdaption?'full':'width'" />
</fullscreen>
</el-row>
</template>