调试
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 13s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s

This commit is contained in:
孙诚
2025-12-25 16:44:34 +08:00
parent fe78aa7551
commit 0b7c91828f

View File

@@ -1,5 +1,12 @@
<template>
<van-config-provider :theme="theme" class="app-root">
<pre
style="position:fixed; left:0; top:0; z-index:9999;
background:rgba(0,0,0,0.7); color:#0f0;
font-size:10px; max-height:50vh; overflow:auto;">
{{ log }}
</pre>
<div class="app-main">
<RouterView />
</div>
@@ -24,8 +31,32 @@
import { RouterView, useRoute } from 'vue-router'
import { ref, onMounted, onUnmounted, computed } from 'vue'
const route = useRoute()
const log = ref('')
const updateInfo = () => {
log.value = JSON.stringify({
innerHeight: window.innerHeight,
outerHeight: window.outerHeight,
documentElementClientHeight: document.documentElement.clientHeight,
viewport: window.visualViewport
? {
height: window.visualViewport.height,
offsetTop: window.visualViewport.offsetTop,
}
: null,
}, null, 2)
}
onMounted(() => {
updateInfo()
window.addEventListener('resize', updateInfo)
})
onUnmounted(() => {
window.removeEventListener('resize', updateInfo)
})
const route = useRoute()
// 根据路由判断是否显示Tabbar
const showTabbar = computed(() => {
return route.path === '/' ||