forked from github/dataease
refactor: 优化编辑时全屏问题,scroll时 样式组件定位问题,去掉部分前段日志
This commit is contained in:
parent
1dda00c5a8
commit
7a8198b7c7
@ -35,7 +35,7 @@ import Toolbar from '@/components/Toolbar'
|
||||
import { deepCopy } from '@/utils/utils'
|
||||
import { mapState } from 'vuex'
|
||||
import generateID from '@/utils/generateID'
|
||||
import { listenGlobalKeyDown } from '@/utils/shortcutKey'
|
||||
// import { listenGlobalKeyDown } from '@/utils/shortcutKey'
|
||||
|
||||
export default {
|
||||
// eslint-disable-next-line vue/no-unused-components
|
||||
|
@ -104,8 +104,9 @@
|
||||
@dragover="handleDragOver"
|
||||
@mousedown="handleMouseDown"
|
||||
@mouseup="deselectCurComponent"
|
||||
@scroll="canvasScroll"
|
||||
>
|
||||
<Editor ref="canvasEditor" :out-style="outStyle" @canvasScroll="canvasScroll" />
|
||||
<Editor ref="canvasEditor" :out-style="outStyle" />
|
||||
</div>
|
||||
</de-main-container>
|
||||
<!-- <de-aside-container v-if="aidedButtonActive" :class="aidedButtonActive ? 'show' : 'hidden'" class="style-aside">-->
|
||||
@ -188,7 +189,7 @@ import bus from '@/utils/bus'
|
||||
import Editor from '@/components/canvas/components/Editor/index'
|
||||
import { deepCopy } from '@/components/canvas/utils/utils'
|
||||
import componentList from '@/components/canvas/custom-component/component-list' // 左侧列表数据
|
||||
import { listenGlobalKeyDown } from '@/components/canvas/utils/shortcutKey'
|
||||
// import { listenGlobalKeyDown } from '@/components/canvas/utils/shortcutKey'
|
||||
import { mapState } from 'vuex'
|
||||
import { uuid } from 'vue-uuid'
|
||||
import Toolbar from '@/components/canvas/components/Toolbar'
|
||||
@ -345,7 +346,7 @@ export default {
|
||||
this.init(this.$store.state.panel.panelInfo.id)
|
||||
// this.restore()
|
||||
// 全局监听按键事件
|
||||
listenGlobalKeyDown()
|
||||
// listenGlobalKeyDown()
|
||||
|
||||
this.$store.commit('setCurComponent', { component: null, index: null })
|
||||
this.$store.commit('clearLinkageSettingInfo', false)
|
||||
@ -654,7 +655,8 @@ export default {
|
||||
const canvasHeight = document.getElementById('canvasInfo').offsetHeight
|
||||
const canvasWidth = document.getElementById('canvasInfo').offsetWidth
|
||||
this.outStyle.height = canvasHeight
|
||||
this.outStyle.width = canvasWidth
|
||||
// 临时处理 确保每次restore 有会更新
|
||||
this.outStyle.width = canvasWidth + (Math.random() * 0.000001)
|
||||
// console.log(canvasHeight + '--' + canvasWidth)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user