|
@@ -1,11 +1,11 @@
|
|
<template>
|
|
<template>
|
|
- <Navbar class="mb-3" />
|
|
|
|
- <v-card class="default-width card-box mb-5 pa-5 resume-box">
|
|
|
|
|
|
+ <Navbar v-if="props.showNavbar" class="mb-3" />
|
|
|
|
+ <v-card class="card-box mb-5 pa-5 resume-box" :class="props.defaultWidth ? 'default-width' : '100%'" :elevation="props.elevation">
|
|
<div class="resume-header">
|
|
<div class="resume-header">
|
|
<div class="resume-title">我的购物车</div>
|
|
<div class="resume-title">我的购物车</div>
|
|
<div>
|
|
<div>
|
|
<v-btn color="primary" size="small" variant="text" class="ml-2" @click="getCartList"><v-icon>mdi-refresh</v-icon>刷新购物车</v-btn>
|
|
<v-btn color="primary" size="small" variant="text" class="ml-2" @click="getCartList"><v-icon>mdi-refresh</v-icon>刷新购物车</v-btn>
|
|
- <v-btn color="primary" size="small" variant="text" class="ml-2" to="/mall/user/order"><v-icon>mdi-account-circle-outline</v-icon>我的订单</v-btn>
|
|
|
|
|
|
+ <v-btn v-if="props.showOrder" color="primary" size="small" variant="text" class="ml-2" to="/mall/user/order"><v-icon>mdi-account-circle-outline</v-icon>我的订单</v-btn>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div v-if="cartList.length" class="mt-3">
|
|
<div v-if="cartList.length" class="mt-3">
|
|
@@ -86,6 +86,24 @@ import confirm from '@/views/mall/components/details/order/confirm.vue'
|
|
import pay from '@/views/mall/components/details/order/pay.vue'
|
|
import pay from '@/views/mall/components/details/order/pay.vue'
|
|
import Confirm from '@/plugins/confirm'
|
|
import Confirm from '@/plugins/confirm'
|
|
import { useI18n } from '@/hooks/web/useI18n'; const { t } = useI18n()
|
|
import { useI18n } from '@/hooks/web/useI18n'; const { t } = useI18n()
|
|
|
|
+const props = defineProps({
|
|
|
|
+ showNavbar: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: true
|
|
|
|
+ },
|
|
|
|
+ defaultWidth: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: true
|
|
|
|
+ },
|
|
|
|
+ showOrder: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: true
|
|
|
|
+ },
|
|
|
|
+ elevation: {
|
|
|
|
+ type: [Number, String],
|
|
|
|
+ default: '3'
|
|
|
|
+ }
|
|
|
|
+})
|
|
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const cartList = ref([])
|
|
const cartList = ref([])
|