Merge pull request #12684 from dataease/pr@dev-v2@fix_tabs-group
Pr@dev v2@fix tabs group
This commit is contained in:
commit
3cbef92b2a
@ -865,7 +865,13 @@ const componentBackgroundStyle = computed(() => {
|
||||
innerPadding,
|
||||
borderRadius
|
||||
} = element.value.commonBackground
|
||||
const style = { padding: innerPadding * scale.value + 'px', borderRadius: borderRadius + 'px' }
|
||||
const innerPaddingTarget = ['Group', 'DeTabs'].includes(element.value.component)
|
||||
? 0
|
||||
: innerPadding
|
||||
const style = {
|
||||
padding: innerPaddingTarget * scale.value + 'px',
|
||||
borderRadius: borderRadius + 'px'
|
||||
}
|
||||
let colorRGBA = ''
|
||||
if (backgroundColorSelect && backgroundColor) {
|
||||
colorRGBA = backgroundColor
|
||||
|
||||
@ -6,6 +6,8 @@ import { composeStoreWithOut } from '@/store/modules/data-visualization/compose'
|
||||
import { lockStoreWithOut } from '@/store/modules/data-visualization/lock'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { getCurInfo } from '@/store/modules/data-visualization/common'
|
||||
import { isGroupCanvas, isTabCanvas } from '@/utils/canvasUtils'
|
||||
import { groupStyleRevert } from '@/utils/style'
|
||||
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const composeStore = composeStoreWithOut()
|
||||
@ -191,10 +193,14 @@ function move(keyCode) {
|
||||
}
|
||||
|
||||
function groupAreaAdaptor(leftOffset = 0, topOffset = 0) {
|
||||
if (curComponent.value.component === 'GroupArea') {
|
||||
composeStore.areaData.components.forEach(component => {
|
||||
component.style.top = component.style.top + topOffset
|
||||
component.style.left = component.style.left + leftOffset
|
||||
const canvasId = curComponent.value.canvasId
|
||||
const parentNode = document.querySelector('#editor-' + canvasId)
|
||||
|
||||
//如果当前画布是Group内部画布 则对应组件定位在resize时要还原到groupStyle中
|
||||
if (isGroupCanvas(canvasId) || isTabCanvas(canvasId)) {
|
||||
groupStyleRevert(curComponent.value, {
|
||||
width: parentNode.offsetWidth,
|
||||
height: parentNode.offsetHeight
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user