forked from github/dataease
fix(嵌入式): 嵌入式场景下仪表板切换到移动端无法正常显示
This commit is contained in:
parent
5972cfe12d
commit
bc22dfe4f2
@ -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
|
||||
})
|
||||
)
|
||||
)
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user