This commit is contained in:
stt
2025-12-04 14:51:25 +08:00
3 changed files with 15 additions and 77 deletions

View File

@@ -123,7 +123,8 @@ const dataList: any = ref({})
// 获取主内容区域高度
const getMainHeight = () => {
const elMain = document.querySelector('.el-main') as HTMLElement | null
zoom.value = layout.value.length==1?1: (elMain?.offsetHeight ?? 0) / 1080
zoom.value =
layout.value.length == 1 ? 1 : (elMain?.offsetHeight ?? 0) > 1080 ? 1 : (elMain?.offsetHeight ?? 0) / 1080
// console.log('🚀 ~ getMainHeight ~ elMain:', elMain?.offsetHeight)
return ((elMain?.offsetHeight || 0) - 70) / zoom.value
}