Merge pull request #9245 from dataease/pr@dev-v2@fix_mobile_tab

fix(仪表板): 修复移动端布局后仪表板无法继续向tab组件添加图表问题
This commit is contained in:
王嘉豪 2024-04-22 15:13:34 +08:00 committed by GitHub
commit bb9deb58b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -264,16 +264,18 @@ const componentMoveIn = component => {
dvMainStore.setCurComponent({ component: null, index: null })
component.canvasId = element.value.id + '--' + tabItem.name
const refInstance = currentInstance.refs['tabCanvas_' + index][0]
const matrixBase = refInstance.getBaseMatrixSize() //
canvasChangeAdaptor(component, matrixBase)
tabItem.componentData.push(component)
nextTick(() => {
component.x = 1
component.y = 1
component.style.left = 0
component.style.top = 0
refInstance.addItemBox(component) //
})
if (refInstance) {
const matrixBase = refInstance.getBaseMatrixSize() //
canvasChangeAdaptor(component, matrixBase)
tabItem.componentData.push(component)
nextTick(() => {
component.x = 1
component.y = 1
component.style.left = 0
component.style.top = 0
refInstance.addItemBox(component) //
})
}
}
})
}