Jelajahi Sumber

优先展示商品规格图片,没有则显示返回的封面图片

lifanagju_citu 4 bulan lalu
induk
melakukan
90a092dc64
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/views/mall/cart/index.vue

+ 1 - 1
src/views/mall/cart/index.vue

@@ -22,7 +22,7 @@
           <v-checkbox v-model="item.selected" hide-details color="primary" @update:modelValue="val => handleSelect(val, item.id)"></v-checkbox>
         </template>
         <template v-slot:[`item.spuName`]="{ item }">
-          <GoodsItem :item="{ ...item.sku, ...item.spu, spuName: item.spu.name }" :showLine="false" :showPriceCount="false" class="mb-1" />
+          <GoodsItem :item="{ ...item.sku, ...item.spu, spuName: item.spu.name, picUrl: item.sku?.picUrl || item.spu?.picUrl }" :showLine="false" :showPriceCount="false" class="mb-1" />
         </template>
         <template v-slot:[`item.count`]="{ item }">
           <v-number-input