forked from github/dataease
fix(仪表板): 修复移动端布局后仪表板无法继续向tab组件添加图表问题
This commit is contained in:
parent
826100dd6e
commit
a35c98b03e
@ -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) //在适当的时候初始化布局组件
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user