fix handleClick

This commit is contained in:
SRP-mango 2023-12-06 20:44:09 +07:00
parent d6013d5fa2
commit b0d6784462

View file

@ -17,10 +17,6 @@
@click="handleClick(favorite)" @click="handleClick(favorite)"
> >
<!-- <template v-slot:prepend>
<v-icon class="icon-pin"></v-icon>
</template> -->
<template v-slot:prepend> <template v-slot:prepend>
<v-icon class="icon-pin"></v-icon> <v-icon class="icon-pin"></v-icon>
</template> </template>
@ -41,6 +37,10 @@ export default {
setup() { setup() {
const favorite = ref([]); const favorite = ref([]);
const handleClick = (favoriteItem) => {
console.log('Clicked:', favoriteItem);
};
onMounted(async () => { onMounted(async () => {
try { try {
const currentUser = JSON.parse(sessionStorage.getItem('current_user')); const currentUser = JSON.parse(sessionStorage.getItem('current_user'));
@ -58,15 +58,11 @@ export default {
} catch (error) { } catch (error) {
console.error(error); console.error(error);
} }
const handleClick = (favorite) => {
console.log('Clicked:', favorite);
};
}); });
return { return {
favorite favorite,
handleClick
}; };
} }
}; };