fix: 修复因在编辑界面点击撤销或重做导致的Tab页布局变化问题

This commit is contained in:
wangjiahao 2024-07-29 11:13:02 +08:00
parent b27d67dd57
commit d3a7696025

View File

@ -134,23 +134,25 @@ const handleMouseDown = e => {
} }
const canvasInit = (isFistLoad = true) => { const canvasInit = (isFistLoad = true) => {
renderState.value = true if (canvasActive.value) {
setTimeout(function () { renderState.value = true
if (canvasOut.value) { setTimeout(function () {
dashboardCanvasSizeInit() if (canvasOut.value) {
nextTick(() => { dashboardCanvasSizeInit()
cyGridster.value.canvasInit() // nextTick(() => {
cyGridster.value.afterInitOk(function () { cyGridster.value.canvasInit() //
renderState.value = false cyGridster.value.afterInitOk(function () {
renderState.value = false
})
}) })
}) }
} // afterInit
// afterInit dvMainStore.setDataPrepareState(true)
dvMainStore.setDataPrepareState(true) if (isMainCanvas(canvasId.value) && isFistLoad) {
if (isMainCanvas(canvasId.value) && isFistLoad) { snapshotStore.recordSnapshotCache('renderChart')
snapshotStore.recordSnapshotCache('renderChart') }
} }, 500)
}, 500) }
} }
const canvasSizeInit = () => { const canvasSizeInit = () => {