fix(Sku): duplicate pictures in image preview (#6610)

This commit is contained in:
neverland
2020-06-25 16:51:21 +08:00
committed by GitHub
parent ca0c7c236d
commit 4230011480

View File

@@ -267,9 +267,10 @@ export default createComponent({
} }
treeItem.v.forEach((vItem) => { treeItem.v.forEach((vItem) => {
const img = vItem.previewImgUrl || vItem.imgUrl || vItem.img_url; const imgUrl = vItem.previewImgUrl || vItem.imgUrl || vItem.img_url;
if (img) {
imageList.push(img); if (imgUrl && imageList.indexOf(imgUrl) === -1) {
imageList.push(imgUrl);
} }
}); });
}); });