|
|
@ -103,7 +103,7 @@ |
|
|
|
</div> |
|
|
|
<!-- -----------------------------------------------------规格----------------------------------------------- --> |
|
|
|
<div class="sku" v-if="productData.names && productData.names.length > 0"> |
|
|
|
<ul v-for='it in productData.names' :key='it.nameCode'> |
|
|
|
<ul v-for='(it,rowIndex) in productData.names' :key='it.nameCode'> |
|
|
|
<li> |
|
|
|
<p class="proDescribeTit"> |
|
|
|
{{it.skuName === '' ? '' : it.skuName + ':'}} |
|
|
@ -111,10 +111,10 @@ |
|
|
|
<!-- 多选项值 --> |
|
|
|
<p v-if="it.values && it.values.length > 1"> |
|
|
|
<span |
|
|
|
v-for='kt in it.values' |
|
|
|
v-for='(kt,colIndex) in it.values' |
|
|
|
:key='kt.valueCode' |
|
|
|
:class="[{'selected-item': kt.selected}]" |
|
|
|
@click="selectSku(kt, it);" |
|
|
|
@click="selectSku(kt, it, rowIndex, colIndex);" |
|
|
|
> |
|
|
|
{{kt.skuValue }} |
|
|
|
</span> |
|
|
@ -272,8 +272,11 @@ export default { |
|
|
|
this.swiperTop.slideTo(index, 300, false) |
|
|
|
}, |
|
|
|
// 规格选择 |
|
|
|
selectSku (o, list) { |
|
|
|
selectSku (o, list, rowIndex, colIndex) { |
|
|
|
this.$emit('selectSku', o, list) |
|
|
|
if (this.productData.skuImages && rowIndex === 0) { |
|
|
|
this.thumbsClick(colIndex) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 收藏 |
|
|
|
collect () { this.$emit('collect') }, |
|
|
|