fix(数据大屏): 修复组合以后,手动编辑组合W/H,改变的只有组合框,组合内的组件无大小变化问题

This commit is contained in:
wangjiahao 2024-01-23 13:33:04 +08:00
parent 90f5671544
commit 9c0fc7a5fe

View File

@ -27,6 +27,7 @@ import { storeToRefs } from 'pinia'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import _ from 'lodash'
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
import { groupSizeStyleAdaptor } from '@/utils/style'
const snapshotStore = snapshotStoreWithOut()
const dvMainStore = dvMainStoreWithOut()
@ -73,6 +74,13 @@ const onPositionChange = key => {
curComponent.value.style[key] = Math.round(
(positionMounted.value[key] * canvasStyleData.value.scale) / 100
)
if (curComponent.value.component === 'Group') {
//Group
const parentNode = document.querySelector('#editor-canvas-main')
groupSizeStyleAdaptor(curComponent.value)
}
snapshotStore.recordSnapshotCache()
}