calculator and other cleaning
This commit is contained in:
@ -43,6 +43,7 @@ defineProps<{
|
||||
const menuStore = useMenuStore()
|
||||
const itemCount = ref(4)
|
||||
const productStore = useProductStore()
|
||||
const { $session } = useNuxtApp()
|
||||
|
||||
async function updateItemCount() {
|
||||
const width = window.innerWidth
|
||||
@ -57,6 +58,10 @@ watch(itemCount, async () => {
|
||||
await productStore.getList(itemCount.value)
|
||||
})
|
||||
|
||||
watch($session.cookieData, async () => {
|
||||
await productStore.getList(itemCount.value)
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
await updateItemCount()
|
||||
window.addEventListener('resize', updateItemCount)
|
||||
|
Reference in New Issue
Block a user