mirror of
https://github.com/dataease/dataease.git
synced 2026-06-16 11:21:44 +08:00
fix(数据大屏): 修复调整视窗大小会导致tab组件内的图表大小发生变化问题
This commit is contained in:
@@ -2,7 +2,7 @@ import { deepCopy } from './utils'
|
||||
import { divide, multiply } from 'mathjs'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { groupSizeStyleAdaptor } from '@/utils/style'
|
||||
import { groupItemStyleAdaptor, groupSizeStyleAdaptor } from '@/utils/style'
|
||||
import { nextTick } from 'vue'
|
||||
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
@@ -54,6 +54,16 @@ function changeComponentsSizeWithScaleCircle(componentDataCopy, scale) {
|
||||
|
||||
if (['Group'].includes(component.component)) {
|
||||
groupSizeStyleAdaptor(component)
|
||||
const parentStyle = component.style
|
||||
component.propValue.forEach(componentInner => {
|
||||
if (['DeTabs'].includes(componentInner.component)) {
|
||||
componentInner.propValue.forEach(tabItem => {
|
||||
changeComponentsSizeWithScaleCircle(tabItem.componentData, scale)
|
||||
})
|
||||
} else {
|
||||
groupItemStyleAdaptor(componentInner, parentStyle)
|
||||
}
|
||||
})
|
||||
} else if (['DeTabs'].includes(component.component)) {
|
||||
component.propValue.forEach(tabItem => {
|
||||
changeComponentsSizeWithScaleCircle(tabItem.componentData, scale)
|
||||
|
||||
@@ -274,7 +274,7 @@ function dataVTabSizeStyleAdaptor(tabComponent) {
|
||||
})
|
||||
}
|
||||
|
||||
function groupItemStyleAdaptor(component, parentStyle) {
|
||||
export function groupItemStyleAdaptor(component, parentStyle) {
|
||||
// 分组还原逻辑
|
||||
// 当发上分组缩放是,要将内部组件按照比例转换
|
||||
const styleScale = component.groupStyle
|
||||
|
||||
Reference in New Issue
Block a user