112 lines
1.7 KiB
Vue
Raw Normal View History

2025-08-10 23:09:36 +08:00
<script setup lang="ts">
import { onMounted } from 'vue'
import { RouterView } from 'vue-router'
import { useUserStore } from '@/stores/user'
import AppLayout from '@/components/layout/AppLayout.vue'
const userStore = useUserStore()
onMounted(() => {
// 初始化用户认证状态
userStore.initializeAuth()
})
</script>
<template>
<div id="app">
<AppLayout>
<RouterView />
</AppLayout>
</div>
</template>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* 确保在所有缩放级别下都能正常显示 */
html {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
text-size-adjust: 100%;
zoom: 1;
}
/* 移除全屏相关样式,使用正常布局 */
html, body {
height: 100vh;
width: 100vw;
margin: 0;
padding: 0;
overflow-x: hidden;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
color: #333;
background-color: #f5f5f5;
}
#app {
min-height: 100vh;
width: 100vw;
display: block;
position: relative;
}
/* 确保导航栏和横幅可见 */
.header {
display: flex !important;
visibility: visible !important;
opacity: 1 !important;
position: relative !important;
z-index: 1000 !important;
}
.hero-banner {
display: flex !important;
visibility: visible !important;
opacity: 1 !important;
position: relative !important;
z-index: 1 !important;
}
/* 响应式容器 */
.container {
width: 100%;
margin: 0 auto;
}
/* 工具类 */
.text-center {
text-align: center;
}
.mb-4 {
margin-bottom: 1rem;
}
.mt-4 {
margin-top: 1rem;
}
.p-4 {
padding: 1rem;
}
/* 响应式显示工具类 */
.d-none {
display: none !important;
}
.d-block {
display: block !important;
}
</style>