fix: 修复缩放大屏时,Tab组件内的元素大小/位置可能会变问题 #13857

This commit is contained in:
wangjiahao 2025-01-08 10:22:30 +08:00 committed by 王嘉豪
parent 2e3983adad
commit 4fb48de19f
2 changed files with 10 additions and 2 deletions

View File

@ -6,7 +6,10 @@ import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { storeToRefs } from 'pinia'
import { ref, onMounted, onUnmounted, nextTick } from 'vue'
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
import { changeSizeWithScale } from '@/utils/changeComponentsSizeWithScale'
import {
changeSizeWithScale,
changeSizeWithScaleAdaptor
} from '@/utils/changeComponentsSizeWithScale'
import { useEmitt } from '@/hooks/web/useEmitt'
import { useI18n } from '@/hooks/web/useI18n'
const dvMainStore = dvMainStoreWithOut()
@ -25,8 +28,9 @@ const handleScaleChange = () => {
scale.value = scale.value < 10 ? 10 : scale.value
scale.value = scale.value > 200 ? 200 : scale.value
changeSizeWithScale(scale.value)
changeSizeWithScaleAdaptor(scale.value)
scaleChangeReady.value = true
}, 0)
}, 50)
}
}

View File

@ -22,6 +22,10 @@ const needToChangeDirectionAttrs = {
height: ['top', 'height']
}
export function changeSizeWithScaleAdaptor(scale) {
return changeComponentsSizeWithScale(scale)
}
export function changeSizeWithScale(scale) {
return changeComponentsSizeWithScale(scale)
}