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

This commit is contained in:
孙诚
2025-12-25 17:12:19 +08:00
parent adf0c84a8e
commit f42163ed95
3 changed files with 33 additions and 39 deletions

View File

@@ -1,18 +1,13 @@
<template> <template>
<van-config-provider :theme="theme" :style="{ <van-config-provider :theme="theme" class="app-provider">
height: '100%', <pre style="position:fixed; left:0; top:0; z-index:9999;
border: '2px solid red'
}" class="app-root">
<pre
style="position:fixed; left:0; top:0; z-index:9999;
background:rgba(0,0,0,0.7); color:#0f0; background:rgba(0,0,0,0.7); color:#0f0;
font-size:10px; max-height:50vh; overflow:auto;"> font-size:10px; max-height:50vh; overflow:auto;">
{{ log }} {{ log }}
</pre> </pre>
<div class="app-main"> <div class="app-root">
<RouterView /> <RouterView />
</div>
<van-tabbar v-model="active" v-show="showTabbar"> <van-tabbar v-model="active" v-show="showTabbar">
<van-tabbar-item icon="notes-o" to="/calendar"> <van-tabbar-item icon="notes-o" to="/calendar">
日历 日历
@@ -27,6 +22,7 @@
设置 设置
</van-tabbar-item> </van-tabbar-item>
</van-tabbar> </van-tabbar>
</div>
</van-config-provider> </van-config-provider>
</template> </template>
@@ -101,16 +97,15 @@ const handleTabClick = (path) => {
</script> </script>
<style scoped> <style scoped>
.app-root { .app-provider {
/* 用前面的 JS 动态高度方案,或至少用 100% 而不是 100vh */ /* 关键:让 config-provider 本身先占满视口 */
height: 100%; height: 100%;
}
.app-root {
height: 100%;
border: 2px solid red; /* 调试用红框 */
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
/* 主体内容自己撑开,给 Tabbar 留出空间 */
.app-main {
flex: 1;
overflow-y: auto;
}
</style> </style>

View File

@@ -84,10 +84,3 @@ body {
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
html, body, #app {
margin: 0;
padding: 0;
height: 100%;
}

View File

@@ -58,3 +58,9 @@ a,
padding: 0 2rem; padding: 0 2rem;
} }
} }
html, body, #app {
margin: 0;
padding: 0;
height: 100%;
}