Files
myprojplanet_vite/src/views/ecommerce/cartList/cartList.ts
Surya Paolo bc960d38a1 PASSAGGIO A VITE !
AGG. 1.1.23
2025-03-01 14:14:43 +01:00

60 lines
1.3 KiB
TypeScript
Executable File

import { defineComponent, onMounted, ref } from 'vue'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { CProductCard } from '@src/components/CProductCard'
export default defineComponent({
name: 'CartList',
components: { CProductCard },
filters: {
capitalize(value: any) {
if (!value) {
return ''
}
value = value.toString()
return value.charAt(0).toUpperCase() + value.slice(1)
}
},
props: {},
setup() {
const userStore = useUserStore()
const globalStore = useGlobalStore()
const productStore = useProducts()
const $router = useRouter()
const $q = useQuasar()
const { t } = useI18n();
function getCart() {
return productStore.getCart()
}
function getProducts() {
return productStore.getProducts()
}
function mounted() {
// Inizializza
}
onMounted(mounted)
return {
userStore,
costanti,
tools,
toolsext,
getCart,
getProducts,
}
}
})