fix:修复出现滚动条,样式组件位置定位不准确问题

This commit is contained in:
wangjiahao 2021-09-22 18:34:02 +08:00
parent 5e1a37794e
commit 3ca7a5e029
2 changed files with 6 additions and 2 deletions

View File

@ -11,6 +11,7 @@
:style="customStyle"
@dragover="handleDragOver"
@mousedown="handleMouseDown"
@scroll="canvasScroll"
>
<!-- 网格线 -->
<!-- <Grid v-if="canvasStyleData.auxiliaryMatrix&&!linkageSettingStatus" :matrix-style="matrixStyle" />-->
@ -666,6 +667,9 @@ export default {
} else {
return y
}
},
canvasScroll(event) {
this.$emit('canvasScroll', event)
}
}
}

View File

@ -100,9 +100,8 @@
@drop="handleDrop"
@mousedown="handleMouseDown"
@mouseup="deselectCurComponent"
@scroll="canvasScroll"
>
<Editor v-if="!previewVisible" :out-style="outStyle" />
<Editor v-if="!previewVisible" :out-style="outStyle" @canvasScroll="canvasScroll" />
</div>
</de-main-container>
<!-- <de-aside-container v-if="aidedButtonActive" :class="aidedButtonActive ? 'show' : 'hidden'" class="style-aside">-->
@ -696,6 +695,7 @@ export default {
}
},
canvasScroll(event) {
console.log('testTop' + event.target.scrollTop)
this.scrollLeft = event.target.scrollLeft
this.scrollTop = event.target.scrollTop
},