forked from github/dataease
fix(数据大屏): 修复组合以后,手动编辑组合W/H,改变的只有组合框,组合内的组件无大小变化问题
This commit is contained in:
parent
90f5671544
commit
9c0fc7a5fe
@ -27,6 +27,7 @@ import { storeToRefs } from 'pinia'
|
|||||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||||
|
import { groupSizeStyleAdaptor } from '@/utils/style'
|
||||||
const snapshotStore = snapshotStoreWithOut()
|
const snapshotStore = snapshotStoreWithOut()
|
||||||
|
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
@ -73,6 +74,13 @@ const onPositionChange = key => {
|
|||||||
curComponent.value.style[key] = Math.round(
|
curComponent.value.style[key] = Math.round(
|
||||||
(positionMounted.value[key] * canvasStyleData.value.scale) / 100
|
(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()
|
snapshotStore.recordSnapshotCache()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user