forked from github/dataease
Merge pull request #8362 from dataease/pr@dev-v2_mobile_tab
fix(移动端): tab组件中无法正常显示过滤组件和图表
This commit is contained in:
commit
2d931cde47
@ -276,7 +276,7 @@ defineExpose({
|
|||||||
:style="getShapeItemShowStyle(item)"
|
:style="getShapeItemShowStyle(item)"
|
||||||
:show-position="showPosition"
|
:show-position="showPosition"
|
||||||
:search-count="searchCount"
|
:search-count="searchCount"
|
||||||
:scale="mobileInPc ? scaleWidth * 3 : scaleWidth"
|
:scale="mobileInPc ? 100 : scaleWidth"
|
||||||
@userViewEnlargeOpen="userViewEnlargeOpen($event, item)"
|
@userViewEnlargeOpen="userViewEnlargeOpen($event, item)"
|
||||||
/>
|
/>
|
||||||
<user-view-enlarge ref="userViewEnlargeRef"></user-view-enlarge>
|
<user-view-enlarge ref="userViewEnlargeRef"></user-view-enlarge>
|
||||||
|
@ -160,6 +160,16 @@ export function initCanvasDataMobile(dvId, busiFlag, callBack) {
|
|||||||
ele.y = my
|
ele.y = my
|
||||||
ele.sizeX = mSizeX
|
ele.sizeX = mSizeX
|
||||||
ele.sizeY = mSizeY
|
ele.sizeY = mSizeY
|
||||||
|
if (ele.component === 'DeTabs') {
|
||||||
|
ele.propValue.forEach(tabItem => {
|
||||||
|
tabItem.componentData.forEach(tabComponent => {
|
||||||
|
tabComponent.x = tabComponent.mx
|
||||||
|
tabComponent.y = tabComponent.my
|
||||||
|
tabComponent.sizeX = tabComponent.mSizeX
|
||||||
|
tabComponent.sizeY = tabComponent.mSizeY
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
dvMainStore.setComponentData(componentData)
|
dvMainStore.setComponentData(componentData)
|
||||||
dvMainStore.setCanvasStyle(canvasStyleResult)
|
dvMainStore.setCanvasStyle(canvasStyleResult)
|
||||||
|
@ -81,6 +81,17 @@ const hanedleMessage = event => {
|
|||||||
ele.my = y
|
ele.my = y
|
||||||
ele.mSizeX = sizeX
|
ele.mSizeX = sizeX
|
||||||
ele.mSizeY = sizeY
|
ele.mSizeY = sizeY
|
||||||
|
if (ele.component === 'DeTabs') {
|
||||||
|
ele.propValue.forEach(tabItem => {
|
||||||
|
tabItem.componentData.forEach(tabComponent => {
|
||||||
|
const { x: tx, y: ty, sizeX: tSizeX, sizeY: tSizeY } = com.tab[tabComponent.id]
|
||||||
|
tabComponent.mx = tx
|
||||||
|
tabComponent.my = ty
|
||||||
|
tabComponent.mSizeX = tSizeX
|
||||||
|
tabComponent.mSizeY = tSizeY
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ const checkItemPosition = component => {
|
|||||||
component.y = dvMainStore.componentData.reduce((pre, next) => {
|
component.y = dvMainStore.componentData.reduce((pre, next) => {
|
||||||
return Math.max(pre, next.y + next.sizeY)
|
return Math.max(pre, next.y + next.sizeY)
|
||||||
}, 1)
|
}, 1)
|
||||||
|
component.sizeY = 10
|
||||||
}
|
}
|
||||||
|
|
||||||
const hanedleMessage = event => {
|
const hanedleMessage = event => {
|
||||||
@ -50,8 +51,22 @@ const hanedleMessage = event => {
|
|||||||
{
|
{
|
||||||
type: 'mobileSaveFromMobile',
|
type: 'mobileSaveFromMobile',
|
||||||
value: dvMainStore.componentData.reduce((pre, next) => {
|
value: dvMainStore.componentData.reduce((pre, next) => {
|
||||||
const { x, y, sizeX, sizeY, id } = next
|
const { x, y, sizeX, sizeY, id, component } = next
|
||||||
pre[id] = { x, y, sizeX, sizeY }
|
pre[id] = { x, y, sizeX, sizeY, component }
|
||||||
|
if (next.component === 'DeTabs') {
|
||||||
|
pre[id].tab = {}
|
||||||
|
next.propValue.forEach(tabItem => {
|
||||||
|
tabItem.componentData.forEach(tabComponent => {
|
||||||
|
const { x: tx, y: ty, sizeX: tSizeX, sizeY: tSizeY, id: tId } = tabComponent
|
||||||
|
pre[id].tab[tId] = {
|
||||||
|
x: tx,
|
||||||
|
y: ty,
|
||||||
|
sizeX: tSizeX,
|
||||||
|
sizeY: tSizeY
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user