Fix:5306 【商城小程序】当商品库存为0的情况下,加入购物车按钮盒立即购买按钮都置灰

This commit is contained in:
linxi
2026-06-05 10:39:14 +08:00
parent 11e69ea9c7
commit 26c5c4d115
2 changed files with 15 additions and 5 deletions
+11 -2
View File
@@ -75,7 +75,7 @@
<view class="v12-px-2 v12-mt-3" v-if="showOk">
<u-button
shape="circle"
color="#C52733"
:color="(attr.productSelect.stock === 0 && attr.cartAttr) ? '#9D9D9D' : '#C52733'"
@click="$emit('ok')"
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
>{{ okText }}</u-button>
@@ -83,7 +83,7 @@
<view class="v12-px-2 v12-mt-3" v-if="isGift">
<u-button
shape="circle"
color="#C52733"
:color="(attr.productSelect.stock === 0 && attr.cartAttr) ? '#9D9D9D' : '#C52733'"
@click="$emit('gift')"
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
>送给朋友</u-button>
@@ -255,6 +255,15 @@ export default {
}
</script>
<style scope>
.btn-car-disabled {
border: 2rpx solid #9D9D9D !important;
color: #9D9D9D !important;
}
.btn-buy-disabled {
background: #9D9D9D !important;
color: #FFFFFF !important;
}
.itemn{
margin: 28rpx 0 0 34rpx !important;
width: auto;
+4 -3
View File
@@ -1872,8 +1872,8 @@ export default {
}
.btn-car-disabled {
border: 2rpx solid #707070;
color: #707070;
border: 2rpx solid #9D9D9D !important;
color: #9D9D9D !important;
}
.btn-buy {
@@ -1886,7 +1886,8 @@ export default {
}
.btn-buy-disabled {
background: #9D9D9D;
background: #9D9D9D !important;
color: #FFFFFF !important;
}
}