other components... (2)
This commit is contained in:
@@ -3,9 +3,11 @@ import { CCardState } from '../CCardState'
|
||||
import { computed, defineComponent } from 'vue'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useProducts } from '@store/Products'
|
||||
import CCopyBtn from '@/components/CCopyBtn/CCopyBtn'
|
||||
import CSingleCart from '@/components/CSingleCart/CSingleCart'
|
||||
import CTitleBanner from '@/components/CTitleBanner/CTitleBanner'
|
||||
import { CCopyBtn } from '@/components/CCopyBtn'
|
||||
import { CSingleCart } from '@/components/CSingleCart'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
|
||||
import MixinUsers from '../../mixins/mixin-users'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyCart',
|
||||
@@ -16,6 +18,8 @@ export default defineComponent({
|
||||
const globalStore = useGlobalStore()
|
||||
const products = useProducts()
|
||||
|
||||
const { getnumItemsCart } = MixinUsers()
|
||||
|
||||
const myCart = computed(() => products.cart)
|
||||
const myTotalPrice = computed(() => {
|
||||
if (products.cart) {
|
||||
@@ -52,6 +56,7 @@ export default defineComponent({
|
||||
ordersCart,
|
||||
numOrders,
|
||||
closecart,
|
||||
getnumItemsCart,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
MyCart:<br>
|
||||
<div id="mycontainer">
|
||||
<div class="myheader row justify-between">
|
||||
<div class="col-6">
|
||||
<q-btn class="q-mx-xs" round dense flat icon="fas fa-shopping-cart">
|
||||
|
||||
<q-badge v-if="getnumItemsCart > 0" color="red" floating transparent>
|
||||
{{ getnumItemsCart }}
|
||||
<q-badge v-if="getnumItemsCart() > 0" color="red" floating transparent>
|
||||
{{ getnumItemsCart() }}
|
||||
</q-badge>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user