This commit is contained in:
2025-12-24 11:48:40 +08:00
parent 872d3febe9
commit d0ff91a2c4
5 changed files with 275 additions and 259 deletions

View File

@@ -52,17 +52,25 @@ class ScreenDetectionManager {
// 检测折叠屏
checkVisualViewport() {
if (window.visualViewport?.segments?.length > 1) {
return {
foldable: true,
count: window.visualViewport.segments.length - 1
try {
if (window.visualViewport?.segments?.length > 1) {
return {
foldable: true,
count: window.visualViewport.segments.length - 1
}
} else {
return {
foldable: false,
count: 1
}
}
} else {
} catch (error) {
return {
foldable: false,
count: 1
}
}
}
// 动态加载 CSS