修复:将前端宽屏布局改为响应式

This commit is contained in:
xiaowang
2026-03-24 09:59:52 +08:00
parent 5302af0c1a
commit c041c754cb
13 changed files with 170 additions and 92 deletions
+5 -6
View File
@@ -121,12 +121,11 @@ onMounted(loadOrders)
.line { margin-top: 4px; color: #666; font-size: 13px; }
.appointment { color: #1890ff; }
@media (min-width: 768px) {
.header {
width: min(100%, var(--frontend-page-max-width));
left: 50%;
right: auto;
transform: translateX(-50%);
@media (min-width: 992px) {
.content {
max-width: 980px;
margin: 0 auto;
padding: 24px;
}
}
</style>
+5 -7
View File
@@ -540,13 +540,11 @@ onMounted(async () => {
.artist-option img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.time-picker { border-radius: 8px; }
@media (min-width: 768px) {
.header,
.footer {
width: min(100%, var(--frontend-page-max-width));
left: 50%;
right: auto;
transform: translateX(-50%);
@media (min-width: 992px) {
.content {
max-width: 980px;
margin: 0 auto;
padding: 24px 24px 140px;
}
}
</style>
+5 -6
View File
@@ -284,12 +284,11 @@ onMounted(() => {
color: #ff4d4f;
}
@media (min-width: 768px) {
.header {
width: min(100%, var(--frontend-page-max-width));
left: 50%;
right: auto;
transform: translateX(-50%);
@media (min-width: 992px) {
.coupon-section {
max-width: 960px;
margin: 0 auto;
padding: 24px;
}
}
</style>
+34 -1
View File
@@ -457,7 +457,6 @@ const handleProductClick = (item: any) => {
height: 100%;
object-fit: cover;
border-radius: 16px;
object-fit: stretch;
}
/* 轮播指示器样式 */
@@ -681,4 +680,38 @@ const handleProductClick = (item: any) => {
color: #999;
font-size: 14px;
}
@media (min-width: 992px) {
.header,
.search-section,
.section {
max-width: var(--frontend-content-max-width);
margin-left: auto;
margin-right: auto;
}
.banner-container {
padding: 0 24px;
}
.banner-carousel {
aspect-ratio: 16 / 6;
max-height: 340px;
}
.horizontal-scroll {
overflow: visible;
flex-wrap: wrap;
}
.product-card {
flex: 1 1 calc(25% - 12px);
width: calc(25% - 12px);
min-width: 180px;
}
.product-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
</style>
+5 -6
View File
@@ -120,12 +120,11 @@ onMounted(loadOrders)
.line { margin-top: 4px; color: #666; font-size: 13px; }
.appointment { color: #1890ff; }
@media (min-width: 768px) {
.header {
width: min(100%, var(--frontend-page-max-width));
left: 50%;
right: auto;
transform: translateX(-50%);
@media (min-width: 992px) {
.content {
max-width: 980px;
margin: 0 auto;
padding: 24px;
}
}
</style>
+14 -6
View File
@@ -561,12 +561,20 @@ onMounted(() => {
border-radius: 22px;
}
@media (min-width: 768px) {
.action-buttons {
width: min(100%, var(--frontend-page-max-width));
left: 50%;
right: auto;
transform: translateX(-50%);
@media (min-width: 992px) {
.product-image-container,
.product-info {
max-width: 1040px;
margin: 0 auto;
}
.product-image-container {
padding: 28px 28px 18px;
}
.product-info {
margin-top: 0;
padding: 24px 28px 96px;
}
}
</style>
+23 -6
View File
@@ -569,12 +569,29 @@ onMounted(async () => {
font-size: 14px;
}
@media (min-width: 768px) {
.header {
width: min(100%, var(--frontend-page-max-width));
left: 50%;
right: auto;
transform: translateX(-50%);
@media (min-width: 992px) {
.main-content {
min-height: calc(100vh - 60px);
height: auto;
}
.category-sidebar {
width: 128px;
}
.product-section {
padding: 24px;
}
.product-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 0;
}
}
@media (min-width: 1280px) {
.product-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
</style>
+13 -7
View File
@@ -1028,13 +1028,19 @@ const loadWishlistCount = async () => {
color: #8b8b9a;
}
@media (min-width: 768px) {
.header-bg,
.header {
width: min(100%, var(--frontend-page-max-width));
left: 50%;
right: auto;
transform: translateX(-50%);
@media (min-width: 992px) {
.profile-info,
.stats-section,
.menu-section,
.logout-section,
.content-card {
max-width: 1040px;
margin-left: auto;
margin-right: auto;
}
.content-card {
margin-bottom: 15px;
}
}
</style>
+5 -7
View File
@@ -387,13 +387,11 @@ onMounted(() => {
border-radius: 8px;
}
@media (min-width: 768px) {
.header-bg,
.header {
width: min(100%, var(--frontend-page-max-width));
left: 50%;
right: auto;
transform: translateX(-50%);
@media (min-width: 992px) {
.shop-content {
max-width: 1040px;
margin: 0 auto;
padding: 100px 24px 24px;
}
}
</style>