chore: update index.html

This commit is contained in:
Cat Tom 2025-03-26 02:50:37 +08:00
parent daa5ee7b78
commit df4bedc186

View File

@ -47,6 +47,9 @@
</head> </head>
<body> <body>
<div id="app"> <div id="app">
<div class="content-wrapper">
<!-- 页面主要内容 -->
<!-- 初始加载动画 --> <!-- 初始加载动画 -->
<div class="app-loading"> <div class="app-loading">
<div class="loading-spinner"> <div class="loading-spinner">
@ -56,23 +59,44 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- 主应用脚本 --> <!-- 主应用脚本 -->
<script type="module" src="/src/main.js"></script> <script type="module" src="/src/main.js"></script>
<!-- 加载状态样式 --> <!-- 加载状态样式 -->
<style> <style>
.app-loading { html, body {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%; height: 100%;
margin: 0;
}
#app {
display: flex; display: flex;
justify-content: center; flex-direction: column;
align-items: center; min-height: 100vh;
background: rgba(255,255,255,0.8); max-height: 100vh;
z-index: 9999; overflow: hidden;
}
.content-wrapper {
flex: 1;
overflow-y: auto;
padding: 2rem;
scrollbar-width: thin;
scrollbar-color: #7ac5e8 transparent;
}
.app-loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(255,255,255,0.9);
border-radius: 1rem;
padding: 2rem;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
z-index: 10000;
transition: opacity 0.3s ease; transition: opacity 0.3s ease;
} }
@ -99,11 +123,37 @@
100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; } 100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
} }
/* 滚动条样式 */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: rgba(122,197,232,0.1);
}
::-webkit-scrollbar-thumb {
background: #7ac5e8;
border-radius: 4px;
}
/* 当Vue挂载后隐藏加载动画 */ /* 当Vue挂载后隐藏加载动画 */
[data-v-app] + .app-loading { [data-v-app] .app-loading {
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
} }
@media (max-width: 768px) {
.content-wrapper {
padding: 1rem;
}
.app-loading {
padding: 1rem;
width: 80%;
max-width: 300px;
}
}
</style> </style>
</body> </body>
</html> </html>