hookehuyr

style(Splash): 将px单位转换为rem以适配移动端布局

docs: 添加项目规则文档说明项目采用rem布局
refactor(vite): 更新开发服务器端口并添加文件头注释
1 +这是一个移动端项目,基于Vue3 + Vite + ElementPlus 实现。
2 +
3 +1. 尺寸单位
4 + - 项目采用rem单位进行布局,基准字体大小为16px。
5 + - 其他尺寸单位(如px、vw、vh等)仅在必要时使用,避免过度依赖。
...@@ -107,8 +107,8 @@ onMounted(() => { ...@@ -107,8 +107,8 @@ onMounted(() => {
107 left: 50%; 107 left: 50%;
108 transform: translate(-50%, -50%); 108 transform: translate(-50%, -50%);
109 z-index: 4; 109 z-index: 4;
110 - width: 200px; 110 + width: 12.5rem;
111 - height: 200px; 111 + height: 12.5rem;
112 opacity: 1; 112 opacity: 1;
113 animation: loaderFadeOut 1s ease-out 2.5s forwards; 113 animation: loaderFadeOut 1s ease-out 2.5s forwards;
114 } 114 }
...@@ -118,15 +118,15 @@ onMounted(() => { ...@@ -118,15 +118,15 @@ onMounted(() => {
118 position: absolute; 118 position: absolute;
119 top: 50%; 119 top: 50%;
120 left: 50%; 120 left: 50%;
121 - width: 8px; 121 + width: 0.5rem;
122 - height: 8px; 122 + height: 0.5rem;
123 background: radial-gradient(circle, #fbbf24 0%, #f59e0b 70%, #d97706 100%); 123 background: radial-gradient(circle, #fbbf24 0%, #f59e0b 70%, #d97706 100%);
124 border-radius: 50%; 124 border-radius: 50%;
125 transform: translate(-50%, -50%); 125 transform: translate(-50%, -50%);
126 box-shadow: 126 box-shadow:
127 - 0 0 10px rgba(251, 191, 36, 0.8), 127 + 0 0 0.625rem rgba(251, 191, 36, 0.8),
128 - 0 0 20px rgba(251, 191, 36, 0.4), 128 + 0 0 1.25rem rgba(251, 191, 36, 0.4),
129 - 0 0 30px rgba(251, 191, 36, 0.2); 129 + 0 0 1.875rem rgba(251, 191, 36, 0.2);
130 animation: waterDrop 0.6s ease-out; 130 animation: waterDrop 0.6s ease-out;
131 } 131 }
132 132
...@@ -135,26 +135,34 @@ onMounted(() => { ...@@ -135,26 +135,34 @@ onMounted(() => {
135 position: absolute; 135 position: absolute;
136 top: 50%; 136 top: 50%;
137 left: 50%; 137 left: 50%;
138 - border: 2px solid rgba(251, 191, 36, 0.6); 138 + border: 0.125rem solid rgba(251, 191, 36, 0.6);
139 border-radius: 50%; 139 border-radius: 50%;
140 transform: translate(-50%, -50%); 140 transform: translate(-50%, -50%);
141 opacity: 0; 141 opacity: 0;
142 } 142 }
143 143
144 .ripple-1 { 144 .ripple-1 {
145 - animation: rippleExpand 2s ease-out 0.3s; 145 + width: 1.25rem;
146 + height: 1.25rem;
147 + animation: rippleExpand 2s ease-out 0.2s infinite;
146 } 148 }
147 149
148 .ripple-2 { 150 .ripple-2 {
149 - animation: rippleExpand 2s ease-out 0.6s; 151 + width: 2.5rem;
152 + height: 2.5rem;
153 + animation: rippleExpand 2s ease-out 0.4s infinite;
150 } 154 }
151 155
152 .ripple-3 { 156 .ripple-3 {
153 - animation: rippleExpand 2s ease-out 0.9s; 157 + width: 3.75rem;
158 + height: 3.75rem;
159 + animation: rippleExpand 2s ease-out 0.6s infinite;
154 } 160 }
155 161
156 .ripple-4 { 162 .ripple-4 {
157 - animation: rippleExpand 2s ease-out 1.2s; 163 + width: 5rem;
164 + height: 5rem;
165 + animation: rippleExpand 2s ease-out 0.8s infinite;
158 } 166 }
159 167
160 /* 内容层 */ 168 /* 内容层 */
...@@ -178,7 +186,7 @@ onMounted(() => { ...@@ -178,7 +186,7 @@ onMounted(() => {
178 .logo-image { 186 .logo-image {
179 width: auto; 187 width: auto;
180 height: 10rem; 188 height: 10rem;
181 - max-width: 250px; 189 + max-width: 15.625rem;
182 object-fit: contain; 190 object-fit: contain;
183 display: block; 191 display: block;
184 } 192 }
...@@ -205,7 +213,7 @@ onMounted(() => { ...@@ -205,7 +213,7 @@ onMounted(() => {
205 .enter-image { 213 .enter-image {
206 width: auto; 214 width: auto;
207 height: 5rem; 215 height: 5rem;
208 - max-width: 400px; 216 + max-width: 25rem;
209 object-fit: contain; 217 object-fit: contain;
210 display: block; 218 display: block;
211 } 219 }
...@@ -213,7 +221,7 @@ onMounted(() => { ...@@ -213,7 +221,7 @@ onMounted(() => {
213 /* 动画 */ 221 /* 动画 */
214 @keyframes waterDrop { 222 @keyframes waterDrop {
215 0% { 223 0% {
216 - transform: translate(-50%, -80px) scale(0.5); 224 + transform: translate(-50%, -5rem) scale(0.5);
217 opacity: 0.8; 225 opacity: 0.8;
218 } 226 }
219 50% { 227 50% {
...@@ -231,17 +239,17 @@ onMounted(() => { ...@@ -231,17 +239,17 @@ onMounted(() => {
231 width: 0; 239 width: 0;
232 height: 0; 240 height: 0;
233 opacity: 0.8; 241 opacity: 0.8;
234 - border-width: 3px; 242 + border-width: 0.1875rem;
235 } 243 }
236 50% { 244 50% {
237 opacity: 0.4; 245 opacity: 0.4;
238 - border-width: 2px; 246 + border-width: 0.125rem;
239 } 247 }
240 100% { 248 100% {
241 - width: 160px; 249 + width: 10rem;
242 - height: 160px; 250 + height: 10rem;
243 opacity: 0; 251 opacity: 0;
244 - border-width: 1px; 252 + border-width: 0.0625rem;
245 } 253 }
246 } 254 }
247 255
...@@ -267,7 +275,7 @@ onMounted(() => { ...@@ -267,7 +275,7 @@ onMounted(() => {
267 @keyframes fadeInUp { 275 @keyframes fadeInUp {
268 from { 276 from {
269 opacity: 0; 277 opacity: 0;
270 - transform: translateY(30px); 278 + transform: translateY(1.875rem);
271 } 279 }
272 to { 280 to {
273 opacity: 1; 281 opacity: 1;
......
1 +/*
2 + * @Date: 2025-10-30 10:27:43
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2025-10-30 13:55:18
5 + * @FilePath: /stdj_h5/vite.config.js
6 + * @Description: 文件描述
7 + */
1 import { defineConfig } from 'vite' 8 import { defineConfig } from 'vite'
2 import vue from '@vitejs/plugin-vue' 9 import vue from '@vitejs/plugin-vue'
3 import AutoImport from 'unplugin-auto-import/vite' 10 import AutoImport from 'unplugin-auto-import/vite'
...@@ -59,7 +66,7 @@ export default defineConfig({ ...@@ -59,7 +66,7 @@ export default defineConfig({
59 }, 66 },
60 server: { 67 server: {
61 host: '0.0.0.0', 68 host: '0.0.0.0',
62 - port: 3000, 69 + port: 5173,
63 open: true, 70 open: true,
64 proxy: { 71 proxy: {
65 '/api': { 72 '/api': {
......