Merge pull request #9551 from dataease/pr@dev-v2_bug_fix

fix(嵌入式): 嵌入式场景下仪表板切换到移动端无法正常显示
This commit is contained in:
dataeaseShu 2024-05-09 11:04:12 +08:00 committed by GitHub
commit e1d6c06e0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -56,7 +56,8 @@ const handleLoad = () => {
),
canvasStyleData: JSON.parse(JSON.stringify(unref(canvasStyleData))),
canvasViewInfo: JSON.parse(JSON.stringify(unref(canvasViewInfo))),
dvInfo: JSON.parse(JSON.stringify(unref(dvInfo)))
dvInfo: JSON.parse(JSON.stringify(unref(dvInfo))),
isEmbedded: !!embeddedStore.baseUrl
})
)
)

View File

@ -19,7 +19,7 @@ const checkItemPosition = component => {
const hanedleMessage = event => {
if (event.data.type === 'panelInit') {
const { componentData, canvasStyleData, dvInfo, canvasViewInfo } = event.data.value
const { componentData, canvasStyleData, dvInfo, canvasViewInfo, isEmbedded } = event.data.value
componentData.forEach(ele => {
const { mx, my, mSizeX, mSizeY } = ele
ele.x = mx
@ -47,6 +47,7 @@ const hanedleMessage = event => {
dvMainStore.updateCurDvInfo(dvInfo)
dvMainStore.setCanvasViewInfo(canvasViewInfo)
eventBus.emit('doCanvasInit-canvas-main')
if (isEmbedded) return
panelInit.value = true
}