feat: 选品广场放开多规格
This commit is contained in:
@@ -419,16 +419,11 @@
|
|||||||
? getGoodsNum(list[0].id)
|
? getGoodsNum(list[0].id)
|
||||||
: 1);
|
: 1);
|
||||||
state.selectedSku = list[0];
|
state.selectedSku = list[0];
|
||||||
// 按钮不能点击
|
|
||||||
if (propertyList.length && propertyList[0].values.length) {
|
if (propertyList.length && propertyList[0].values.length) {
|
||||||
|
const inStockList = skuList.value.filter((sku) => Number(sku?.stock) > 0);
|
||||||
propertyList[0].values.forEach((e) => {
|
propertyList[0].values.forEach((e) => {
|
||||||
let show = false;
|
const enabled = inStockList.some((sku) => sku.value_id_array.includes(e.id));
|
||||||
list.forEach((e1) => {
|
e.disabled = !enabled;
|
||||||
if (e1.value_id_array.includes(e.id)) {
|
|
||||||
show = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
e.disabled = !show;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user