fix(cart): 调整错误提示展示并优化已下架商品遮罩样式

简化 Cart.vue 中错误文案展示,移除多余 margin
优化 error-goods 样式:使用 inset 定位,并通过 box-sizing 管理 padding,改善布局与响应表现
This commit is contained in:
田香琪
2026-07-17 17:35:42 +08:00
parent 59c98d1289
commit d172a1c9b8
3 changed files with 58 additions and 28 deletions

View File

@@ -193,7 +193,7 @@
</div>
</div>
<div class="error-goods" v-if="goods.errorMessage">
<div style="margin-top: 20px">{{ goods.errorMessage }}</div>
<div>{{ goods.errorMessage }}</div>
<el-button type="primary" @click="delGoods(goods.goodsSku.id)"
>删除</el-button
>
@@ -785,20 +785,18 @@ export default {
outline-color: $theme_color;
}
}
}
.error-goods {
position: absolute;
width: 100%;
height: 100%;
margin-left: -20px;
background-color: rgba($color: #999, $alpha: 0.5);
z-index: 10;
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 150px;
color: #000;
padding-right: 30px;
.error-goods {
position: absolute;
inset: 0;
background-color: rgba($color: #999, $alpha: 0.5);
z-index: 10;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30px 0 150px;
box-sizing: border-box;
color: #000;
}
}
}
&-footer {

View File

@@ -55,7 +55,7 @@
<div>
<div class="hover-color" @click="goodsDetail(goods.skuId, goods.goodsId)">{{ goods.name }}</div>
<div class="mt_10">
<span class="global_color">{{ $filters.unitPrice(goods.goodsPrice, "¥") }} </span>x {{ goods.num }}
<span class="global_color">{{ $filters.unitPrice(goods.goodsPrice, "¥") }} </span> x {{ goods.num }}
<span style="margin-left: 10px;color: #ff9900;">{{refundPriceList(goods.isRefund)}}</span>
</div>
<el-button v-if="goods.commentStatus == 'UNFINISHED'" @click="comment(order.sn, goodsIndex)" size="small" type="success" class="fontsize_12" style="position:relative;top:-22px;left:190px;margin-right:10px">评价</el-button>