超市商品sku默认选中第一项

This commit is contained in:
ctw committed 2025-01-14 10:36:46 +08:00
1 parent ee7f4a6903
commit 4259d9efe5
1 file changed
+3
@@ -110,6 +110,9 @@ watch(
// 获取商品详情
const { data } = await shopApi.getSupermarketSpuDetail({ id: props.productData.productId })
state.goodsDetail = data
if (data.skuList.length > 0) {
state.selectedSku = state.goodsDetail.skuList[0]
}
}
},
)