优化移动端布局样式和配置

This commit is contained in:
wangqiao
2025-09-03 14:48:16 +08:00
parent 694a032d0a
commit 7f2edb91e4
3 changed files with 187 additions and 17 deletions

View File

@ -1,6 +1,16 @@
<template>
<div>
<h1>Mobile Page</h1>
<div class="mobile-page">
<h1 class="page-title">移动端页面</h1>
<div class="test-content">
<p>这是一个测试页面用于验证移动端样式重置是否生效</p>
<div class="test-box">
<p>测试盒子 - 宽度应该适应屏幕</p>
</div>
<div class="button-group">
<button class="el-button el-button--primary">主要按钮</button>
<button class="el-button el-button--default">默认按钮</button>
</div>
</div>
</div>
</template>
@ -11,4 +21,55 @@ definePageMeta({
// Mobile specific logic can be added here
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.mobile-page {
padding: 16px;
min-height: 100vh;
background: #f5f5f5;
box-sizing: border-box;
}
.page-title {
font-size: 20px;
color: #333;
margin-bottom: 20px;
text-align: center;
}
.test-content {
background: #fff;
padding: 16px;
border-radius: 8px;
margin-bottom: 16px;
p {
margin-bottom: 12px;
line-height: 1.5;
}
}
.test-box {
width: 100%;
height: 80px;
background: #e8f4fd;
border: 1px solid #b3d8ff;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
margin: 16px 0;
p {
margin: 0;
color: #409eff;
font-weight: 500;
}
}
.button-group {
display: flex;
gap: 12px;
justify-content: center;
margin-top: 20px;
}
</style>