fix: cart
This commit is contained in:
@@ -1,15 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="Default || 'div'">
|
|
||||||
<div class="flex flex-col gap-5 md:gap-10">
|
<div class="flex flex-col gap-5 md:gap-10">
|
||||||
<h1 class="text-2xl font-bold text-black dark:text-white">
|
<h1 class="text-2xl font-bold text-black dark:text-white">
|
||||||
Shopping Cart
|
Shopping Cart
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Default from '@/layouts/default.vue';
|
|
||||||
import { useCartStore } from '@/stores/customer/cart';
|
import { useCartStore } from '@/stores/customer/cart';
|
||||||
|
|
||||||
const cartStore =useCartStore()
|
const cartStore =useCartStore()
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
@change="toggleCart(cart.cart_id)" />
|
@change="toggleCart(cart.cart_id)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="p-8 text-center">
|
<div v-else class="p-8 text-center flex items-center justify-center">
|
||||||
<UIcon name="mdi:cart-outline" class="text-4xl text-gray-300 dark:text-gray-600 mb-2" />
|
<UIcon name="mdi:cart-outline" class="text-4xl text-gray-300 dark:text-gray-600 mb-2" />
|
||||||
<p class="text-gray-500 dark:text-gray-400">{{ t('No carts yet') }}</p>
|
<p class="text-gray-500 dark:text-gray-400">{{ t('No carts yet') }}</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -67,14 +67,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</UModal>
|
</UModal>
|
||||||
</component>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import { useCartStore } from '@/stores/customer/cart'
|
import { useCartStore } from '@/stores/customer/cart'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import Default from '@/layouts/default.vue'
|
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|||||||
Reference in New Issue
Block a user