Merge pull request #7764 from dataease/pr@dev-v2@fix_group

fix(数据大屏): 修复组合以后,手动编辑组合W/H,改变的只有组合框,组合内的组件无大小变化问题
This commit is contained in:
王嘉豪 2024-01-23 13:35:47 +08:00 committed by GitHub
commit ac62e11524
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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()
}