|
@@ -3,6 +3,7 @@
|
|
|
<v-card class="default-width card-box mb-5 pa-5 resume-box">
|
|
|
<div class="resume-header">
|
|
|
<div class="resume-title">我的购物车</div>
|
|
|
+ <v-btn color="primary" size="small" variant="text" @click="getCartList"><v-icon>mdi-refresh</v-icon>刷新购物车</v-btn>
|
|
|
</div>
|
|
|
<div v-if="cartList.length" class="mt-3">
|
|
|
<v-data-table
|
|
@@ -21,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
|
|
@@ -42,7 +43,11 @@
|
|
|
</v-data-table>
|
|
|
<v-divider></v-divider>
|
|
|
<div class="d-flex align-center justify-space-between py-4">
|
|
|
- <v-btn :disabled="!selectedData.length" color="error" variant="outlined" @click.stop="handleDelete(true)">删除选中的商品</v-btn>
|
|
|
+ <div class="d-flex align-center">
|
|
|
+ <!-- <v-checkbox v-model="selectAll" hide-details color="primary" @update:modelValue="handleSelectAll"></v-checkbox>
|
|
|
+ <span class="mr-5" style="color: #777;">全选</span> -->
|
|
|
+ <v-btn :disabled="!selectedData.length" color="error" variant="outlined" @click.stop="handleDelete(true)">删除选中的商品</v-btn>
|
|
|
+ </div>
|
|
|
<div class="d-flex align-center">
|
|
|
<div class="color-666 mr-8">共{{ totalCount }}件商品,合计:¥{{ fen2yuan(totalPrice) }}</div>
|
|
|
<v-btn :disabled="!totalCount" color="primary" @click.stop="handleSettlement">结算<span v-if="totalCount > 0">({{ totalCount }})</span></v-btn>
|