309 lines
7.0 KiB
CSS
309 lines
7.0 KiB
CSS
/* 购物车:商品行、配置/数量/报价反馈和结算汇总。 */
|
|
/* 导入方:app/pages/cart/index.vue。 */
|
|
.page[data-v-11d8a39a] {
|
|
flex-direction: column;
|
|
gap: 21px;
|
|
width: 100%;
|
|
min-width: 0;
|
|
padding-bottom: 28px;
|
|
display: flex;
|
|
}
|
|
.page-head[data-v-11d8a39a] {
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 12px;
|
|
min-height: 36px;
|
|
display: flex;
|
|
}
|
|
.page-head h2[data-v-11d8a39a] {
|
|
margin: 0;
|
|
font-size: 1.25rem;
|
|
font-weight: 650;
|
|
line-height: 2rem;
|
|
}
|
|
.page-heading p[data-v-11d8a39a] {
|
|
color: var(--p-text-muted-color);
|
|
margin: 4px 0 0;
|
|
font-size: 0.9375rem;
|
|
}
|
|
/* 购物车商品区与结算区的布局;下方容器查询针对商品卡片可用宽度,而非整个视口。 */
|
|
.cart-layout[data-v-11d8a39a] {
|
|
grid-template-columns: minmax(0, 3.15fr) minmax(270px, 1fr);
|
|
align-items: start;
|
|
gap: 20px;
|
|
display: grid;
|
|
}
|
|
.panel[data-v-11d8a39a] {
|
|
background: var(--p-content-background);
|
|
border: 1px solid var(--p-content-border-color);
|
|
border-radius: 8px;
|
|
min-width: 0;
|
|
padding: 20px;
|
|
}
|
|
.cart-head[data-v-11d8a39a] {
|
|
border-bottom: 1px solid var(--p-content-border-color);
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding-bottom: 16px;
|
|
font-size: 1rem;
|
|
display: flex;
|
|
}
|
|
.head-text[data-v-11d8a39a] {
|
|
color: var(--p-text-color);
|
|
margin-right: auto;
|
|
}
|
|
.item-count[data-v-11d8a39a] {
|
|
margin-left: 12px;
|
|
}
|
|
.clear-btn[data-v-11d8a39a],
|
|
.item-count[data-v-11d8a39a] {
|
|
color: var(--p-text-muted-color);
|
|
font-size: 0.875rem;
|
|
}
|
|
.clear-btn[data-v-11d8a39a] {
|
|
cursor: pointer;
|
|
background: 0 0;
|
|
border: none;
|
|
margin-left: 8px;
|
|
padding: 0;
|
|
}
|
|
.clear-btn[data-v-11d8a39a]:hover {
|
|
color: var(--p-red-600, #dc2626);
|
|
}
|
|
.clear-btn[data-v-11d8a39a]:disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.6;
|
|
}
|
|
.cart-item[data-v-11d8a39a] {
|
|
border-bottom: 1px solid var(--p-content-border-color);
|
|
align-items: center;
|
|
gap: 14px;
|
|
padding: 24px 0;
|
|
display: flex;
|
|
}
|
|
.cart-item[data-v-11d8a39a]:last-child {
|
|
border-bottom: 0;
|
|
}
|
|
.item-main[data-v-11d8a39a] {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
/* 允许连续长文本换行,防止IP、密钥或用户输入撑破当前容器;不会修改原始数据。 */
|
|
.item-name[data-v-11d8a39a] {
|
|
overflow-wrap: anywhere;
|
|
font-size: 1rem;
|
|
font-weight: 500;
|
|
}
|
|
.item-configuration[data-v-11d8a39a] {
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
margin: 10px 0 0;
|
|
font-size: 0.875rem;
|
|
line-height: 1.6;
|
|
display: flex;
|
|
}
|
|
.item-configuration-row[data-v-11d8a39a] {
|
|
align-items: baseline;
|
|
gap: 10px;
|
|
min-width: 0;
|
|
display: flex;
|
|
}
|
|
/* 允许连续长文本换行,防止IP、密钥或用户输入撑破当前容器;不会修改原始数据。 */
|
|
.item-configuration dt[data-v-11d8a39a] {
|
|
color: var(--p-text-muted-color);
|
|
overflow-wrap: anywhere;
|
|
flex: 0 0 88px;
|
|
}
|
|
.item-configuration dd[data-v-11d8a39a] {
|
|
min-width: 0;
|
|
color: var(--p-text-color);
|
|
overflow-wrap: anywhere;
|
|
margin: 0;
|
|
}
|
|
.item-configuration-empty[data-v-11d8a39a] {
|
|
color: var(--p-text-muted-color);
|
|
margin: 8px 0 0;
|
|
font-size: 0.875rem;
|
|
}
|
|
.item-main[data-v-11d8a39a] {
|
|
container-type: inline-size;
|
|
}
|
|
/* 容器条件 (width>=560px) 下调整内部排列,判断的是容器可用宽度,不是整个视口。 */
|
|
@container (width>=560px) {
|
|
.item-configuration[data-v-11d8a39a] {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 6px 20px;
|
|
display: grid;
|
|
}
|
|
}
|
|
.cart-item > .p-checkbox[data-v-11d8a39a] {
|
|
align-self: start;
|
|
margin-top: 2px;
|
|
}
|
|
.item-qty[data-v-11d8a39a] {
|
|
border: 1px solid var(--p-content-border-color);
|
|
border-radius: 4px;
|
|
align-items: center;
|
|
gap: 0;
|
|
display: flex;
|
|
}
|
|
.item-qty[data-v-11d8a39a] .p-button {
|
|
border: 0;
|
|
border-radius: 0;
|
|
width: 28px;
|
|
min-width: 28px;
|
|
height: 34px;
|
|
}
|
|
.qty-num[data-v-11d8a39a] {
|
|
text-align: center;
|
|
min-width: 34px;
|
|
font-size: 1rem;
|
|
}
|
|
.item-price[data-v-11d8a39a] {
|
|
text-align: right;
|
|
min-width: 90px;
|
|
color: var(--p-primary-color);
|
|
font-size: 1.125rem;
|
|
font-weight: 600;
|
|
}
|
|
/* 报价状态与错误提示独立展示,避免价格更新时页面尺寸剧烈变化。 */
|
|
.quote-status[data-v-11d8a39a] {
|
|
color: var(--p-text-muted-color);
|
|
margin-bottom: 4px;
|
|
font-size: 0.875rem;
|
|
}
|
|
.quote-error[data-v-11d8a39a],
|
|
.quote-status[data-v-11d8a39a] {
|
|
font-weight: 400;
|
|
display: block;
|
|
}
|
|
.quote-error[data-v-11d8a39a] {
|
|
overflow-wrap: anywhere;
|
|
max-width: 200px;
|
|
font-size: 0.8125rem;
|
|
}
|
|
.cart-foot[data-v-11d8a39a] {
|
|
flex-direction: column;
|
|
gap: 18px;
|
|
display: flex;
|
|
position: sticky;
|
|
top: calc(var(--console-top-offset, 56px) + 20px);
|
|
}
|
|
.cart-foot h3[data-v-11d8a39a] {
|
|
margin: 0;
|
|
font-size: 1.125rem;
|
|
font-weight: 600;
|
|
line-height: 1.714rem;
|
|
}
|
|
.summary-line[data-v-11d8a39a] {
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
font-size: 1rem;
|
|
display: flex;
|
|
}
|
|
.summary-line > span[data-v-11d8a39a]:first-child {
|
|
color: var(--p-text-muted-color);
|
|
}
|
|
.foot-promo[data-v-11d8a39a] {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: 8px;
|
|
min-width: 0;
|
|
display: flex;
|
|
}
|
|
.foot-promo > label[data-v-11d8a39a] {
|
|
color: var(--p-text-muted-color);
|
|
font-size: 1rem;
|
|
}
|
|
.promo-input[data-v-11d8a39a] {
|
|
width: 100%;
|
|
min-width: 0;
|
|
}
|
|
.promo-count[data-v-11d8a39a] {
|
|
color: var(--p-green-600, #16a34a);
|
|
font-size: 0.875rem;
|
|
}
|
|
.foot-total[data-v-11d8a39a] {
|
|
border-top: 1px solid var(--p-content-border-color);
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
padding-top: 16px;
|
|
font-size: 1.125rem;
|
|
font-weight: 600;
|
|
display: flex;
|
|
}
|
|
.total[data-v-11d8a39a] {
|
|
color: var(--p-primary-color);
|
|
overflow-wrap: anywhere;
|
|
font-size: 1.75rem;
|
|
font-weight: 650;
|
|
}
|
|
.checkout-note[data-v-11d8a39a] {
|
|
color: var(--p-text-muted-color);
|
|
margin: -6px 0 0;
|
|
font-size: 0.875rem;
|
|
line-height: 1.6;
|
|
}
|
|
.cart-foot > .p-button[data-v-11d8a39a] {
|
|
width: 100%;
|
|
min-height: 36px;
|
|
}
|
|
.empty-panel[data-v-11d8a39a] {
|
|
padding: 20px;
|
|
}
|
|
.empty-panel[data-v-11d8a39a] .list-empty {
|
|
justify-content: center;
|
|
min-height: 380px;
|
|
}
|
|
.empty-panel[data-v-11d8a39a] .p-button {
|
|
margin-top: 8px;
|
|
}
|
|
/* 视口条件 (width<=1023px) 下的响应式覆盖;保留相对基础规则的层叠顺序。 */
|
|
@media (width<=1023px) {
|
|
.cart-layout[data-v-11d8a39a] {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
.cart-foot[data-v-11d8a39a] {
|
|
position: static;
|
|
}
|
|
}
|
|
/* 视口条件 (width<=639px) 下的响应式覆盖;保留相对基础规则的层叠顺序。 */
|
|
@media (width<=639px) {
|
|
.page[data-v-11d8a39a] {
|
|
gap: 18px;
|
|
}
|
|
.page-head[data-v-11d8a39a] {
|
|
flex-wrap: wrap;
|
|
}
|
|
.panel[data-v-11d8a39a] {
|
|
padding: 16px;
|
|
}
|
|
.item-count[data-v-11d8a39a] {
|
|
margin-left: 0;
|
|
display: block;
|
|
}
|
|
.cart-head[data-v-11d8a39a] {
|
|
flex-wrap: wrap;
|
|
}
|
|
.cart-item[data-v-11d8a39a] {
|
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
gap: 14px 10px;
|
|
display: grid;
|
|
}
|
|
.item-main[data-v-11d8a39a] {
|
|
grid-column: 2/-1;
|
|
}
|
|
.item-qty[data-v-11d8a39a] {
|
|
grid-area: 2/2;
|
|
width: max-content;
|
|
}
|
|
.item-price[data-v-11d8a39a] {
|
|
text-align: left;
|
|
grid-area: 3/2;
|
|
min-width: 0;
|
|
}
|
|
.cart-item > .p-button[data-v-11d8a39a] {
|
|
grid-area: 2/3;
|
|
}
|
|
}
|