提交 5dc6c592 authored 作者: wangjiahao's avatar wangjiahao

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

上级 21a4073d
<template> <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"> <el-row v-if="componentDataShow.length===0" style="height: 100%;" class="custom-position">
{{ $t('panel.panelNull') }} {{ $t('panel.panelNull') }}
</el-row> </el-row>
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
const _this = this const _this = this
const erd = elementResizeDetectorMaker() const erd = elementResizeDetectorMaker()
// 监听div变动事件 // 监听div变动事件
erd.listenTo(document.getElementById('canvasInfo'), element => { erd.listenTo(document.getElementById('canvasInfoTemp'), element => {
_this.$nextTick(() => { _this.$nextTick(() => {
_this.restore() _this.restore()
}) })
...@@ -116,8 +116,8 @@ export default { ...@@ -116,8 +116,8 @@ export default {
getStyle, getStyle,
restore() { restore() {
debugger debugger
const canvasHeight = document.getElementById('canvasInfo').offsetHeight const canvasHeight = document.getElementById('canvasInfoTemp').offsetHeight
const canvasWidth = document.getElementById('canvasInfo').offsetWidth const canvasWidth = document.getElementById('canvasInfoTemp').offsetWidth
this.scaleWidth = canvasWidth * 100 / parseInt(this.canvasStyleData.width)// 获取宽度比 this.scaleWidth = canvasWidth * 100 / parseInt(this.canvasStyleData.width)// 获取宽度比
this.scaleHeight = canvasHeight * 100 / parseInt(this.canvasStyleData.height)// 获取高度比 this.scaleHeight = canvasHeight * 100 / parseInt(this.canvasStyleData.height)// 获取高度比
if (this.showType === 'width') { if (this.showType === 'width') {
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
@mousedown="handleMouseDown" @mousedown="handleMouseDown"
@mouseup="deselectCurComponent" @mouseup="deselectCurComponent"
> >
<Editor :out-style="outStyle" /> <Editor v-if="!previewVisible" :out-style="outStyle" />
</div> </div>
</de-main-container> </de-main-container>
<de-aside-container v-if="aidedButtonActive" :class="aidedButtonActive ? 'show' : 'hidden'" class="style-aside"> <de-aside-container v-if="aidedButtonActive" :class="aidedButtonActive ? 'show' : 'hidden'" class="style-aside">
...@@ -135,14 +135,10 @@ ...@@ -135,14 +135,10 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <fullscreen style="height: 100%;background: none" :fullscreen.sync="previewVisible">
v-if="previewVisible" <Preview v-if="previewVisible" :show-type="canvasStyleData.selfAdaption?'full':'width'" />
:visible.sync="previewVisible" </fullscreen>
:fullscreen="true"
custom-class="preview-dialog"
>
<PreviewFullScreen :fullscreen="previewVisible" />
</el-dialog>
</el-row> </el-row>
</template> </template>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论