fix: 修复购物车移动端删除按钮位置

- 删除按钮绝对定位在右上角
- 复选框绝对定位在左上角
- 商品信息占整行
- 数量选择器单独一行显示

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 22:38:15 +08:00
parent 03cce04b7f
commit 56672ac3de
+47 -70
View File
@@ -942,89 +942,66 @@ onMounted(() => {
} }
.cart-item { .cart-item {
flex-wrap: wrap; display: block;
gap: 8px;
padding: 12px; padding: 12px;
align-items: flex-start; position: relative;
> .el-checkbox {
width: 24px;
order: 1;
margin-top: 24px;
}
> .item-product {
flex: 1;
min-width: 0;
order: 2;
width: calc(100% - 36px);
}
> .item-price {
display: none;
}
> .item-quantity {
order: 4;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
gap: 12px;
padding-left: 36px;
margin-top: 8px;
}
> .item-subtotal {
order: 3;
width: auto;
margin-left: auto;
padding-right: 8px;
}
> .item-action {
order: 5;
width: 100%;
padding-left: 36px;
margin-top: 4px;
}
} }
.item-product { .cart-item > .el-checkbox {
gap: 10px; position: absolute;
flex-wrap: nowrap; top: 12px;
left: 12px;
width: 24px;
}
.item-image { .cart-item > .item-product {
width: 70px; display: flex;
height: 70px; gap: 10px;
flex-shrink: 0; padding-left: 32px;
} padding-right: 60px;
}
.cart-item > .item-price {
display: none;
}
.cart-item > .item-quantity {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 10px;
padding-left: 32px;
}
.cart-item > .item-subtotal {
text-align: right;
margin-top: 8px;
}
.cart-item > .item-action {
position: absolute;
top: 12px;
right: 12px;
width: auto;
}
.item-product .item-image {
width: 70px;
height: 70px;
flex-shrink: 0;
} }
.item-info { .item-info {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
display: flex;
flex-direction: column;
justify-content: center;
gap: 4px;
} }
.item-name { .item-quantity :deep(.el-input-number) {
font-size: 14px; width: 100px;
line-height: 1.4;
} }
.item-quantity { .item-subtotal .subtotal-price {
:deep(.el-input-number) { font-size: 16px;
width: 100px;
}
.stock-tip {
font-size: 11px;
}
}
.item-subtotal {
.subtotal-price {
font-size: 16px;
}
} }
.payment-methods { .payment-methods {