Merge pull request #7497 from dataease/pr@dev@fix_tooltip_redraw
fix(视图): 提示框导致重绘
This commit is contained in:
commit
7b84970327
@ -175,7 +175,9 @@ export default {
|
|||||||
outStyle: {
|
outStyle: {
|
||||||
width: null,
|
width: null,
|
||||||
height: null
|
height: null
|
||||||
}
|
},
|
||||||
|
resizeObserver: null,
|
||||||
|
resizerTimer: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -239,18 +241,18 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const _this = this
|
this.resizeObserver = new ResizeObserver(() => {
|
||||||
// 监听div变动事件
|
this.resizerTimer && clearTimeout(this.resizerTimer)
|
||||||
const erd = elementResizeDetectorMaker()
|
this.resizerTimer = setTimeout(() => {
|
||||||
erd.listenTo(document.getElementById(this.canvasDomId), element => {
|
this.$nextTick(this.restore)
|
||||||
_this.$nextTick(() => {
|
}, 500)
|
||||||
_this.restore()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
this.resizeObserver.observe(document.getElementById(this.canvasDomId))
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
bus.$off('component-dialog-edit', this.editDialog)
|
bus.$off('component-dialog-edit', this.editDialog)
|
||||||
bus.$off('button-dialog-edit', this.editButtonDialog)
|
bus.$off('button-dialog-edit', this.editButtonDialog)
|
||||||
|
this.resizeObserver?.disconnect()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getWrapperChildRefs() {
|
getWrapperChildRefs() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user