Fix:5926 【商城小程序】多规格商品默认组合无库存时,组成该组合的两个规格属性因各自均无可售组合,导致全部规格按钮置灰。
This commit is contained in:
@@ -35,8 +35,7 @@
|
|||||||
v-for="(subItem, subIndex) in item.attrValue"
|
v-for="(subItem, subIndex) in item.attrValue"
|
||||||
:key="subIndex"
|
:key="subIndex"
|
||||||
:class="{
|
:class="{
|
||||||
'actived': subItem.check,
|
'actived': subItem.check
|
||||||
'disabled': !subItem.canUsed
|
|
||||||
}"
|
}"
|
||||||
class="itemn v12-radius-40"
|
class="itemn v12-radius-40"
|
||||||
@click="tapAttr(index, subIndex, subItem)"
|
@click="tapAttr(index, subIndex, subItem)"
|
||||||
@@ -218,9 +217,9 @@ export default {
|
|||||||
},
|
},
|
||||||
tapAttr(index, subIndex, subItem) {
|
tapAttr(index, subIndex, subItem) {
|
||||||
// 缺货的点击了没效果
|
// 缺货的点击了没效果
|
||||||
if (!subItem.canUsed || subItem.check) {
|
// if (!subItem.canUsed || subItem.check) {
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
this.attrObj.productAttr[index].attrValue.map((subItem, subIdx) => {
|
this.attrObj.productAttr[index].attrValue.map((subItem, subIdx) => {
|
||||||
subItem.check= false
|
subItem.check= false
|
||||||
if (subIndex === subIdx) {
|
if (subIndex === subIdx) {
|
||||||
|
|||||||
Reference in New Issue
Block a user