refactor(仪表板): 修复编辑时追加组件到仪表板底部但水印覆盖位置没有追加问题

This commit is contained in:
wangjiahao 2024-08-30 10:56:46 +08:00
parent 5c3980a91b
commit b9fbc184b8
2 changed files with 9 additions and 1 deletions

View File

@ -245,6 +245,12 @@ watch(
}
)
const watermarkUpdate = () => {
setTimeout(() => {
initWatermark()
})
}
const initWatermark = (waterDomId = 'editor-canvas-main') => {
try {
if (
@ -1459,7 +1465,8 @@ defineExpose({
getMoveItem,
handleMouseUp,
handleMouseDown,
findPositionX
findPositionX,
watermarkUpdate
})
</script>

View File

@ -257,6 +257,7 @@ const scrollTo = y => {
top: (y - 1) * baseHeight.value,
behavior: 'smooth'
})
cyGridster.value?.watermarkUpdate()
})
}